Ejemplo n.º 1
0
 private void OnDestroy()
 {
     if (_eventHub == this)
     {
         _eventHub = null;
     }
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (_eventHub == null)
     {
         _eventHub = this;
     }
     else
     {
         Destroy(this);
     }
 }