-
Notifications
You must be signed in to change notification settings - Fork 463
fix: NetworkShow followed by ChangeOwnership generates ownership message error on target client #3468
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
NoelStephensUnity
merged 14 commits into
develop-2.0.0
from
fix/networkshow-ownership-change-extra-ownership-message
Jun 2, 2025
Merged
fix: NetworkShow followed by ChangeOwnership generates ownership message error on target client #3468
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
6172c88
fix
NoelStephensUnity fe577ca
test
NoelStephensUnity d8cd263
style
NoelStephensUnity 247b512
style
NoelStephensUnity 3132ac0
update
NoelStephensUnity 1c8d423
update
NoelStephensUnity 7e6c91b
test - fix
NoelStephensUnity c409a98
fix
NoelStephensUnity 8c0ad0f
update
NoelStephensUnity fd77043
Merge branch 'develop-2.0.0' into fix/networkshow-ownership-change-ex…
NoelStephensUnity 3a0f367
test
NoelStephensUnity 0b6522a
update
NoelStephensUnity 83f09b7
update
NoelStephensUnity e6bcbfd
update
NoelStephensUnity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -80,6 +80,8 @@ namespace Unity.Netcode.RuntimeTests | |
| internal class NetworkTransformTests : NetworkTransformBase | ||
| { | ||
| protected const int k_TickRate = 60; | ||
|
|
||
| protected const int k_DefaultTimeTravelFrames = 1000; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just out of interest, what does this change do? |
||
| /// <summary> | ||
| /// Constructor | ||
| /// </summary> | ||
|
|
@@ -749,11 +751,11 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t | |
| if (overideState == OverrideState.CommitToTransform) | ||
| { | ||
| // Wait for the deltas to be pushed | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"[Position] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!"); | ||
| } | ||
|
|
||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatch(), 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => PositionsMatch(), k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"Timed out waiting for positions to match {m_AuthoritativeTransform.transform.position} | {m_NonAuthoritativeTransform.transform.position}"); | ||
|
|
||
| // test rotation | ||
|
|
@@ -784,12 +786,12 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t | |
| if (overideState == OverrideState.CommitToTransform) | ||
| { | ||
| // Wait for the deltas to be pushed | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"[Rotation] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!"); | ||
| } | ||
|
|
||
| // Make sure the values match | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationsMatch(), 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => RotationsMatch(), k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"Timed out waiting for rotations to match"); | ||
|
|
||
| m_AuthoritativeTransform.StatePushed = false; | ||
|
|
@@ -818,12 +820,12 @@ public void TestAuthoritativeTransformChangeOneAtATime([Values] TransformSpace t | |
| if (overideState == OverrideState.CommitToTransform) | ||
| { | ||
| // Wait for the deltas to be pushed | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => m_AuthoritativeTransform.StatePushed, k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"[Rotation] Timed out waiting for state to be pushed ({m_AuthoritativeTransform.StatePushed})!"); | ||
| } | ||
|
|
||
| // Make sure the scale values match | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleValuesMatch(), 600); | ||
| success = WaitForConditionOrTimeOutWithTimeTravel(() => ScaleValuesMatch(), k_DefaultTimeTravelFrames); | ||
| Assert.True(success, $"Timed out waiting for scale values to match"); | ||
| } | ||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I like this!