Esempio 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;
 }
Esempio n. 3
0
        public void CleanupEventCollector()
        {
            EditorApplication.isPlaying = true;
            DiagnosticEventCollector.FindOrCreateGlobalInstance();
            EditorApplication.isPlaying = false;

            Assert.AreEqual(0, CountResourcesByName("EventCollector"));
        }
 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);
 }
Esempio n. 6
0
 void RegisterEventHandler(bool reg)
 {
     DiagnosticEventCollector.RegisterEventHandler(OnEditorPlayModeEvent, reg, false);
 }
 /// <summary>
 /// This class is responsible for passing events from the resource manager to the event collector,
 /// </summary>
 /// <param name="resourceManager"></param>
 public ResourceManagerDiagnostics(ResourceManager resourceManager)
 {
     resourceManager.RegisterDiagnosticCallback(OnResourceManagerDiagnosticEvent);
     m_eventCollector  = DiagnosticEventCollector.FindOrCreateGlobalInstance();
     m_ResourceManager = resourceManager;
 }
 private void OnDisable()
 {
     DiagnosticEventCollector.RegisterEventHandler(OnEvent, false, false);
     EditorApplication.playModeStateChanged -= OnEditorPlayModeChanged;
 }