Ejemplo n.º 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());
     }
 }
Ejemplo n.º 2
0
        //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();
        }