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

OwnerNetworkAnimator.SetTrigger not immediately triggered for Owner = Server case

Open LaPluses opened this issue 4 months ago • 1 comments

Description

I copy paste this OwnerNetworkAnimator script, and find it has issue when the owner is server.

And am using the traditional CS mode, not the DistributedAuthorityMode.

The issue is here NetworkAnimation.cs.

Image

When the server is the owner(and sure it's the host), its SetTrigger will not immediately call InternalSetTrigger() function.

But if it's not the server, then everything goes well, it will immediately trigger(because we override OnIsServerAuthoritative function and IsServerAuthoritative actually the delegate call of it).

From my understanding, the OwnerNetworkAnimator is to make the owner trigger any animation changes immediately, so it should do same for the server = owenr case, and i do believe this is a bug.

Reproduce Steps

I've already explained in Description section.

Actual Outcome

When the owner is the server, its SetTrigger not immedidately triggered in local client.

Expected Outcome

Neither the owner is server or not, it's SetTrigger call should be immediately triggered.

Screenshots

Already posted the screenshot for the code.

Environment

  • OS: Windows.
  • Unity Version: Unity 6
  • Netcode Version: 2.4.4
  • Netcode Commit: N/A
  • Netcode Topology: Client-Server

Additional Context

N/A

LaPluses avatar Aug 02 '25 17:08 LaPluses

@LaPluses Thank you for bringing this to our attention! I am marking this for triage. 👍

NoelStephensUnity avatar Aug 04 '25 14:08 NoelStephensUnity