If you work with multiple scenes, and use them additively you might like to start at a particular one when you press the play button in the editor.
Here's a class to help you out:
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityEngine;
[InitializeOnLoad]
public class SetStartSceneForEditor
{
static SetStartSceneForEditor()
{
if (Application.isEditor)
{
EditorSceneManager.playModeStartScene =
AssetDatabase.LoadAssetAtPath<SceneAsset>("Assets/Scenes/Container.unity");
}
}
}
Comments
Post a Comment