Skip to content

fix: [Up-port] mixed authority nested NetworkTransform stops updating non-authority nested NetworkTransforms - #4170

Open
NoelStephensUnity wants to merge 3 commits into
develop-3.x.xfrom
fix/mixed-authority-nested-transform-updates-up-port
Open

NoelStephensUnity wants to merge 3 commits into
develop-3.x.xfrom
fix/mixed-authority-nested-transform-updates-up-port

Conversation

@NoelStephensUnity

Copy link
Copy Markdown
Member

Up-port of #4169

Purpose of this PR

The NetworkManager update registration is per-NetworkObject while the authority motion model is per-NetworkTransform. On a NetworkObject whose nested NetworkTransform instances do not all share the same AuthorityMode, the first authority instance to initialize removed the entire NetworkObject from the update group, and its non-authority siblings then stopped processing their received state updates.

The removal is now gated on whether any NetworkTransform on the NetworkObject is still non-authority for that same update.

fix: #4159

Jira ticket

UUM-153570

Changelog

  • Fixed: issue with mixed authority nested NetworkTransform instances can stop child/nested NetworkTransform instances from updating due to a parent (root or otherwise) NetworkTransform that is the authority instance will remove the NetworkObject completely from the non-authority update group causing non-authority instances to never update their state (interpolating or not) on the authority side.

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

NetworkTransformMixedAuthorityTests is parameterized over HostOrServer and the root AuthorityMode, with the nested child always using the inverse mode. The (Server, Owner) pass is the one that reproduces the reported issue; all instances are now compared, including the ones that hold authority over one of the two nested NetworkTransform components.

NetworkTransformMixedMotionModelTests covers a NetworkObject that mixes both the authority motion model and the rigidbody motion model across an ownership change, so each nested NetworkTransform is registered under a different update.

The full NetworkTransform filter was run headlessly against this branch on 6000.7.0a5: 3966 passed, 0 failed, 4 skipped. The skips are the pre-existing Assert.Ignore calls in NetworkTransformOwnershipTests for UUM-152669.

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • Covered by existing automated tests
  • Covered by new automated tests

Does the change require QA team to:

  • Review automated tests?
  • Execute manual tests?
  • Provide feedback about the PR?

If any boxes above are checked the QA team will be automatically added as a PR reviewer.

Up-port

No up-port required.

Backports

No backport required.

🤖 Generated with Claude Code

… non-authority instances

Up-port of #4169.

The NetworkManager update registration is per-NetworkObject while the
authority motion model is per-NetworkTransform, so the first authority
instance to initialize removed the entire NetworkObject from the update
group and its non-authority siblings stopped being updated.

Gate the removal on whether any NetworkTransform on the NetworkObject is
still non-authority for that same update.
@NoelStephensUnity
NoelStephensUnity requested a review from a team as a code owner September 24, 2026 19:29
@u-pr

u-pr Bot commented Sep 24, 2026

Copy link
Copy Markdown

⚠️ Some settings were ignored in '.pr_agent.toml (repository root)' repo settings

Check the configuration's TOML syntax, permitted settings, and size limit. See the error below.


Error message:
Ignored prohibited settings: github_app.handle_pr_actions. Permitted settings were applied.

Configuration content:
# This is the configuration for the u-pr bot
# https://github.cds.internal.unity3d.com/unity/u-pr
# For configuration of this file:
# https://developer.portal.internal.unity.com/catalog/default/component/u-pr/docs/configuration/automatic_runs/

[github_app]
handle_pr_actions = ['opened', 'ready_for_review']  # PR events that auto-run pr_commands
pr_commands       = ["/harness-review"]             # what runs on those events
reviewer_commands = ["/harness-review"]             # what runs when @u-pr is added as reviewer

@u-pr u-pr Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Harness Review

Ship it

The change correctly preserves per-object update registration for non-authoritative nested transforms while separating standard and fixed-update motion models. I examined initialization, ownership, cleanup, and the expanded tests and found no actionable issues.

Reviewed commit b3e3545

🤖 Helpful? 👍/👎

…ng ownership

Without it the post-transfer check passes whether the NetworkObject was
unregistered or was never registered for the fixed update to begin with,
so it could not tell a transition apart from nothing having happened.
@codecov-github-com

codecov-github-com Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

@@                Coverage Diff                @@
##           develop-3.x.x    #4170      +/-   ##
=================================================
+ Coverage          78.19%   78.23%   +0.03%     
=================================================
  Files                153      153              
  Lines              26272    26289      +17     
=================================================
+ Hits               20544    20567      +23     
+ Misses              5728     5722       -6     
Flag Coverage Δ
NGOv2_project_testproject_ubuntu 77.26% <100.00%> (+0.60%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...gameobjects/Runtime/Components/NetworkTransform.cs 89.11% <100.00%> (+0.35%) ⬆️
Components Coverage Δ
com.unity.netcode.gameobjects 78.23% <100.00%> (+0.03%) ⬆️

ℹ️ Need help interpreting these results?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant