SendNetworkedMethod
to send a method/event over the network. The parameters you send much much 1:1 in type and order to the parameters of the method/event you are calling. Otherwise this will crash the UdonBehaviour. public override void Interact()
{
SendMethodNetworked(nameof(CoolMethod), SyncTarget.All, Time.time, new DataToken(transform.position), new DataToken(transform.rotation), new DataToken(Networking.LocalPlayer));
}
public override void Interact()
{
otherBehaviour.SendMethodNetworked(nameof(OtherBehaviourClass.CoolMethod), SyncTarget.All, Time.time, new DataToken(transform.position), new DataToken(transform.rotation), new DataToken(Networking.LocalPlayer));
}
public void CoolMethod(float time, Vector3 position, Quaternion rotation, VRCPlayerApi player)
{
Debug.Log($"{time} - {position} - {rotation} - {player.displayName}");
}
com.miner28.networked-event-caller
未設定
3.1.13
2019.4.31f1 以降
なし
なし
なし
未設定