Skip to content

fix: NetworkSceneManager notifications for scene not in build settings [MTT-2941] #1828

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

Conversation

NoelStephensUnity
Copy link
Collaborator

@NoelStephensUnity NoelStephensUnity commented Mar 23, 2022

This PR improves an exception message's clarity when a scene is not included in the build list only on the client side. This only happens when running under unique scenarios (i.e. using virtual projects) where a client could be launched from an editor instance and not have the scene available when building the scene hash table.

This PR also includes a check when entering into play mode from within the editor to determine if the scene needs to be added to the scenes in build list and if so displays a dialog box to the user providing the user with the option of having it added at that time prior to entering into play mode.

MTT-2941

Changelog

com.unity.netcode.gameobjects

  • Added: editor only check prior to entering into play mode if the currently open and active scene is in the build list and if not displays a dialog box asking the user if they would like to automatically add it prior to entering into play mode.
  • Fixed: clarity for NetworkSceneManager client side notification when it receives a scene hash value that does not exist in its local hash table.

Additional Information

The dialog box message looks like this:
image

NoelStephensUnity and others added 8 commits March 23, 2022 17:48
This provides users with more meaningful information if they are using something like ParrelSync or Multiplayer Virtual projects and encounter the Scene hash does not exist in the HashToBuildIndex table exception.
This is an editor side only fix to determine if the currently opened and active scene in the editor is not in the build list and if a NetworkManager instance exists that has scene management enabled.  If so, then it will display a dialog box informing the user that the scene should be added to the scenes in build list as well as provide the user the option to have it done for them.
Fixing issue for recent update to where Unity Transport lives for Unity versions v2022.0a5 or higher.
Added summary for ScenesInBuildActiveSceneCheck
Copy link
Contributor

@TwoTenPvP TwoTenPvP left a comment

Choose a reason for hiding this comment

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

👌🏻

MTT-2941
Final changelog modification for better user notification clarity.
@0xFA11 0xFA11 changed the title fix: MTT-2941 NetworkSceneManager notifications for scene not in build settings fix: NetworkSceneManager notifications for scene not in build settings [MTT-2941] Mar 24, 2022
@NoelStephensUnity NoelStephensUnity merged commit 1a171e1 into develop Mar 24, 2022
@NoelStephensUnity NoelStephensUnity deleted the fix/networkscenemanager-notification-scene-not-in-build-settings branch March 24, 2022 15:35
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