Example #1
0
    void Awake()
    {
        if (singleton != null)
        {
            Debug.Log("GENERATOR MidiKeyboardInput already in scene.");
            Destroy(this);
            return;
        }

        singleton = this;

        if (OnInitialized != null)
        {
            OnInitialized(this);
        }
    }
Example #2
0
 void OnDestroy()
 {
     singleton = null;
 }