This topic is not available in your language. Therefore, the original version (ja-jp) is displayed.

VRC0019: NetworkCallableAttribute must be required for calling method via SendCustomNetworkEvent with parameters

PropertyValue
IDVRC0019
CategoryUsage
SeverityError
Runtime Version3.8.1 ~ latest

NetworkCallableAttribute must be required for calling method via SendCustomNetworkEvent with parameters

Example

Code with Diagnostic

using UdonSharp;
 
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
 
class TestBehaviour : UdonSharpBehaviour
{
    public void TestMethod()
    {
        SendCustomNetworkEvent(NetworkEventTarget.All, "SomeMethod", 1);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    }
 
    public void SomeMethod(int value) { }
}

Code with Fix

using UdonSharp;
 
using VRC.SDK3.UdonNetworkCalling;
using VRC.Udon.Common.Interfaces;
 
class TestBehaviour : UdonSharpBehaviour
{
    public void TestMethod()
    {
        SendCustomNetworkEvent(NetworkEventTarget.All, "SomeMethod", 1);
    }
 
    [global::VRC.SDK3.UdonNetworkCalling.NetworkCallable]
    public void SomeMethod(int value) { }
}
VRC0019: NetworkCallableAttribute must be required for calling method via SendCustomNetworkEvent with parameters / Udon Analyzer / Natsuneko Laboratory Docs