Exemple #1
0
 /// <summary>
 /// Awake is called when the script instance is being loaded.
 /// We use this to pull the fields that have been set in the
 /// Unity editor and pass them to the Bugsnag client.
 /// </summary>
 void Awake()
 {
     Bugsnag.Init(BugsnagApiKey);
     Bugsnag.Configuration.AutoNotify           = AutoNotify;
     Bugsnag.Configuration.AutoCaptureSessions  = AutoCaptureSessions;
     Bugsnag.Configuration.UniqueLogsTimePeriod = TimeSpan.FromSeconds(UniqueLogsPerSecond);
     Bugsnag.Configuration.NotifyLevel          = NotifyLevel;
     Bugsnag.Configuration.ReleaseStage         = Debug.isDebugBuild ? "development" : "production";
     Bugsnag.Configuration.MaximumBreadcrumbs   = MaximumBreadcrumbs;
 }
        /// <summary>
        /// Awake is called when the script instance is being loaded.
        /// We use this to pull the fields that have been set in the
        /// Unity editor and pass them to the Bugsnag client.
        /// </summary>
        void Awake()
        {
            Bugsnag.Init(BugsnagApiKey);
            Bugsnag.Configuration.AutoNotify           = AutoNotify;
            Bugsnag.Configuration.AutoCaptureSessions  = AutoCaptureSessions;
            Bugsnag.Configuration.UniqueLogsTimePeriod = TimeSpan.FromSeconds(UniqueLogsPerSecond);
            Bugsnag.Configuration.NotifyLevel          = NotifyLevel;
            Bugsnag.Configuration.ReleaseStage         = Debug.isDebugBuild ? "development" : "production";
            Bugsnag.Configuration.MaximumBreadcrumbs   = MaximumBreadcrumbs;

            Bugsnag.Configuration.ScriptingBackend       = FindScriptingBackend();
            Bugsnag.Configuration.DotnetScriptingRuntime = FindDotnetScriptingRuntime();
            Bugsnag.Configuration.DotnetApiCompatibility = FindDotnetApiCompatibility();
        }
        void OnApplicationPause(bool paused)
        {
            var hasFocus = !paused;

            Bugsnag.SetApplicationState(hasFocus);
        }
 /// <summary>
 /// OnApplicationFocus is called when the application loses or gains focus.
 /// Alt-tabbing or Cmd-tabbing can take focus away from the Unity
 /// application to another desktop application. This causes the GameObjects
 /// to receive an OnApplicationFocus call with the argument set to false.
 /// When the user switches back to the Unity application, the GameObjects
 /// receive an OnApplicationFocus call with the argument set to true.
 /// </summary>
 /// <param name="hasFocus"></param>
 void OnApplicationFocus(bool hasFocus)
 {
     Bugsnag.SetApplicationState(hasFocus);
 }