Skip to content

How to use RPCs correctly unclear for new users #958

@LukeStampfli

Description

@LukeStampfli

Feedback
There are a few ways to wrongly define an RPC. If a user wrongly defines an RPC they get no error message at compile or runtime and instead the RPC is executed like a regular C# function.

  • Making a static function into an RPC.
  • Defining an RPC on a MonoBehaviour instead of NetworkBehaviour.

I encountered this issue very frequently when helping users on Discord.

Suggested Changes
We can try to solve this with better documentation but I doubt that will help much.

We should have clear feedback when writing MLAPI code when a user is defining a wrong RPC. Roslyn Analysers might be able to provide that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:lowThis issue has low priority and will take some time to be resolvedstat:importStatus - Issue is going to be saved internallytype:feedbackIssue contains feedback and not specific bug or feature requests.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions