Ejemplo n.º 1
0
 void RegisterEventHandler(bool reg)
 {
     if (ProjectConfigData.postProfilerEvents)
     {
         DiagnosticEventCollector.RegisterEventHandler(OnEditorPlayModeEvent, reg, false);
     }
 }
 private void OnDisable()
 {
     if (ProjectConfigData.postProfilerEvents)
     {
         DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false);
     }
     EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged;
 }
 void OnEditorPlayModeChanged(PlayModeStateChange state)
 {
     if (state == PlayModeStateChange.EnteredPlayMode)
     {
         DiagnosticEventCollector.RegisterEventHandler(OnEvent, true, false);
     }
     else if (state == PlayModeStateChange.EnteredEditMode)
     {
         DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false);
     }
 }
 void OnEnable()
 {
     if (m_EventListTreeViewState == null)
     {
         m_EventListTreeViewState = new TreeViewState();
     }
     m_OpStates  = new Dictionary <int, OperationState>();
     m_cacheTree = new CacheDataTree(this, m_EventListTreeViewState);
     m_cacheTree.Reload();
     EditorApplication.playModeStateChanged += OnEditorPlayModeChanged;
     DiagnosticEventCollector.RegisterEventHandler(OnEvent, true, false);
 }
Ejemplo n.º 5
0
 void RegisterEventHandler(bool reg)
 {
     DiagnosticEventCollector.RegisterEventHandler(OnEditorPlayModeEvent, reg, false);
 }
 private void OnDisable()
 {
     DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false);
     EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged;
 }