示例#1
0
        private void Provider_LocationUpdated(LocationReading currentLocation, LocationReading lastLocation)
        {
            measurementCount++;

            if ((LocationProviderSettings.MaxNumberOfUpdates > 0) && (measurementCount >= LocationProviderSettings.MaxNumberOfUpdates))
            {
                Provider.Pause();
            }

            Logger.LogFromMethod("ARLocationProvider", "Provider_LocationUpdated", $"New location {currentLocation}.", DebugMode);
            OnLocationUpdatedDelegate?.Invoke(currentLocation, lastLocation);
            OnLocationUpdated?.Invoke(currentLocation);
        }
示例#2
0
        private void Provider_LocationUpdated(LocationReading currentLocation, LocationReading lastLocation)
        {
            if (mute)
            {
                return;
            }

            measurementCount++;

            if ((LocationProviderSettings.MaxNumberOfUpdates > 0) && (measurementCount >= LocationProviderSettings.MaxNumberOfUpdates))
            {
                Provider.Pause();
            }

            Logger.LogFromMethod("ARLocationProvider", "Provider_LocationUpdated", $"New location {currentLocation}.", DebugMode);

            cameraPositionAtLastUpdate = ARLocationManager.Instance.MainCamera.transform.position;
            OnLocationUpdatedDelegate?.Invoke(currentLocation, lastLocation);
            OnLocationUpdated?.Invoke(currentLocation.ToLocation());
        }