void OnDisable()
        {
#if UNITY_2018_1_OR_NEWER
            attachProfilerState.Dispose();
            attachProfilerState = null;
#endif
            EditorConnection.instance.Unregister(UnityMemoryProfilerSupportKunClient.kMsgSendPlayerToEditor, OnMessageEvent);
            EditorConnection.instance.DisconnectAll();
        }
示例#2
0
        internal void OnDisable()
        {
            m_ConsoleAttachToPlayerState?.Dispose();
            m_ConsoleAttachToPlayerState = null;

            if (ms_ConsoleWindow == this)
            {
                ms_ConsoleWindow = null;
            }
        }
        //
        private void OnDisable()
        {
            attachProfilerState.Dispose();
            attachProfilerState = null;

            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.DisconnectAll();

            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Unregister(PlayerView.kMsgSendPlayerToEditor, OnMessageEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Unregister(PlayerView.kMsgSendPlayerToEditorHeader, OnMessageEventHeader);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.UnregisterConnection(OnConnection);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.UnregisterDisconnection(OnDisConnection);
        }
示例#4
0
 public void Dispose()
 {
     lock (_lock)
     {
         _logger?.LogTrace("Disposed connection");
         _lowerConnection?.Dispose();
         _state?.Dispose();
         _lowerConnection = null;
         _state           = null;
         GC.SuppressFinalize(this);
     }
 }
 void OnDisable()
 {
     m_AttachProfilerState.Dispose();
     m_AttachProfilerState = null;
     m_ProfilerWindows.Remove(this);
     foreach (var module in m_ProfilerModules)
     {
         module.OnDisable();
     }
     EditorApplication.playModeStateChanged -= OnPlaymodeStateChanged;
     UserAccessiblitySettings.colorBlindConditionChanged -= Initialize;
     ProfilerUserSettings.settingsChanged -= OnSettingsChanged;
 }
        void OnDisable()
        {
            Application.logMessageReceived -= DoLogChanged;

#if UNITY_2018_3_OR_NEWER
            m_ConsoleAttachToPlayerState?.Dispose();
            m_ConsoleAttachToPlayerState = null;
#endif
            m_SearchHistory = LogEntries.wrapped.searchHistory;
            if (ms_ConsoleWindow == this)
            {
                ms_ConsoleWindow = null;
            }
        }
            protected override void Dispose(bool disposing)
            {
                base.Dispose(disposing);
                if (ProfilerWindow != null)
                {
                    ProfilerWindow.SelectedFrameIndexChanged -= UpdateContent;
                }

                if (m_ConnectionState != null)
                {
                    m_ConnectionState.Dispose();
                }
                m_ConnectionState = null;

                m_UIState = null;
            }
        private void OnDisable()
        {
            if (m_EventDetailsView != null)
            {
                m_EventDetailsView.OnDisable();
            }

            FrameDebuggerStyles.OnDisable();

            m_AttachToPlayerState?.Dispose();
            m_AttachToPlayerState = null;

            s_FrameDebuggers.Remove(this);
            EditorApplication.pauseStateChanged    -= OnPauseStateChanged;
            EditorApplication.playModeStateChanged -= OnPlayModeStateChanged;

            DisableFrameDebugger();
        }
示例#9
0
        private void OnDisable()
        {
            if (onMessageFuncDict != null)
            {
                onMessageFuncDict.Clear();
                onMessageFuncDict = null;
            }

            if (onGUILayoutFuncDict != null)
            {
                onGUILayoutFuncDict.Clear();
                onGUILayoutFuncDict = null;
            }

            if (m_attachProfilerState != null)
            {
                m_attachProfilerState.Dispose();
                m_attachProfilerState = null;
            }


            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Unregister(UnityChoseKun.kMsgSendPlayerToEditor, OnMessageEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.UnregisterConnection(OnConnection);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.UnregisterDisconnection(OnDisConnection);

            // Deviceと接続した状態でUnityEditorを終了させるとUnityEditorがクラッシュする。
            // スクリプトリファレンスに記載されているサンプルでもOnDisableで処理しているので謎
            // しかし、呼ばないと次に接続した時に繋がらなくなる。
            // 呼ぶ必要はあるが、呼ぶとクラッシュする謎仕様。
            //  ========== OUTPUTTING STACK TRACE ==================
            //  0x00007FF774558B79(Unity) profiling::ProfilerSession::OnConnectTo
            //  0x00007FF7753BA87C(Unity) GeneralConnection::DisconnectAll
            //  0x00007FF7733DF6B6(Unity) EditorConnectionInternal_CUSTOM_DisconnectAll
            //  0x0000023E504F1115(Mono JIT Code)(wrapper managed - to - native) UnityEditor.EditorConnectionInternal:DisconnectAll()
            //  0x0000023E504F0FB3(Mono JIT Code) UnityEditor.EditorConnectionInternal:UnityEngine.IPlayerEditorConnectionNative.DisconnectAll()
            //  0x0000023E504F0E84(Mono JIT Code) UnityEditor.Networking.PlayerConnection.EditorConnection:DisconnectAll()
            //  0x0000023E504EF963(Mono JIT Code)[D:\SandBox\unitychan - crs - master\Assets\UTJ\UnityChoseKun\Editor\Scripts\PlayerViewEditorWindow.cs:141] Utj.UnityChoseKun.PlayerViewKunEditorWindow:OnDisable()

            //  UnityEditor.Networking.PlayerConnection.EditorConnection.instance.DisconnectAll();
        }
        private void OnDisable()
        {
            if (onMessageFuncDict != null)
            {
                onMessageFuncDict.Clear();
                onMessageFuncDict = null;
            }

            if (onGUILayoutFuncDict != null)
            {
                onGUILayoutFuncDict.Clear();
                onGUILayoutFuncDict = null;
            }


            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Unregister(UnityChoseKun.kMsgSendPlayerToEditor, OnMessageEvent);
            UnityEditor.Networking.PlayerConnection.EditorConnection.instance.DisconnectAll();

            if (m_attachProfilerState != null)
            {
                m_attachProfilerState.Dispose();
                m_attachProfilerState = null;
            }
        }
示例#11
0
 void OnDisable()
 {
     EditorConnection.instance.Unregister(RuntimeDebuggerOpenXRFeature.kPlayerToEditorSendDebuggerOutput, DebuggerState.OnMessageEvent);
     state.Dispose();
 }
        private void OnDisable()
        {
#if ENABLE_PROFILER_STATES
            m_attachProfilerState.Dispose();
#endif
        }
示例#13
0
 public void Dispose()
 {
     _connection?.Dispose();
     _connection = null;
     _state.Dispose();
 }
示例#14
0
 //
 private void OnDisable()
 {
     attachProfilerState.Dispose();
     attachProfilerState = null;
 }
示例#15
0
 /// <summary>
 ///
 /// </summary>
 private void OnDisable()
 {
     UnityEditor.Networking.PlayerConnection.EditorConnection.instance.Unregister(RemoteMessageBase.kMsgSendPlayerToEditor, OnMessageEvent);
     UnityEditor.Networking.PlayerConnection.EditorConnection.instance.DisconnectAll();
     m_connectionState.Dispose();
 }
示例#16
0
 internal void OnDisable()
 {
     m_ConsoleAttachToPlayerState?.Dispose();
     m_ConsoleAttachToPlayerState = null;
 }