Skip to content

fix: NetworkVariable warnings on player spawns [MTT-7161] #870

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
merged 2 commits into from
Sep 18, 2023

Conversation

fernando-cortez
Copy link
Collaborator

@fernando-cortez fernando-cortez commented Sep 13, 2023

Description

This PR fixes warnings generated when modifying a NetworkVariable before a player NetworkObject was spawned. Instead the NetworkVariable is spawned before the NetworkObject is spawned, ensuring the NetworkVariable is instantiated with the new default value, and so is ready to be consumed on OnNetworkSpawn methods -- a pattern we wish to keep.

Issue Number(s)

MTT-7161

Contribution checklist

  • [ N/A ] Tests have been added for boss room and/or utilities pack
  • Release notes have been added to the project changelog file and/or package changelog file
  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • JIRA ticket ID is in the PR title or at least one commit message
  • Include the ticket ID number within the body message of the PR to create a hyperlink
  • [ N/A ] An Index entry has been added in readme.md if applicable

@fernando-cortez fernando-cortez added 2-Easy This PR is trivial and can be reviewed quickly 1-Needs Review PR needs attention from the assignee and reviewers labels Sep 13, 2023
@fernando-cortez fernando-cortez marked this pull request as ready for review September 13, 2023 20:10
@fernando-cortez fernando-cortez requested a review from a team as a code owner September 13, 2023 20:10
@fernando-cortez fernando-cortez merged commit 2a68293 into develop Sep 18, 2023
@fernando-cortez fernando-cortez deleted the fix/netvar-warnings-pre-spawn branch September 18, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1-Needs Review PR needs attention from the assignee and reviewers 2-Easy This PR is trivial and can be reviewed quickly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants