Ejemplo n.º 1
0
        public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile)
        {
            var editorInformationsData   = editorProfile.GetModule <EditorInformations>().EditorInformationsData;
            var levelChunkPrefabCreation = editorProfile.GetModule <LevelChunkPrefabCreation>();

            this.CreateNewScene();
            var scenePath = LevelPathHelper.BuilChunkPath(InstancePath.LevelBasePath, editorInformationsData.AssociatedAdventureLevelID, editorInformationsData.LevelZoneChunkID);

            if (this.SaveScene(scenePath))
            {
                PrefabUtility.InstantiatePrefab(levelChunkPrefabCreation.CreatedPrefab);
                this.SaveScene(scenePath);
                editorProfile.AddToGeneratedObjects(new Object[] { this.CreatedSceneAsset });
            }
        }
Ejemplo n.º 2
0
        public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile)
        {
            var editorInformationsData      = editorProfile.GetModule <EditorInformations>().EditorInformationsData;
            var puzzleLevelDynamicsCreation = editorProfile.GetModule <PuzzleLevelDynamicsCreation>();

            this.CreateNewScene();
            var scenePath = LevelPathHelper.BuildBaseLevelPath(InstancePath.LevelBasePath, editorInformationsData.AssociatedAdventureLevelID, editorInformationsData.LevelZonesID);

            if (this.SaveScene(scenePath))
            {
                PrefabUtility.InstantiatePrefab(editorInformationsData.CommonGameConfigurations.PuzzleLevelCommonPrefabs.CorePuzzleSceneElements);
                PrefabUtility.InstantiatePrefab(editorInformationsData.CommonGameConfigurations.PuzzleLevelCommonPrefabs.GameManagerPersistanceInstance);
                PrefabUtility.InstantiatePrefab(puzzleLevelDynamicsCreation.CreatedPrefab);

                this.SaveScene(scenePath);
                editorProfile.AddToGeneratedObjects(new Object[] { this.CreatedSceneAsset });
            }
        }