Ejemplo n.º 1
0
 void Awake()
 {
     self = this;
     try
     {
         notePrefab = Instantiate(Resources.Load(bgm.clip.name)) as GameObject;
         noteMax    = notePrefab.transform.childCount;
         serial     = new SerialLib.UnitySerial("/dev/cu.usbmodem1411", 9600, 256);
         serial.ThreadStart();
     }
     catch
     {
         Debug.LogError("error" +
                        "Resourcesに音楽の名前と同名のプレハブを作ってください(日本語NG)");
         UnityEditor.EditorApplication.isPlaying = false;
         return;
     }
 }
Ejemplo n.º 2
0
 void Start()
 {
     serial = new SerialLib.UnitySerial("/dev/cu.usbmodem1421", 9600, 256);
     serial.ThreadStart();
 }
Ejemplo n.º 3
0
 void Start()
 {
     serial = new SerialLib.UnitySerial("COM4", 115200, 256);
     serial.ThreadStart();
     animator = GetComponent <Animator> ();
 }