Skip to content

Custom Serialization can't be used because of compile-time error in RPCs. #665

Closed
@Dziii

Description

@Dziii

Describe the bug
RPCs with parameters that are not built in types trigger a compile time error.
This prevents us from using the custom serialization described here: https://mp-docs.dl.it.unity3d.com/docs/advanced-topics/custom-serialization

To Reproduce

  1. Create an RPC with a parameter you plan to have custom serialization for.
    IE: public void ExampleServerRPC(Vector2Int v2i)
    {
    }

  2. Observe that the Unity Editor returns "error - RPC method parameter does not support serialization: UnityEngine.Vector2Int"
    as a compile-time error

Expected behavior
No compile-time error. Instead, unity returns a run-time error if a non built in type isn't registered with custom serialization.

Environment (please complete the following information):

  • OS: Windows 10
  • Unity Version: 2020.3.1f1
  • MLAPI Version: Experimental Release 0.1.0

Metadata

Metadata

Assignees

Labels

priority:blockerThis issue is a blocker for other issues and should be resolved as soon as possibletype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions