-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: now you can assign scenes even if not in Editor (#1576)
* feat: now you can assign scenes even if not in Editor Instead of using scene name, scenes are now identified by path. This fixes a couple problems: 1) In the room example, now you can assign the scenes even if they have not been added to the editor. This was a constant pain because if you open the offlinescene, all the scenes got wiped. You had to add the scenes to the editor and reassign them all again. With this PR you will still need to add them to the editor, but they will remain assigned. 2) It is possible for multiple scenes to have the same name, but it is not possible for multiple scenes to have the same path. So this is a more robust way to identify scenes This also greatly simplifies the scene SceneDrawer BREAKING CHANGE: You will need to reassign your scenes after upgrade * Automatically fix properties that were using name If you open a NetworkManager or other gameobject that uses a scene name it now gets converted to scene path by the SceneDrawer * Use get scene by name * Scene can never be null * Update Assets/Mirror/Examples/AdditiveScenes/Scenes/MainScene.unity * Issue warning if we drop the scene * Issue error if scene is lost * Add suggestion on how to fix the error * Keep backwards compatibility, check for scene name * cache the active scene * Update Assets/Mirror/Editor/SceneDrawer.cs Co-Authored-By: James Frowen <jamesfrowendev@gmail.com> * GetSceneByName only works if scene is loaded * Remove unused using Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
- Loading branch information
1 parent
8c6ae0f
commit c8a1a5e
Showing
7 changed files
with
44 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters