Example #1
0
 void Awake()
 {
     //Debug.Log("Awake MidiPlayerGlobal");
     if (instance != null && instance != this)
     {
         Destroy(gameObject);    // remove previous instance
     }
     else
     {
         //DontDestroyOnLoad(gameObject);
         instance = this;
         instance.StartCoroutine(instance.InitThread());
     }
 }