void OnDisable() { // Stop receiving debug entries Application.logMessageReceived -= ReceivedLog; #if !UNITY_EDITOR && UNITY_ANDROID if (logcatListener != null) { logcatListener.Stop(); } #endif // Stop receiving commands commandInputField.onValidateInput -= OnValidateCommand; }
private void OnDisable() { if (instance != this) { return; } // Stop receiving debug entries Application.logMessageReceivedThreaded -= ReceivedLog; #if !UNITY_EDITOR && UNITY_ANDROID if (logcatListener != null) { logcatListener.Stop(); } #endif // Stop receiving commands commandInputField.onValidateInput -= OnValidateCommand; DebugLogConsole.RemoveCommand("save_logs"); }