private void Update() { if (m_IsActive && EditorApplication.isPlaying && !EditorApplication.isPaused) { ProfilerAction.Capture(); } }
private void Awake() { if (m_IsActive) { ProfilerAction.Enable(); } else { ProfilerAction.Disable(); } }
IEnumerator CaptureFrame() { while (EditorApplication.isPlaying) { yield return(m_WaitForEndOfFrame); if (!EditorApplication.isPaused) { ProfilerAction.Capture(); } } }
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(); }
private void OnEnable() { ProfilerAction.SetupDatabase(m_FoldoutIncomingTrafic, m_FoldoutOutgoingTrafic); EditorApplication.playModeStateChanged += HandlePlayMoveChanged; }