-
Notifications
You must be signed in to change notification settings - Fork 458
Open
Labels
stat:InvestigatingIssue is currently being investigatedIssue is currently being investigatedstat:awaiting-responseAwaiting response from author. This label should be added manually.Awaiting response from author. This label should be added manually.stat:importStatus - Issue is going to be saved internallyStatus - Issue is going to be saved internallytype:bugBug ReportBug Reporttype:docsDocs feedback or issueDocs feedback or issue
Description
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
Metadata
Metadata
Assignees
Labels
stat:InvestigatingIssue is currently being investigatedIssue is currently being investigatedstat:awaiting-responseAwaiting response from author. This label should be added manually.Awaiting response from author. This label should be added manually.stat:importStatus - Issue is going to be saved internallyStatus - Issue is going to be saved internallytype:bugBug ReportBug Reporttype:docsDocs feedback or issueDocs feedback or issue