/// <summary> /// Handler for destroy event. /// </summary> void OnDestroy() { if (instance == this) { instance = null; } }
/// <summary> /// Handler for destroy event. /// </summary> void OnDestroy() { DebugEx.Verbose("ResizeListenerScript.OnDestroy()"); if (sInstance == this) { sInstance = null; } }
/// <summary> /// Script starting callback. /// </summary> void Start() { if (instance == null) { instance = this; } else { Debug.LogError("Two instances of ResizeListenerScript not supported"); } mScreenWidth = Screen.width; mScreenHeight = Screen.height; mDelay = CHECK_INTERVAL; mListeners = new UnityEvent(); }
/// <summary> /// Script starting callback. /// </summary> void Start() { DebugEx.Verbose("ResizeListenerScript.Start()"); if (sInstance == null) { sInstance = this; } else { DebugEx.Error("Two instances of ResizeListenerScript not supported"); } mScreenWidth = Screen.width; mScreenHeight = Screen.height; mDelay = CHECK_INTERVAL; mListeners = new UnityEvent(); }