public enum rfcEnumMyObject : byte
{
ReservedForZero, //don't use zero as an rfcID
MyRFCFunction
}
public class MyObjectScript : MonoBehaviour
{
public TNObject tno;
int x = 0;
void Update()
{
if(x == 1)
{
tno.Send((byte)rfcEnumMyObject.MyRFCFunction, TNet.Target.All);
}
}
[RFC((byte)rfcEnumMyObject.MyRFCFunction)]
void MyRFCFunction()
{
x = 1;
}
}