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

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