Skip to content

Conversation

@NoelStephensUnity
Copy link
Collaborator

Backport of #3181

This PR resolves the issue where a NetworkObject instance with a NetworkBehaviour that includes one or more NetworkVariableBase derived class properties persists between network sessions is not having its NetworkVariableBase.Initialize method invoked again when spawned again. This resulted in clients not being updated to changes in the NetworkVariableBase derived class properties for a period of time equal to the duration of the last spawned time frame from its previous network session.

MTTB-881

Changelog

  • Fixed: Issue where NetworkVariableBase derived classes were not being re-initialized if the associated NetworkObject instance was not destroyed and respawned.

Testing and Documentation

  • Includes new integration test NetworkVariableBaseInitializesWhenPersisted.
  • No documentation changes or additions were necessary.

Back-port of  #3181 final fix.
The test to validate this PR.
Only log something if we have something to log.
remove verbose mode.
adding changelog entry
@NoelStephensUnity NoelStephensUnity marked this pull request as ready for review January 24, 2025 20:52
@NoelStephensUnity NoelStephensUnity requested a review from a team as a code owner January 24, 2025 20:52
@NoelStephensUnity NoelStephensUnity enabled auto-merge (squash) January 24, 2025 20:52
@NoelStephensUnity NoelStephensUnity merged commit c032b55 into develop Jan 24, 2025
22 of 24 checks passed
@NoelStephensUnity NoelStephensUnity deleted the fix/networkvariablebase-not-being-reinitialized-if-networkobject-persists-between-sessions-back-port branch January 24, 2025 21:38
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