Ejemplo n.º 1
0
    private void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(this.gameObject);
            return;
        }

        instance = this;
        DontDestroyOnLoad(this.gameObject);
    }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (instance == null && instance != this)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 3
0
 private void Awake()
 {
     if (_BPeerMInstance != null && _BPeerMInstance != this)
     {
         Destroy(this.gameObject);
     }
     else
     {
         _BPeerMInstance = this;
         DontDestroyOnLoad(this.gameObject);
     }
 }