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); } }
public void LoadScene(SceneDataScriptable scene) { SceneManager.LoadScene(scene.sceneId); data = scene; }