Tanoda
SampleMessageListener.cs
Go to the documentation of this file.
1
9using UnityEngine;
10
16public class SampleMessageListener : MonoBehaviour
17{
18 // Invoked when a line of data is received from the serial device.
19 void OnMessageArrived(string msg)
20 {
21 //Debug.Log("Message arrived: " + msg);
22 }
23
24 // Invoked when a connect/disconnect event occurs. The parameter 'success'
25 // will be 'true' upon connection, and 'false' upon disconnection or
26 // failure to connect.
27 void OnConnectionEvent(bool success)
28 {
29 if (success)
30 Debug.Log("Connection established");
31 else
32 Debug.Log("Connection attempt failed or disconnection detected");
33 }
34}
UnityEngine.Debug Debug
Definition: TanodaServer.cs:19