feat: OnConnectionEvent callback usage in project and Utilities package [MTTB-1147] by fernando-cortez · Pull Request #907 · Unity-Technologies/com.unity.multiplayer.samples.coop

Conversation

@fernando-cortez

Description

This PR upgrades the project to use the OnConnectionEvent callback from Netcode for GameObjects, in favour over the unrecommended OnClientConnected/OnClientDisconnected callbacks.

This PR also removes an unnecessary Despawn invocation on a NetworkObject that is already marked to despawn with owner.

Issue Number(s)

MTTB-1147

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

NoelStephensUnity

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@fernando-cortez fernando-cortez changed the title feat: OnConnectionEvent callback usage in project and Utilities package feat: OnConnectionEvent callback usage in project and Utilities package [MTTB-1147]

Apr 7, 2025

kalmanbalint

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

kalmanbalint

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀