Exemple #1
0
 private void Awake()
 {
     if (m_IsActive)
     {
         ProfilerAction.Enable();
     }
     else
     {
         ProfilerAction.Disable();
     }
 }
Exemple #2
0
        public void Draw(ref bool isActive)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            isActive = GUILayout.Toggle(isActive, "Enable", EditorStyles.toolbarButton, GUILayout.MaxWidth(100));
            if (isActive)
            {
                ProfilerAction.Enable();
            }
            else
            {
                ProfilerAction.Disable();
            }

            GUILayout.FlexibleSpace();

            if (GUILayout.Button("Clear", EditorStyles.toolbarButton))
            {
                ProfilerAction.Clear();
            }

            EditorGUILayout.EndHorizontal();
        }