Created
July 9, 2020 06:48
-
-
Save Flavelius/a6bbcb31dc026388c9cbd9e3306a87cf to your computer and use it in GitHub Desktop.
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
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
static class EditorSceneSettingsExtension | |
{ | |
[SettingsProvider] | |
public static SettingsProvider CreateStartSceneSettingsProvider() | |
{ | |
var provider = new SettingsProvider("Project/Editor/PlayModeStart", SettingsScope.Project) | |
{ | |
label = "Playmode Start", | |
guiHandler = searchContext => | |
{ | |
EditorSceneManager.playModeStartScene = EditorGUILayout.ObjectField("Startup Scene", EditorSceneManager.playModeStartScene, typeof(SceneAsset), false) as SceneAsset; | |
}, | |
keywords = new HashSet<string> {"Playmode", "Scene", "Startup"} | |
}; | |
return provider; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment