private void OnDisable() { QuantumRegistry.DeregisterObject(this); Application.logMessageReceivedThreaded -= DebugIntercept; Deactivate(); }
private void OnEnable() { QuantumRegistry.RegisterObject(this); Application.logMessageReceivedThreaded += DebugIntercept; if (IsSupportedState()) { if (_singletonMode) { if (Instance == null) { Instance = this; DontDestroyOnLoad(gameObject); } else if (Instance != this) { Destroy(gameObject); } } if (_activateOnStartup) { bool shouldFocus = SystemInfo.deviceType == DeviceType.Desktop; Activate(shouldFocus); } else { if (_initialiseOnStartup) { Initialize(); } Deactivate(); } } else { DisableQC(); } }