private void Start()
        {
            arLocationOrientation = GetComponent <ARLocationOrientation>();
            arLocationProvider    = ARLocationProvider.Instance;

            if (WaitForARTrackingToStart)
            {
                arLocationProvider.Mute();
            }

            #if !ARGPS_USE_VUFORIA
            var arSession = FindObjectOfType <ARSession>();

            if (!arSession)
            {
                throw new NullReferenceException("[AR+GPS][ARLocationManager#Start]: No ARSession found in the scene!");
            }

            SessionManager = new ARFoundationSessionManager(arSession);
            #else
            SessionManager = new VuforiaSessionManager();
            #endif

            SessionManager.DebugMode = DebugMode;

            SessionManager.OnARTrackingStarted(ARTrackingStartedCallback);
            SessionManager.OnARTrackingRestored(ARTrackingRestoredCallback);
            SessionManager.OnARTrackingLost(ARTrackingLostCallback);

            groundHeightDummy = new GameObject("ARLocationGroundHeight");
            groundHeightDummy.transform.SetParent(MainCamera.transform);
            groundHeightDummy.transform.localPosition = new Vector3();
            groundHeight = groundHeightDummy.AddComponent <GroundHeight>();
        }
        // Use this for initialization
        void Start()
        {
            // Look for the LocationProvider
            locationProvider = ARLocationProvider.Instance;

            mainCameraTransform = ARLocationManager.Instance.MainCamera.transform;

            targetAngle = mainCameraTransform.rotation.eulerAngles.y;

            if (LowPassFilterFactor > 0)
            {
                locationProvider.Provider.SetCompassLowPassFactor(LowPassFilterFactor);
            }

            locationProvider.Provider.ApplyCompassTiltCompensationOnAndroid = ApplyCompassTiltCompensationOnAndroid;

            if (ARLocationManager.Instance.WaitForARTrackingToStart)
            {
                waitingForARTracking = true;
                ARLocationManager.Instance.OnARTrackingStarted(() =>
                {
                    waitingForARTracking = false;
                });
            }

            // Register compass update delegate
            locationProvider.OnCompassUpdatedEvent(OnCompassUpdatedHandler);
        }
        private void Start()
        {
            arLocationOrientation = GetComponent <ARLocationOrientation>();
            arLocationProvider    = ARLocationProvider.Instance;

            if (WaitForARTrackingToStart)
            {
                arLocationProvider.Mute();
            }

            #if !ARGPS_USE_VUFORIA
            var arSession = FindObjectOfType <ARSession>();

            if (!arSession)
            {
                throw new NullReferenceException("[AR+GPS][ARLocationManager#Start]: No ARSession found in the scene!");
            }

            SessionManager = new ARFoundationSessionManager(arSession);
            #else
            SessionManager = new VuforiaSessionManager();
            #endif

            SessionManager.DebugMode = DebugMode;

            SessionManager.OnARTrackingStarted(ARTrackingStartedCallback);
            SessionManager.OnARTrackingRestored(ARTrackingRestoredCallback);
            SessionManager.OnARTrackingLost(ARTrackingLostCallback);
        }
        void Start()
        {
            if (PathSettings.LocationPath == null)
            {
                throw new NullReferenceException("[AR+GPS][MoveAlongPath]: Null Path! Please set the 'LocationPath' property!");
            }

            locationProvider = ARLocationProvider.Instance;
            locationProvider.OnLocationUpdatedEvent(LocationUpdated);

            mainCameraTransform = ARLocationManager.Instance.MainCamera.transform;
            arLocationRoot      = ARLocationManager.Instance.gameObject; // Misc.FindAndLogError("ARLocationRoot", "[ARLocationMoveAlongPath]: ARLocationRoot GameObject not found.");

            Initialize();
            hasInitialized = true;
        }