Description
When I put the [Rpc] attribute on top of a local function (for example, inside the Update function), this error message appears: "Unity.Netcode.Editor.CodeGen.NetworkBehaviourILPP: Assets\Scripts\Script.cs(x,x): error - Rpc method must end with 'Rpc' suffix!". This is quite confusing as the function does in fact end with the Rpc suffix. It seems the ILPP is checking the compiler-generated name for local functions (like g__SomethingRpc|0_0), which no longer ends with "Rpc"
Reproduce Steps
- Create a NetworkBehaviour class
- Inside Update(), define a local function named SomethingRpc
- Add the [Rpc] attribute
- Let it compile
- Observe the confusing error message
Expected Outcome
A more concise error message which specifies that you mustn't have Rpcs be local functions or just the ability to have Rpcs be local functions
Environment
NGO 2.5.0
Description
When I put the [Rpc] attribute on top of a local function (for example, inside the Update function), this error message appears: "Unity.Netcode.Editor.CodeGen.NetworkBehaviourILPP: Assets\Scripts\Script.cs(x,x): error - Rpc method must end with 'Rpc' suffix!". This is quite confusing as the function does in fact end with the Rpc suffix. It seems the ILPP is checking the compiler-generated name for local functions (like g__SomethingRpc|0_0), which no longer ends with "Rpc"
Reproduce Steps
Expected Outcome
A more concise error message which specifies that you mustn't have Rpcs be local functions or just the ability to have Rpcs be local functions
Environment
NGO 2.5.0