UnityEditor.FrameDebuggerWindow.EnableIfNeeded C# (CSharp) Méthode

EnableIfNeeded() public méthode

public EnableIfNeeded ( ) : void
Résultat void
        public void EnableIfNeeded()
        {
            if (!FrameDebuggerUtility.enabled)
            {
                this.m_RTChannel = 0;
                this.m_RTIndex = 0;
                this.m_RTBlackLevel = 0f;
                this.m_RTWhiteLevel = 1f;
                this.ClickEnableFrameDebugger();
                this.RepaintOnLimitChange();
            }
        }

Usage Example

Exemple #1
0
 private void DrawCPUOrRenderingToolbar(ProfilerProperty property)
 {
     EditorGUILayout.BeginHorizontal(EditorStyles.toolbar, new GUILayoutOption[0]);
     string[] displayedOptions = new string[]
     {
         "Hierarchy",
         "Timeline",
         "Raw Hierarchy"
     };
     int[] optionValues = new int[]
     {
         0,
         1,
         2
     };
     this.m_ViewType = (ProfilerViewType)EditorGUILayout.IntPopup((int)this.m_ViewType, displayedOptions, optionValues, EditorStyles.toolbarDropDown, new GUILayoutOption[]
     {
         GUILayout.Width(100f)
     });
     GUILayout.FlexibleSpace();
     GUILayout.Label(string.Format("CPU:{0}ms   GPU:{1}ms", property.frameTime, property.frameGpuTime), EditorStyles.miniLabel, new GUILayoutOption[0]);
     GUI.enabled = (ProfilerDriver.GetNextFrameIndex(this.m_CurrentFrame) == -1);
     if (GUILayout.Button((!GUI.enabled) ? ProfilerWindow.ms_Styles.noFrameDebugger : ProfilerWindow.ms_Styles.frameDebugger, EditorStyles.toolbarButton, new GUILayoutOption[0]))
     {
         FrameDebuggerWindow frameDebuggerWindow = FrameDebuggerWindow.ShowFrameDebuggerWindow();
         frameDebuggerWindow.EnableIfNeeded();
     }
     GUI.enabled = true;
     GUILayout.FlexibleSpace();
     this.SearchFieldGUI();
     EditorGUILayout.EndHorizontal();
     this.HandleCommandEvents();
 }
All Usage Examples Of UnityEditor.FrameDebuggerWindow::EnableIfNeeded