Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Critical Bug on NGO 2.2.0) Child NetworkTransforms (Owner Authority) causes the main NetworkTransform (Server Authority) in the root/parent to stop synching between client and host. #3205

Open
Ermelious opened this issue Jan 15, 2025 · 4 comments
Assignees
Labels
priority:high This issue has high priority and we are focusing to resolve it stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report

Comments

@Ermelious
Copy link

Ermelious commented Jan 15, 2025

Unity 6000
Netcode 2.2.0
1x Editor, 1x Windows Build

Child NetworkTransforms (Owner Authority) causes the main NetworkTransform (Server Authority) in the root/parent to stop synching with client.

Edit:
I've even tested this by simply removing all Nested NetworkTransform, leaving only the main root NetworkTransform on the Player Network Object/Prefab.
I then create a new empty gameobject inside the PlayerObject, attach a NetworkTransform, set it to Owner Authority, and the issue is replicated. The Root NetworkTransform no longer syncs between the Host and Client player.

Image

Here’s my Player Object NetworkTransform Setup:

Image

And here’s the 4 NetworkTransforms setup attached in the children of the Player Object above:

Image

My Setup: (The highlighted gameobjects have NetworkTransforms attached to them, only the one in the root object "Porky" has been set to "Server" Authority. The rest of the NetworkTransforms have been set to "Owner" Authority and the "Local Space" checkbox is ticked as seen)

Image

I'm also using the Unity Rig Package components here:

Image

The Issue:
On 1 of the non-hosting Client, I press the arrow keys to move the character. The input is sent to the hosting player/server and the server takes the input and moves the playerobject while the networktransform syncs the position of the playerobject with the client. This works with no issues UNTIL I attach 4 new networktransform component to the children objects/IK (Head, Spine, Hand, Gun). With these new components attached, the Player Object only moves on the Server side. The PlayerObject’s NetworkTransform does not sync the movement back to the client. However the 4 new NetworkTransform components on the children object syncs with the Server with no issues.

To summarize what I’m trying to do:

  1. 4 IK/GameObjects (Children of the Player Object) that are moved on the Client side when the player moves the cursor (Gun, Spine, Head, Hand). These 4 objects have each their own NetworkTransform component attached to them. (These are all set to “Owner” Authority)
    2.. Player movement is handled on the Server side (The main Player Object has a NetworkTransform set to “Server” Authority.)I’m using a mixture of the “constraints” component in the unity’s rig package to move the character’s IK/bones. This is a similar setup rig setup I have which is based of this tutorial:
    https://youtu.be/fB0P0C_3sPU?si=l2EofpT0Zs_pa-kI

I need to know if this is a bug/limitation or if it is something I did wrong in my setup that is causing this issue.

@Ermelious Ermelious added stat:awaiting triage Status - Awaiting triage from the Netcode team. type:support Questions or other support labels Jan 15, 2025
@Ermelious Ermelious changed the title (Is this a bug?) Child NetworkTransforms causes the main NetworkTransform in the root/parent to stop synching with client. (Critical Bug on NGO 2.2.0) Child NetworkTransforms (Owner Authority) causes the main NetworkTransform (Server Authority) in the root/parent to stop synching between client and host. Jan 16, 2025
@NoelStephensUnity
Copy link
Collaborator

Hi @Ermelious,
I think I see some areas where this combination of server and owner authoritative motion models could cause issues with some of the automatic synchronization of child NetworkTransforms. Since I don't have your project I will try to replicate it based on your above instructions and then see if making a few adjustments will resolve the issue.

Will post back here if I think I have a fix.
(changing this from support to a bug)

@NoelStephensUnity NoelStephensUnity added type:bug Bug Report stat:Investigating Issue is currently being investigated and removed type:support Questions or other support labels Jan 16, 2025
@michalChrobot michalChrobot added stat:awaiting response Status - Awaiting response from author. and removed stat:awaiting response Status - Awaiting response from author. labels Jan 17, 2025
@Ermelious
Copy link
Author

Hi @NoelStephensUnity ,
Thanks for the response! If it is indeed a bug, I'll definitely be appreciative if there is a way to download your fix or if the fix can be pushed into an NGO 2.2.1 (since this does seems to be quite a breaking bug) that would be great as well.

@NoelStephensUnity
Copy link
Collaborator

@Ermelious ,

I believe I have a fix in place, but I still need to run it through CI validation tests and we need to run additional manual tests to make sure the changes don't impact anything else. While we do this, could you update your project's manifest file's com.unity.netcode.gameobjects entry to the below:

"com.unity.netcode.gameobjects": "https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git?path=com.unity.netcode.gameobjects#fix/nested-networktransforms-different-authorities",

Then if you wouldn't mind seeing if this resolves your issue it would be greatly appreciated. While the I believe the manual test I put together to replicate the issue (which I was able to do) covers this specific use case scenario, it would be helpful if you could verify this fix within your project to make sure I am not missing something specific to your project's setup.

If you run into issues, please continue providing similar details about any additional issues you notice so we can make sure this fix covers your project's needs.

@Ermelious
Copy link
Author

Ermelious commented Jan 17, 2025

@Ermelious ,

I believe I have a fix in place, but I still need to run it through CI validation tests and we need to run additional manual tests to make sure the changes don't impact anything else. While we do this, could you update your project's manifest file's com.unity.netcode.gameobjects entry to the below:

"com.unity.netcode.gameobjects": "https://github.com/Unity-Technologies/com.unity.netcode.gameobjects.git?path=com.unity.netcode.gameobjects#fix/nested-networktransforms-different-authorities",

Then if you wouldn't mind seeing if this resolves your issue it would be greatly appreciated. While the I believe the manual test I put together to replicate the issue (which I was able to do) covers this specific use case scenario, it would be helpful if you could verify this fix within your project to make sure I am not missing something specific to your project's setup.

If you run into issues, please continue providing similar details about any additional issues you notice so we can make sure this fix covers your project's needs.

Thank you for the fix! And yes I've just tested it in Unity Editor 6000.0.32f1 (Hosting Player), Windows Build (Client) and the issue seems to have been resolved! I'll continue testing and will update if there's any other related issue to this one.

The Hosting Player and the Client Player are both synching correctly this time with the Root Network Transform (Server Authority) and 4 nested NetworkTransform (Owner Authority) (Gun, Hand, Head and Spine)

Editor/Hosting Player (Top), Windows Build/Client (Bottom)
Image

@NoelStephensUnity NoelStephensUnity added stat:import Status - Issue is going to be saved internally priority:high This issue has high priority and we are focusing to resolve it and removed stat:awaiting triage Status - Awaiting triage from the Netcode team. stat:Investigating Issue is currently being investigated labels Jan 17, 2025
@michalChrobot michalChrobot added stat:imported Status - Issue is tracked internally at Unity and removed stat:import Status - Issue is going to be saved internally labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:high This issue has high priority and we are focusing to resolve it stat:imported Status - Issue is tracked internally at Unity type:bug Bug Report
Projects
None yet
Development

No branches or pull requests

3 participants