Created
June 6, 2025 22:29
-
-
Save nikescar1/e6de6c48437d6d7a57ed053b2076d832 to your computer and use it in GitHub Desktop.
Example - Excluding Tools scene from builds
This file contains hidden or 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
| #if UNITY_EDITOR | |
| var loadSceneParams = new LoadSceneParameters(); | |
| loadSceneParams.loadSceneMode = LoadSceneMode.Additive; | |
| EditorSceneManager.LoadSceneAsyncInPlayMode("Assets/Scenes/Tools.unity", loadSceneParams); | |
| #endif |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Put this in an initialization script.
Point to the path of the scene in the project (don't forget to include "Assets").