Пример #1
0
    public override void OnInspectorGUI()
    {
        SceneDataScriptable script = target as SceneDataScriptable;

        DrawDefaultInspector();
        script.sceneId = EditorGUILayout.Popup("Scene To Load", script.sceneId, scenes);

        GUILayout.Space(5);

        if (GUILayout.Button("Reload Scenes"))
        {
            string sceneId = scenes[script.sceneId];
            LoadScenes();
            script.sceneId = Find(sceneId);
        }
    }
Пример #2
0
 public void LoadScene(SceneDataScriptable scene)
 {
     SceneManager.LoadScene(scene.sceneId);
     data = scene;
 }