protected virtual void Awake() { try { HelperNoteLabel.Init(); //MidiPlayerGlobal.Init(); audiosources = new List <AudioSource>(); } catch (System.Exception ex) { MidiPlayerGlobal.ErrorDetail(ex); } }
//public static void InitPath() //{ // if (string.IsNullOrEmpty(MPTK_PathToResources)) // Debug.Log("MPTK_PathToResources not defined"); // else // { // PathToSoundfonts = MPTK_PathToResources + SoundfontsDB; // PathToMidiFile = MPTK_PathToResources + MidiFilesDB; // PathToMidiSet = MPTK_PathToResources + FilenameMidiSet + ExtensionSoundFileDot; // } //} void Awake() { HelperNoteLabel.Init(); //Debug.Log("Awake MidiPlayerGlobal"); if (instance != null && instance != this) { Destroy(gameObject); // remove previous instance } else { //DontDestroyOnLoad(gameObject); instance = this; Routine.RunCoroutine(instance.InitThread(), Segment.RealtimeUpdate); } InitPath(); }
private MidiPlayerGlobal() { HelperNoteLabel.Init(); }