Ejemplo n.º 1
0
 public static void LoadMidiSet()
 {
     try
     {
         MidiPlayerGlobal.CurrentMidiSet = MidiSet.Load(Path.Combine(Application.dataPath, MidiPlayerGlobal.PathToMidiSet));
         if (MidiPlayerGlobal.CurrentMidiSet.MidiFiles == null)
         {
             MidiPlayerGlobal.CurrentMidiSet.MidiFiles = new List <string>();
         }
     }
     catch (System.Exception ex)
     {
         MidiPlayerGlobal.ErrorDetail(ex);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Load setup MPTK from resource
 /// </summary>
 private static void LoadMidiSetFromRsc()
 {
     try
     {
         TextAsset sf = Resources.Load <TextAsset>(MidiPlayerGlobal.FilenameMidiSet);
         if (sf == null)
         {
             Debug.LogWarning("No Midi set found. Create a midi set from the menu Tools/Midi Player Toolkit");
         }
         else
         {
             //UnityEngine.Debug.Log(sf.text);
             CurrentMidiSet = MidiSet.LoadRsc(sf.text);
         }
     }
     catch (System.Exception ex)
     {
         MidiPlayerGlobal.ErrorDetail(ex);
     }
 }