2 using System.Collections;
4 using UnityEngine.Serialization;
14 [Tooltip(
"The minimum desired update time, in seconds.")]
20 [Tooltip(
"The minimum distance between consecutive location updates, in meters.")]
26 [FormerlySerializedAs(
"MaxAccuracyRadius")]
27 [Tooltip(
"The minimum accuracy of accepted location measurements, in meters. " +
28 "Accuracy here means the radius of uncertainty of the device's location, " +
29 "defining a circle where it can possibly be found in.")]
32 [Tooltip(
"The global maximum number of location updates. The updates will be paused after this amount. Zero means there is no limit and " +
33 "the updates won't be paused automatically. Note that this will possibly override the settings from individual components, like 'PlaceAtLocation'.")]
34 public uint MaxNumberOfUpdates;
37 public enum LocationProviderStatus
46 public delegate
void LocationUpdatedDelegate(LocationReading currentLocation, LocationReading lastLocation);
47 public delegate
void CompassUpdateDelegate(HeadingReading heading, HeadingReading lastReading);
48 public delegate
void LocationEnabledDelegate();
49 public delegate
void LocationFailedDelegate(
string message);
66 float StartTime {
get; }
67 bool IsCompassEnabled {
get; }
68 double DistanceFromStartPoint {
get; }
69 bool IsEnabled {
get; }
71 int LocationUpdateCount {
get; }
73 bool HasStarted {
get; }
75 bool ApplyCompassTiltCompensationOnAndroid {
get;
set; }
77 event LocationUpdatedDelegate LocationUpdated;
78 event LocationUpdatedDelegate LocationUpdatedRaw;
79 event CompassUpdateDelegate CompassUpdated;
80 event LocationEnabledDelegate LocationEnabled;
81 event LocationFailedDelegate LocationFailed;
83 IEnumerator Start(uint maxWaitTime = 10000, uint delay = 0);
85 void ForceLocationUpdate();
93 void OnEnabled(LocationEnabledDelegate del);
94 void OnFail(LocationFailedDelegate del);
96 void SetCompassLowPassFactor(
double factor);
98 string GetInfoString();
99 string GetStatusString();