Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save nikescar1/e6de6c48437d6d7a57ed053b2076d832 to your computer and use it in GitHub Desktop.

Select an option

Save nikescar1/e6de6c48437d6d7a57ed053b2076d832 to your computer and use it in GitHub Desktop.
Example - Excluding Tools scene from builds
#if UNITY_EDITOR
var loadSceneParams = new LoadSceneParameters();
loadSceneParams.loadSceneMode = LoadSceneMode.Additive;
EditorSceneManager.LoadSceneAsyncInPlayMode("Assets/Scenes/Tools.unity", loadSceneParams);
#endif
@nikescar1
Copy link
Author

Put this in an initialization script.

Point to the path of the scene in the project (don't forget to include "Assets").

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment