mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-03-05 07:41:10 +00:00
init: add project
This commit is contained in:
18
Assets/_Project/Develop/Editor/EntryPointSceneAutoLoader.cs
Normal file
18
Assets/_Project/Develop/Editor/EntryPointSceneAutoLoader.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
|
||||
namespace _Project.Develop.Editor
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public static class EntryPointSceneAutoLoader
|
||||
{
|
||||
static EntryPointSceneAutoLoader()
|
||||
{
|
||||
if (EditorBuildSettings.scenes.Length == 0)
|
||||
return;
|
||||
|
||||
EditorSceneManager.playModeStartScene = AssetDatabase
|
||||
.LoadAssetAtPath<SceneAsset>(EditorBuildSettings.scenes[0].path);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user