-
Notifications
You must be signed in to change notification settings - Fork 463
fix: networkvariable not synchronizing changes made during spawn or post-spawn. #3878
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 13 commits into
develop-2.0.0
from
fix/networkvariable-onspawned-missing
Feb 11, 2026
Merged
fix: networkvariable not synchronizing changes made during spawn or post-spawn. #3878
NoelStephensUnity
merged 13 commits into
develop-2.0.0
from
fix/networkvariable-onspawned-missing
Feb 11, 2026
Conversation
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
OwnerModifiedTests was not properly spawning from the non-session owner client (it was spawning with ownership on the session owner side). NetworkVariableCollectionTests is showing an issue with changes for only the host instance and only within the TestDictionaryCollections (has to do with trying to add and then reverting vs the tracked changes).
Member
|
Are you sure you linked the correct PR as the regression root? (you linked CoreCLR update) |
Member
Author
Yeah it was supposed to be #3664... |
Fixed the issue in the `TestDictionaryCollections` test where clients that did not have the initial added target changes for server changes when running a host. Now, upon clients spawning players locally on the clients, the server write dictionary that is already populated by the host will have the added target changes injected during spawn to assure the changes match. (This is only for this specific test when running the host `TestFixture` pass.
michalChrobot
approved these changes
Feb 11, 2026
EmandM
approved these changes
Feb 11, 2026
NoelStephensUnity
added a commit
that referenced
this pull request
Feb 11, 2026
…ost-spawn. (#3878) * fix Fixing the issue with the missing `OnSpawned` override within `NetworkVariable`. * test Adding a general test for scenarios like this one. * update Adding changelog entry. * style Adding comments for clarity of what `OnSpawned` and the call to `PostNetworkVariableWrite` is for. Removing trailing whitespaces. * refactor Just apply the changes to the NetworkVariable instance and not all NetworkVariables of the NetworkBehaviour. * style correcting the comment. * fix Very similar to NetworkList (we might collapse the OnSpawned logic into NetworkVariableBase. * test-fix OwnerModifiedTests was not properly spawning from the non-session owner client (it was spawning with ownership on the session owner side). NetworkVariableCollectionTests is showing an issue with changes for only the host instance and only within the TestDictionaryCollections (has to do with trying to add and then reverting vs the tracked changes). * test Narrowed down the issue to the changes tracked (i.e. added, removed, changed, unchanged) not matching when running a host but when comparing the actual dictionaries that all passes... * test Removing developer logging. * test - fix Fixed the issue in the `TestDictionaryCollections` test where clients that did not have the initial added target changes for server changes when running a host. Now, upon clients spawning players locally on the clients, the server write dictionary that is already populated by the host will have the added target changes injected during spawn to assure the changes match. (This is only for this specific test when running the host `TestFixture` pass. * style removing unused debug related script. * update Based on peer review, folding the same logic for spawn authority resetting dirty once spawned to assure no duplicate changes are sent.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a regression bug introduced in #3664
Purpose of this PR
This PR fixes the issue where
NetworkVariablewas not properly synchronizing to changes made by the spawn and write authority duringOnNetworkSpawnandOnNetworkPostSpawn.Jira ticket
UUM-134322
fix: #3876
Changelog
NetworkVariablewas not properly synchronizing to changes made by the spawn and write authority duringOnNetworkSpawnandOnNetworkPostSpawn.Documentation
Testing & QA (How your changes can be verified during release Playtest)
Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by new automated testsNetworkVariableGeneralTestsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?If any boxes above are checked the QA team will be automatically added as a PR reviewer.
Backports
This does not require a backport.