Skip to content

fix: AnticipatedNetworkVariable not updating previous value [MTTB-1036] (back port) #3322

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

Conversation

NoelStephensUnity
Copy link
Collaborator

Back-port of #3306.

This fixes the issue where the AnticipatedNetworkVariable previous value was never updated on the non-authority/write permission instances when the OnAuthoritativeValueChanged callback was invoked.

MTTB-1036

Changelog

  • Fixed: Issue where the AnticipatedNetworkVariable previous value was never updated on the non-authority/write permission instances when the OnAuthoritativeValueChanged callback was invoked.

Testing and Documentation

  • Includes integration test NetworkVariableAnticipationTests.PreviousValueIsMaintainedProperly.
  • No documentation changes or additions were necessary.

Fixing issue where the AnticipatedNetworkVariable previous value was not being properly set on non-authority instances.
Adding test to validate the fix.
Adding change log entry.
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) February 25, 2025 19:20
NoelStephensUnity added a commit that referenced this pull request Feb 25, 2025
…6] (#3306)

This fixes the issue where the `AnticipatedNetworkVariable` previous
value was never updated on the non-authority/write permission instances
when the `OnAuthoritativeValueChanged` callback was invoked.

[MTTB-1036](https://jira.unity3d.com/browse/MTTB-1036)

Back port: #3322

## Changelog

- Fixed: Issue where the `AnticipatedNetworkVariable` previous value was
never updated on the non-authority/write permission instances when the
`OnAuthoritativeValueChanged` callback was invoked.

## Testing and Documentation

- Includes integration test
`NetworkVariableAnticipationTests.PreviousValueIsMaintainedProperly`.
- 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.
-->
@NoelStephensUnity NoelStephensUnity merged commit 5969784 into develop Feb 25, 2025
40 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/anticipatednetworkvariable-not-updating-previousvalue-back-port branch February 25, 2025 23:50
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.

2 participants