Пример #1
0
 public bool TryConnect()
 {
     try
     {
         GlobalRuntimeControl.SetDebugText("Connected");
         port.Open();
     }
     catch (IOException)
     {
         portConnected = false;
         Debug.LogWarning("Connection failed @ " + port.PortName);
         GlobalRuntimeControl.SetDebugText("Connection failed @ " + port.PortName);
         return(false);
     }
     portConnected = true;
     return(true);
 }
Пример #2
0
 void Awake()
 {
     instance = this;
 }