Exemplo n.º 1
0
 void Awake()
 {
     if (singleton != null && singleton != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         singleton = this;
     }
     DontDestroyOnLoad(this);
 }
Exemplo n.º 2
0
    //private Chat chat;

    void Awake()
    {
        audio2D = Audio2D.singleton;
        //chat = Chat.singleton;
    }