com.unity.netcode.gameobjects
com.unity.netcode.gameobjects copied to clipboard
Warning in DA when using [Rpc(SendTo.NotOwner)]
Description
In Distributed Authority mode, calling an RPC with the [Rpc(SendTo.NotOwner)] attribute triggers the warning:
[Invalid Target] There is no server to send to when in Distributed Authority mode!
The RPC still functions as expected, but the warning is misleading. Using for example [Rpc(SendTo.Everyone)] works without triggering a warning.
Reproduce Steps
- Set up a Unity project using NGO 2.0.0 (Sep 16, 2024 release).
- Enable Distributed Authority mode.
- Call an RPC using the
[Rpc(SendTo.NotOwner)]attribute.
Actual Outcome
The following warning is shown despite the RPC working as intended:
[Invalid Target] There is no server to send to when in Distributed Authority mode!
Expected Outcome
No warning should appear when using [Rpc(SendTo.NotOwner)] in Distributed Authority mode, as the RPC works as expected.
Screenshots
Environment
- OS: Windows 11 Pro
- Unity Version: 6000.0.16f1
- Netcode Version: 2.0.0
- Netcode Commit: [https://github.com/Unity-Technologies/com.unity.netcode.gameobjects/releases/tag/ngo%2F2.0.0]