This section provides information on compatibility and support for Unity Netcode for GameObjects (Netcode) features compared to previous Netcode versions. See the Release Notes for more information.
Learn more about standard RPC API's cross-compatibility only, not the framework as a whole. A method marked as RPC will be statically registered with its assembly-scoped method signature hash.
A typical assembly-scoped method signature sample:
Game.dllis the Assembly
/is a Separator
System.Void Shooter::PingServerRpc(System.Int32,MLAPI.Messaging.ServerRpcParams)is the Method signature:
System.Voidis the Return type
Shooteris the Enclosing type
::is the Scope resolution operator
PingServerRpcis the Method name
(System.Int32,MLAPI.Messaging.ServerRpcParams)is the Params with types (no param names)
An RPC signature will be turned into a 32-bit integer using xxHash (XXH32) non-cryptographic hash algorithm.
As expected, RPC signature therefore its hash will be changed if assembly, return type, enclosing type, method name and/or any method param type changes. Names of method parameters can be changed as they are not a part of the method signature.
A change in the RPC signature will lead into a different send/receive codepath with different serialization code and execute a different method body. Previous versions of the RPC method will not be executed by the new RPC method with the new signature.
|Cross-Build Compatibility||As long as the RPC method signature is kept the same, it will be compatible between different builds.|
|Cross-Version Compatibility||As long as the RPC method signature is kept the same, it will be compatible between different versions.|
|Cross-Project Compatibility||Since project name or any project-specific token is not being a part of RPC signature, it is possible to have the exact same RPC method signature defined in different builds and they are not necessarily going to be compatible with each other.|
Netcode supports RPC return values on convenience RPCs.
To achieve similar functionality, use the following: