int playerSearchNumber = -1;
void OnClick ()
{
if (tno == null)
{
Debug.LogError("Missing TNObject component on gameobject");
return;
}
if (!TNManager.isConnected)
{
Debug.LogError("Not connected to a game server");
return;
}
if (!tno.isMine)
{
Debug.LogWarning("TNObject does not belong to local player");
}
tno.Send("SetMyVariable", Target.AllSaved, (playerSearchNumber + 40));
Debug.Log("Sent RFC w/ value: " + playerSearchNumber + " (note: should be -1)");
}
[RFC]
protected void SetMyVariable (int val)
{
Debug.Log("Received RFC w/ value: " + val + "(note: should be 39)");
playerSearchNumber = val;
}