fix: mixed authority nested NetworkTransform stops updating non-authority nested NetworkTransforms - #4169
fix: mixed authority nested NetworkTransform stops updating non-authority nested NetworkTransforms#4169NoelStephensUnity wants to merge 8 commits into
Conversation
|
Check the configuration's TOML syntax, permitted settings, and size limit. See the error below. Error message: 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 please review again |
Review SummaryThe latest updates cleanly address the previous feedback:
A minor suggestion was left inline regarding an initial baseline assertion in 🤖 Helpful? 👍/👎 |
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-2.0.0 #4169 +/- ##
=================================================
+ Coverage 74.10% 74.14% +0.03%
=================================================
Files 172 172
Lines 28127 28144 +17
=================================================
+ Hits 20844 20867 +23
+ Misses 7283 7277 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
EmandM
left a comment
There was a problem hiding this comment.
Looks good, mostly just worried about the number of tests added
| [TestFixture(HostOrServer.Host, NetworkTransform.AuthorityModes.Server)] | ||
| [TestFixture(HostOrServer.Host, NetworkTransform.AuthorityModes.Owner)] | ||
| [TestFixture(HostOrServer.Server, NetworkTransform.AuthorityModes.Server)] | ||
| [TestFixture(HostOrServer.Server, NetworkTransform.AuthorityModes.Owner)] |
There was a problem hiding this comment.
Do we need both host and server tests here? Seems overkill maybe?
There was a problem hiding this comment.
Looking into this.
| private void MovePlayers() | ||
| { | ||
| foreach (var networkManager in m_NetworkManagers) | ||
| foreach (var networkManager in m_ClientNetworkManagers) |
There was a problem hiding this comment.
Why do we only want the client managers rather than all managers?
There was a problem hiding this comment.
Reviewing an alternate approach for this.
This was specific to the issue being resolved which only occurs with a dedicated server (i.e. has no client).
| private NetworkObject GetAuthorityInstance(NetworkManager player, NetworkTransform.AuthorityModes authorityMode) | ||
| { | ||
| var authority = authorityMode == NetworkTransform.AuthorityModes.Server ? m_ServerNetworkManager : player; | ||
| return authority.SpawnManager.SpawnedObjects[player.LocalClient.PlayerObject.NetworkObjectId]; |
There was a problem hiding this comment.
It's probably worth moving a function like this down into the base NetcodeIntegrationTest. A GetManagersInstance or something like that.
There was a problem hiding this comment.
Agreed it belongs in the base. Moving it there.
Purpose of this PR
This resolves the 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).
fix: #4159
Jira ticket
UUM-153570
Changelog
NetworkTransforminstances can stop child/nestedNetworkTransforminstances from updating due to a parent (root or otherwise)NetworkTransformthat is the authority instance will remove theNetworkObjectcompletely from the non-authority update group causing non-authority instances to never update their state (interpolating or not) on the authority side.Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes 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
Requires an up-port.
Backports
No back-port required.