protected void Awake() { if (listener != null) { Destroy(gameObject); } listener = this; GlobalEventListener.SetListener(this); }
protected void OnDestroy() { listener = null; }
public static void SetListener(GlobalEventListenerBehaviour listener) { GlobalEventListener.listener = listener; }