private void OnEnable()
 {
   AppStatusBar.s_AppStatusBar = this;
   AppStatusBar.s_StatusWheel = new GUIContent[12];
   for (int index = 0; index < 12; ++index)
     AppStatusBar.s_StatusWheel[index] = EditorGUIUtility.IconContent("WaitSpin" + index.ToString("00"));
 }
        private static void OnDebuggerAttached(bool debuggerAttached)
        {
            if (debuggerAttached)
            {
                if (CodeOptimization.Release == CompilationPipeline.codeOptimization)
                {
                    if (EditorUtility.scriptCompilationFailed)
                    {
                        EditorUtility.DisplayDialog(
                            "C# Debugger Attached",
                            "All compiler errors must be fixed before switching to debug mode.",
                            "Ok");
                        ManagedDebugger.Disconnect();
                    }
                    else
                    {
                        if (EditorUtility.DisplayDialog(
                                "C# Debugger Attached",
                                "Do you want to switch to debug mode to enable C# debugging?\nDebug mode reduces C# performance.\nSwitching to debug mode will recompile and reload all scripts.",
                                "Switch to debug mode",
                                "Cancel"))
                        {
                            ToggleDebugState(CompilationPipeline.codeOptimization);
                        }
                        else
                        {
                            ManagedDebugger.Disconnect();
                        }
                    }
                }
            }

            AppStatusBar.StatusChanged();
        }
Beispiel #3
0
 private void OnEnable()
 {
     s_AppStatusBar = this;
     s_StatusWheel  = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
 }
Beispiel #4
0
 private void OnEnable()
 {
     AppStatusBar.s_AppStatusBar = this;
     AppStatusBar.s_StatusWheel  = new GUIContent[12];
     for (int index = 0; index < 12; ++index)
     {
         AppStatusBar.s_StatusWheel[index] = EditorGUIUtility.IconContent("WaitSpin" + index.ToString("00"));
     }
 }
 private void OnEnable()
 {
     s_AppStatusBar = this;
     s_StatusWheel = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
 }
Beispiel #6
0
        protected override void OnEnable()
        {
            base.OnEnable();
            s_AppStatusBar          = this;
            m_ManagedDebuggerToggle = new ManagedDebuggerToggle();

            Progress.OnAdded   += RefreshProgressBar;
            Progress.OnRemoved += RefreshProgressBar;
            Progress.OnUpdated += RefreshProgressBar;
        }
 protected override void OnEnable()
 {
     base.OnEnable();
     s_AppStatusBar = this;
     s_StatusWheel  = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
     s_AssemblyLock = EditorGUIUtility.IconContent("AssemblyLock", "|Assemblies are currently locked. Compilation will resume once they are unlocked");
 }
Beispiel #8
0
 protected override void OnEnable()
 {
     base.OnEnable();
     base.visualTree.clippingOptions = VisualElement.ClippingOptions.NoClipping;
     AppStatusBar.s_AppStatusBar     = this;
     AppStatusBar.s_StatusWheel      = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         AppStatusBar.s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
 }
 protected override void OnEnable()
 {
     base.OnEnable();
     // Disable clipping on the root element to fix case 931831
     visualTree.clippingOptions = VisualElement.ClippingOptions.NoClipping;
     s_AppStatusBar             = this;
     s_StatusWheel = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
 }
        protected override void OnEnable()
        {
            base.OnEnable();
            s_AppStatusBar          = this;
            m_autoLightBakingOn     = GetBakeMode();
            m_ManagedDebuggerToggle = new ManagedDebuggerToggle();
            m_CacheServerToggle     = new CacheServerToggle();

            Progress.added   += RefreshProgressBar;
            Progress.removed += RefreshProgressBar;
            Progress.updated += RefreshProgressBar;
        }
Beispiel #11
0
 protected override void OnEnable()
 {
     base.OnEnable();
     // Disable clipping on the root element to fix case 931831
     visualTree.clippingOptions = VisualElement.ClippingOptions.NoClipping;
     s_AppStatusBar             = this;
     s_StatusWheel = new GUIContent[12];
     for (int i = 0; i < 12; i++)
     {
         s_StatusWheel[i] = EditorGUIUtility.IconContent("WaitSpin" + i.ToString("00"));
     }
     s_AssemblyLock = EditorGUIUtility.IconContent("AssemblyLock", "|Assemblies are currently locked. Compilation will resume once they are unlocked");
 }
        private static void OnDebuggerAttached(bool debuggerAttached)
        {
            if (debuggerAttached)
            {
                if (CodeOptimization.Release == CompilationPipeline.codeOptimization)
                {
                    if (EditorUtility.scriptCompilationFailed)
                    {
                        EditorUtility.DisplayDialog(
                            "C# Debugger Attached",
                            "All compiler errors must be fixed before switching to debug mode.",
                            "Ok");
                        ManagedDebugger.Disconnect();
                    }
                    else
                    {
                        int option = EditorUtility.DisplayDialogComplex(
                            "C# Debugger Attached",
                            @"You're trying to attach a debugger, but Debug Mode is switched off in your Project.

When Unity is in Debug Mode, C# performance is reduced, but you can attach a debugger.
Switching to Debug Mode also recompiles and reloads all scripts.

You can enable Debug Mode temporarily for this Editor session, switch it on
for all projects until further notice, or cancel attaching the debugger.

If you switch it on for all projects, you can change it later in the
""Code Optimization on Startup"" setting in the Preferences window.",
                            "Enable debugging for this session",
                            "Cancel",
                            "Enable debugging for all projects");

                        if (option == 0)
                        {
                            ToggleDebugState(CompilationPipeline.codeOptimization);
                        }
                        else if (option == 2)
                        {
                            EditorPrefs.SetBool("ScriptDebugInfoEnabled", true);
                            ToggleDebugState(CompilationPipeline.codeOptimization);
                        }
                        else
                        {
                            ManagedDebugger.Disconnect();
                        }
                    }
                }
            }

            AppStatusBar.StatusChanged();
        }
Beispiel #13
0
        protected override void OnEnable()
        {
            base.OnEnable();
            s_AppStatusBar          = this;
            m_autoLightBakingOn     = GetBakeMode();
            m_ManagedDebuggerToggle = new ManagedDebuggerToggle();
            m_CacheServerToggle     = new CacheServerToggle();
            m_EventInterests.wantsLessLayoutEvents = true;
            m_DrawExtraFeatures = ModeService.HasCapability(ModeCapability.StatusBarExtraFeatures, true);

            Progress.added   += RefreshProgressBar;
            Progress.removed += RefreshProgressBar;
            Progress.updated += RefreshProgressBar;
        }
Beispiel #14
0
 private static void OnCacherServerConnectionChanged(AssetDatabaseExperimental.CacheServerConnectionChangedParameters param)
 {
     AppStatusBar.StatusChanged();
 }
Beispiel #15
0
 private static void OnCacherServerConnectionChanged(CacheServerConnectionChangedParameters param)
 {
     AppStatusBar.StatusChanged();
 }