- Home /
Add/Remove scene to build settings from editor script and run levels in editor
I am creating a script that run automated tests on a unity project. Before launching the tests, I want to add the needed tests scenes to the build settings and then run the editor.
So far, I used the EditorBuildSettings.scenes property. I succeeded to add the proper scenes (When I open the build settings window, the scenes appears in the list). But when I run the editor, it tells me that it cannot load a scene because it is not in the build settings.
I suspect that the human-driven window "sets" dirty the settings, so the EditorBuildSettings.scenes
modification from an editor script is not taken into account.
Your answer
Follow this Question
Related Questions
Cancel build in PostProcessScene? 0 Answers
Enter play mode from editor script after baking is complete 0 Answers
DestroyImmediate(component.gameObject) destroys component but not gameObject 1 Answer
Editor Coroutines and Playmode 0 Answers
How to keep Unity Editor TCP client and Tcp Server static variables when entering PlayMode 0 Answers