fix: fixing order of components in GameObject containing a NetworkObject component [MTT-6239] by LPLafontaineB · Pull Request #866 · Unity-Technologies/com.unity.multiplayer.samples.coop
Description
This PR moves NetworkObject components above NetworkBehaviours in component order in networked GameObjects. This fixes a bug where during scene unloading the NetworkBehaviours would be destroyed before the NetworkObject on the host, which caused these NetworkBehaviours to not have their OnNetworkDespawned invoked in that situation on the host.
Issue Number(s)
Contribution checklist
- 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
- An Index entry has been added in readme.md if applicable