Пример #1
0
 private void OnApplicationPause(bool pause)
 {
     if (pause)
     {
         MLLocationStarterKit.Stop();
     }
     else
     {
         #if PLATFORM_LUMIN
         MLLocationStarterKit.Start();
         #endif
     }
 }
Пример #2
0
        /// <summary>
        /// Starts the MLLocation API and polls data if needed.
        /// </summary>
        private void StartupAPI()
        {
            #if PLATFORM_LUMIN
            MLResult result = MLLocationStarterKit.Start();
            if (!result.IsOk)
            {
                Debug.LogError("Error: LocationExample failed to start MLLocation, disabling script.");
                enabled = false;
                return;
            }
            #endif

            GetLocation();
            StartCoroutine(GetFineLocationLoop());
        }