Incorrect Beta documentation
|KitKat|
The beta documentation U# example for
Sending Events with Parameters
has a compile error.The example is completely missing the first parameter of
NetworkCalling.SendCustomNetworkEvent
which should be (IUdonEventReceiver)this
.Here's the corrected snippet:
```cs
using UdonSharp;
using UnityEngine;
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
public class EnumDefaultTest : UdonSharpBehaviour
{
public override void Interact()
{
NetworkCalling.SendCustomNetworkEvent((IUdonEventReceiver)this, NetworkEventTarget.All, nameof(PrintMessage), "VRCat", 11);
}
[NetworkCallable]
public void PrintMessage(string name, int age)
{
Debug.Log($"Congratulations on your {age}th birthday, {name}!");
}
}
```
Log In