Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

Purpose of this PR

This includes a fix for the forum reported issue-1693204 where spawning with ownership in a distributed authority topology where the owner is not the spawn authority, and the network prefab being spawned has NetworkBehaviour script that sets a NetworkVariable during OnNetworkSpawn, then the changes made would not be synchronized.

Jira ticket

Not assigned yet.

Changelog

  • Fixed: WIP

Documentation

  • No documentation changes or additions were necessary.

Testing & QA (How your changes can be verified during release Playtest)

Functional Testing

Manual testing :

  • Manual testing done

Automated tests:

  • [ X ] Covered by existing automated tests
  • [ X ] Covered by new automated tests

Does 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

No back port is required.

This includes a fix for the forum reported issue where spawning with ownership in a distributed authority topology where the owner is not the spawn authority, the owner/authority sets a NetworkVariable during OnNetworkSpawn, then the changes made would not be synchronized.
This adds an integration test to validate the fix for this PR.
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review November 4, 2025 23:57
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner November 4, 2025 23:57
removing an IDE injected namespace that is never usedd.
This migrates the NetworkList specific script from NetworkBehaviour.InternalOnNetworkSpawn into NetworkList itself.

It also provides (currently) two internal virtual methods, NetworkVariableBase.OnSpawned and NetworkVariableBase.OnPreDespawn, to provide a means for NetworkList to handle cleaning its dirty state up after the instance with write permissions has finished running through the spawn stages (pre-spawn, spawning, post-spawn, gets invoked).
Adding some debug information to NetworkShowHideTests.
Replacing m_ServerNetworkManager in OwnerModifiedTests with GetAuthorityNetworkManager() to become CMB service testing compatible.
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