public override void OnGUI(Rect initialRect, SerializedProperty property, GUIContent label)
        {
            loadSceneBtnRect = new Rect(initialRect.x + GUI.skin.label.CalcSize(new GUIContent(LOAD_SCENE_BTN_TEXT + 100)).x, initialRect.y + defaultLineHeight, GUI.skin.label.CalcSize(new GUIContent(LOAD_SCENE_BTN_TEXT + 50)).x, defaultLineHeight);
            sceneDefinitions = property.serializedObject.targetObject as SceneDefinitions;

            base.OnGUI(initialRect, property, label);
        }
Esempio n. 2
0
    public static void LoadSceneAndItsSubscenesEditor(CompositeScene parentCompositeScene, SceneDefinitions sceneDefinitions)
    {
        //load root scene additively
        EditorSceneManager.OpenScene(sceneDefinitions.RootScenePath, OpenSceneMode.Single);

        //unload previous scenes to avoid nullrefs

        EditorSceneManager.OpenScene(parentCompositeScene.ScenePath, OpenSceneMode.Additive);

        OpenSubScenesRecursivelyEditor(parentCompositeScene);
    }