Unity-Technologies / com.unity.netcode.gameobjects

Netcode for GameObjects is a high-level netcode SDK that provides networking capabilities to GameObject/MonoBehaviour workflows within Unity and sits on top of underlying transport layer.
MIT License
2.1k stars 430 forks source link

fix: Avoid duplicate RPC invocation on host #2834

Closed miniwolf closed 4 months ago

miniwolf commented 4 months ago

Host acts as both client and server. Both the client target and the server target points to same instance This results in two invocations on the host which is not expected Checking that the server is host and skipping the RpcTarget invocation we avoid this situation

Host executes "Rpc NotMe" twice with each call (1.8.0)

Changelog

Testing and Documentation