com.unity.netcode.gameobjects icon indicating copy to clipboard operation
com.unity.netcode.gameobjects copied to clipboard

Warning in DA when using [Rpc(SendTo.NotOwner)]

Open KadaXuanwu opened this issue 1 year ago • 0 comments

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

  1. Set up a Unity project using NGO 2.0.0 (Sep 16, 2024 release).
  2. Enable Distributed Authority mode.
  3. 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

image

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]

Additional Context

KadaXuanwu avatar Oct 05 '24 08:10 KadaXuanwu