예제 #1
0
 private void Update()
 {
     if (m_IsActive && EditorApplication.isPlaying && !EditorApplication.isPaused)
     {
         ProfilerAction.Capture();
     }
 }
예제 #2
0
 private void Awake()
 {
     if (m_IsActive)
     {
         ProfilerAction.Enable();
     }
     else
     {
         ProfilerAction.Disable();
     }
 }
예제 #3
0
        IEnumerator CaptureFrame()
        {
            while (EditorApplication.isPlaying)
            {
                yield return(m_WaitForEndOfFrame);

                if (!EditorApplication.isPaused)
                {
                    ProfilerAction.Capture();
                }
            }
        }
예제 #4
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();
        }
예제 #5
0
        private void OnEnable()
        {
            ProfilerAction.SetupDatabase(m_FoldoutIncomingTrafic, m_FoldoutOutgoingTrafic);

            EditorApplication.playModeStateChanged += HandlePlayMoveChanged;
        }