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