Skip to content

fix: NetworkVariables with NetworkVariableUpdateTraits can cause other NetworkVariables to drop changes (up-port) #3466

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

@NoelStephensUnity NoelStephensUnity commented May 28, 2025

This PR resolves an issue where a NetworkBehaviour with multiple NetworkVariables could drop changes if one of the NetworkVariables has unique NetworkVariableUpdateTraits set, is dirty, but is not ready to send.

Based on user @khyperia's submission #3462.

Changelog

  • Fixed: issue where NetworkVariables on a NetworkBehaviour could fail to synchronize changes if one has NetworkVariableUpdateTraits set and is dirty but is not ready to send.

Testing and Documentation

  • Includes integration test NetworkVariableTraitsTests.WhenNonTraitsIsDirtyButTraitsIsNotReadyToSend.
  • No documentation changes or additions were necessary.

Backport

This is an up-port of #3465

Adding change log entry.
@NoelStephensUnity NoelStephensUnity changed the title fix: NetworkVariables sometimes drop changes fix: NetworkVariables with NetworkVariableUpdateTraits can cause other NetworkVariables to drop changes (up-port) May 28, 2025
Adding up-port version of the NetworkVariableTraitsTests.
Includes modifications to make it distributed authority integration test compatible.
Updating log entry to match changes in v1.x PR.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review May 28, 2025 20:19
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner May 28, 2025 20:19
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) May 28, 2025 20:19
Use the authorityComponent's NetworkManager to avoid exception during DA service tests.
NoelStephensUnity added a commit that referenced this pull request May 28, 2025
…r NetworkVariables to drop changes (#3465)

This PR resolves an issue where a `NetworkBehaviour` with multiple
`NetworkVariables` could drop changes if one of the `NetworkVariables`
has unique `NetworkVariableUpdateTraits` set, is dirty, but is not ready
to send.

Based on user @khyperia's submission #3462.

## Changelog

- Fixed: issue where `NetworkVariable`s on a `NetworkBehaviour` could
fail to synchronize changes if one has `NetworkVariableUpdateTraits` set
and is dirty but is not ready to send.

## Testing and Documentation

- Includes integration test
`NetworkVariableTraitsTests.WhenNonTraitsIsDirtyButTraitsIsNotReadyToSend`.
- No documentation changes or additions were necessary.

<!-- 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] 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.
-->

## Backport

This required and up-port to v2.x (#3466)

---------

Co-authored-by: khyperia <[email protected]>
@NoelStephensUnity NoelStephensUnity merged commit 6a16349 into develop-2.0.0 May 29, 2025
42 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/netvar-dropping-changes-khyperia-up-port branch May 29, 2025 15:21
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