private void Awake() { if (Init(instance, COMPONENT_NAME)) { instance = this; } }
private void Awake() { if (instance != null) { Debug.LogWarning("[ACT] Only one Injection Detector instance allowed!"); UnityEngine.Object.Destroy(this); } else if (!IsPlacedCorrectly()) { Debug.LogWarning("[ACT] Injection Detector placed in scene incorrectly and will be auto-destroyed! Please, use \"GameObject->Create Other->Code Stage->Anti-Cheat Toolkit->Injection Detector\" menu to correct this!"); UnityEngine.Object.Destroy(this); } else { instance = this; UnityEngine.Object.DontDestroyOnLoad(base.gameObject); } }
protected override void DisposeInternal() { base.DisposeInternal(); instance = null; }
private void DisposeInternal() { StopMonitoringInternal(); instance = null; UnityEngine.Object.Destroy(base.gameObject); }