Skip to content

test: Parenting manual test updates for PR-2146 #2207

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

Merged

Conversation

NoelStephensUnity
Copy link
Collaborator

This PR includes some adjustments to the parenting manual test.
This is a companion PR to #2146.
Merge after #2146 is merged.

Testing and Documentation

  • Includes manual test updates.

NoelStephensUnity and others added 30 commits August 17, 2022 13:48
This fixes the issue with the client-side keeping the world position when parenting during initial spawning and when parenting post-spawn.
We should set the position to zero and the quaternion to identity when parenting with the world position stays disabled.
updated comment
minor addition to the same comment.
Code clarity.

Co-authored-by: Jesse Olmer <[email protected]>
Code clarity.

Co-authored-by: Jesse Olmer <[email protected]>
Changing the property name to m_WorldPositionStays.
Re-organized the order in which we write and read this value.
Only writing the value in the ParentSyncMessage if we are reparented (not sure why we wouldn't be).
Setting WorldPositionStays when sending  ParentSyncMessage in OnTransformParentChanged.
To better handle late joining players with synchronizing NetworkObjects, added parent child sorting to the SceneEventData's synchronization serialization process.

Added world position stays parameter to CreateLocalNetworkObject to preserve worldPostionStays.
Adding the integration test for this fix.
Setting position before parenting.
Added the same logic for in-scene placed NetworkObjects.
Testing with and without WorldPositionStays.
removing unnecessary conditions in the  SortParentedNetworkObjects metod.
updated the comments to reflect the changes.
This fixes some edge case scenarios and issues with parenting in-scene placed NetworkObjects.
One in particular is to provide the local space position and rotation in ParentSyncMessage if the WorldPositionStays value is false.  The server might maintain the original local space values and upon being reparented it re-applies the local space values.  This is only pertinent if the user decides they don't want to use a NetworkTransform for the NetworkObject in question.

Fixed an issue with despawning objects if the WorldPositionStaysTest fails during the integration test. Migrating this to teardown resolves the issue.
removing extra CR/LF
fixing reversed order of local vs world space rotation assignment.
Updating the test with varying child position and rotation values.
adding two entries to the changelog.
adjusted one of the entries for clarity.
Updating comment to further explain the need for the added local space position and rotation properties.
Fixing missed size calculation adjustment.
Made deserialization read size calculations look like the serialization write size calculations for code readability/clarity.
NoelStephensUnity and others added 23 commits September 27, 2022 12:05
Adding one more entry for this PR
…on' into test/parenting-manual-test-updates-companion-pr-2146
…on' into test/parenting-manual-test-updates-companion-pr-2146
…on' into test/parenting-manual-test-updates-companion-pr-2146
adjusting a comma to the previous comment line for readability.
…on' into test/parenting-manual-test-updates-companion-pr-2146
adjusted lossyScale comment that was missing "if".
…on' into test/parenting-manual-test-updates-companion-pr-2146
…on' into test/parenting-manual-test-updates-companion-pr-2146
Updating comment for clarity as per Kitty's suggestion.
Replacing WriteValuePacked and ReadValuePacked with WriteValueBitPacked and ReadValueBitPacked.
…on' into test/parenting-manual-test-updates-companion-pr-2146
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) October 5, 2022 15:59
@NoelStephensUnity NoelStephensUnity merged commit 9f44f65 into develop Oct 5, 2022
@NoelStephensUnity NoelStephensUnity deleted the test/parenting-manual-test-updates-companion-pr-2146 branch October 5, 2022 19:12
jakobbbb pushed a commit to GooseGirlGames/com.unity.netcode.gameobjects that referenced this pull request Feb 22, 2023
)

This PR includes updates to the In-Scene Object Parenting manual test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants