Tanoda
SampleMessageListener.cs
Go to the documentation of this file.
1
9
using
UnityEngine
;
10
16
public
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
}
Debug
UnityEngine.Debug Debug
Definition:
TanodaServer.cs:19
SampleMessageListener
Definition:
SampleMessageListener.cs:17
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
Ardity
Scripts
Samples
SampleMessageListener.cs
Generated by
1.9.3