예제 #1
0
 /// <summary>
 /// Raises the application pause event.
 /// </summary>
 /// <param name="pauseStatus">If set to <c>true</c> pause status.</param>
 void OnApplicationPause(bool pauseStatus)
 {
     if (_trackerPlugin != null)
     {
         _trackerPlugin.OnApplicationPause(pauseStatus);
     }
 }
예제 #2
0
 /// <summary>
 /// OnApplicationPause is called when the application loses or gains focus.
 /// When the user goes to the home screen or to another app, focus is lost, and this method is called with the argument set to true.
 /// When the user re-opens the app and focus is gained, this method is called with the argument set to false.
 ///
 /// NOTE: On Android, when the on-screen keyboard is enabled, it causes a OnApplicationFocus( false ) event.
 /// Additionally, if you press "Home" at the moment the keyboard is enabled, the OnApplicationFocus() event is not called, but OnApplicationPause() is called instead.
 /// </summary>
 ///
 /// <param name="pauseStatus">True if the app has paused (lost focus), false if it is not paused (gained focus).</param>
 void OnApplicationPause(bool pauseStatus)
 {
     if (_trackerPlugin != null)
     {
         _trackerPlugin.OnApplicationPause(pauseStatus);
     }
     if (pauseStatus)
     {
         Application.targetFrameRate = 1;
     }
     else
     {
         Application.targetFrameRate = 30;
     }
 }