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
fix: Do not propagate in-scene value to dynamically spawned children [MTT-5357] #2396
fix: Do not propagate in-scene value to dynamically spawned children [MTT-5357] #2396
Conversation
This resolves the issue with dynamically spawned NetworkObjects that are parented under an in-scene placed NetworkObject would be marked as in-scene placed and cause client-side soft synchronization issues due to the client looking for an in-scene placed NetworkObject that was actually dynamically spawned.
Added integration test to validate this fix. This tests that both players and dynamically spawned NetworkObjects that are parented under in-scene placed NetworkObjects works and that late joining clients properly synchronize the parented status. This also validates an advanced parenting sample in our documentation works.
…amically-spawned-children
…amically-spawned-children
@@ -0,0 +1,61 @@ | |||
using UnityEngine.SceneManagement; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance there could be an automated test for this instead of only manual tests? Manual tests only catch things if someone remembers to run them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are two tests in this PR:
Manual test: this script is used in that.
Integration Test: (see ObjectParenting/ParentDynamicUnderInScenePlaced.cs
below)
They both accomplish the same thing, with the manual test being something you can visually confirm and make adjustments to in the event any future seemingly related issues are filed and need to be replicated/confirmed an issue (or debugged).
…amically-spawned-children
This resolves a regression bug with the last parenting updates where a dynamically spawned NetworkObject that was parented under an in-scene placed NetworkObject would have its InScenePlaced value set to true causing a soft synchronization error on a late joining client side.
MTT-5357
Pertains to issue #2358
Changelog
NetworkObject
parented under an in-scene placedNetworkObject
would have itsInScenePlaced
value changed totrue
. This would result in a soft synchronization error for late joining clients.Testing and Documentation