Commit 15263c7
authored
fix: NetworkTransform fails to sync multiple state updates (#3614)
## Purpose of this PR
This PR resolves an issue where a client, under above average latency
and packet loss conditions, could receive multiple `NetworkTransform`
state updates in one frame and when processing the state updates only
the last state update would be applied to the transform.
fix: #3571
### Jira ticket
[MTTB-1530](https://jira.unity3d.com/browse/MTTB-1530)
### Changelog
[//]: # (updated with all public facing changes - API changes, UI/UX
changes, behaviour changes, bug fixes. Remove if not relevant.)
- Fixed: Issue where a client, under above average latency and packet
loss conditions, could receive multiple `NetworkTransform` state updates
in one frame and when processing the state updates only the last state
update would be applied to the transform if interpolation was disabled.
<!-- Uncomment and mark items off with a * if this PR deprecates any
API:
### Deprecated API
- [ ] An `[Obsolete]` attribute was added along with a `(RemovedAfter
yyyy-mm-dd)` entry.
- [ ] An [api
updater](https://confluence.unity3d.com/display/DEV/Obsolete+API+updaters)
was added.
- [ ] Deprecation of the API is explained in the CHANGELOG.
- [ ] The users can understand why this API was removed and what they
should use instead.
-->
## Documentation
[//]: # (
This section is REQUIRED and should mention what documentation changes
were following the changes in this PR.
We should always evaluate if the changes in this PR require any
documentation changes.
)
- No documentation changes or additions were necessary.
## Testing & QA
[//]: # (
This section is REQUIRED and should describe how the changes were tested
and how should they be tested when Playtesting for the release.
It can range from "edge case covered by unit tests" to "manual testing
required and new sample was added".
Expectation is that PR creator does some manual testing and provides a
summary of it here.)
### Functional Testing
[//]: # (If checked, List manual tests that have been performed.)
_Manual testing :_
- [X] `Manual testing done`
-
[PR-46](https://github.cds.internal.unity3d.com/unity/Asteroids-CMB-NGO-Sample/pull/46)
manual test.
_Automated tests:_
- [ ] `Covered by existing automated tests`
- [X] `Covered by new automated tests`
_Does the change require QA team to:_
- [ ] `Review automated tests`?
- [ ] `Execute manual tests`?
If any boxes above are checked, please add QA as a PR reviewer.
## Backport
This is an NGO v2.x only issue.1 parent 506d525 commit 15263c7
File tree
3 files changed
+70
-1
lines changed- com.unity.netcode.gameobjects
- Runtime/Components
- Tests/Runtime/NetworkTransform
3 files changed
+70
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3003 | 3003 | | |
3004 | 3004 | | |
3005 | 3005 | | |
3006 | | - | |
| 3006 | + | |
3007 | 3007 | | |
3008 | 3008 | | |
3009 | 3009 | | |
| |||
3052 | 3052 | | |
3053 | 3053 | | |
3054 | 3054 | | |
| 3055 | + | |
3055 | 3056 | | |
3056 | 3057 | | |
3057 | 3058 | | |
| |||
Lines changed: 66 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
40 | 106 | | |
41 | 107 | | |
42 | 108 | | |
| |||
0 commit comments