void OnDestroy() { if (s_instance == this) { s_instance = null; } }
//------------------------------------------------------ // unity system function //------------------------------------------------------ void Awake() { Assert.IsTrue(s_instance == null || s_instance == this, "BackEventNotifier alread exists."); s_instance = this; }