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 }); } }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; this.CreateAsset(InstancePath.LevelZoneChunkSceneConfigurationDataPath, editorInformationsData.LevelZoneChunkID.ToString() + NameConstants.LevelChunkSceneConfigurationData, editorProfile); this.AddToGameConfiguration(editorInformationsData.LevelZoneChunkID, editorInformationsData.CommonGameConfigurations.GetConfiguration <ChunkZonesSceneConfiguration>(), editorProfile); }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; this.UpdateLevelHierarchyConfiguration(editorInformationsData.CommonGameConfigurations.GetConfiguration <LevelHierarchyConfiguration>(), editorInformationsData.AssociatedAdventureLevelID, editorInformationsData.LevelZoneChunkID, ref editorProfile); this.UpdateLevelHierarchyConfiguration(editorInformationsData.CommonGameConfigurations.GetConfiguration <LevelHierarchyConfiguration>(), editorInformationsData.AssociatedPuzzleLevelID, editorInformationsData.LevelZoneChunkID, ref editorProfile); }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; var createdLevelManager = this.Create(InstancePath.PuzzleLevelDynamicsPath, editorInformationsData.LevelZonesID.ToString() + NameConstants.PuzzleLevelDynamics, editorProfile); createdLevelManager.LevelID = editorInformationsData.LevelZonesID; PrefabUtility.SavePrefabAsset(createdLevelManager.gameObject); }
public override void AfterGeneration(AbstractCreationWizardEditorProfile editorProfile) { var levelChunkSceneCreation = editorProfile.GetModule <LevelChunkSceneCreation>(); var serializedCreatedObject = new SerializedObject(this.CreatedObject); serializedCreatedObject.FindProperty(nameof(this.CreatedObject.scene)).objectReferenceValue = levelChunkSceneCreation.CreatedSceneAsset; serializedCreatedObject.ApplyModifiedProperties(); }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; var createdBaseChunk = this.Create(InstancePath.LevelChunkBaseLevelPrefabPath, editorInformationsData.LevelZoneChunkID.ToString() + NameConstants.BaseLevelChunkPrefab, editorProfile); createdBaseChunk.LevelChunkInteractiveObjectDefinition.LevelZoneChunkID = editorInformationsData.LevelZoneChunkID; PrefabUtility.SavePrefabAsset(createdBaseChunk.gameObject); }
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 }); } }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; var levelConfiguration = editorInformationsData.CommonGameConfigurations.GetConfiguration <LevelConfiguration>(); var createdAsset = this.CreateAsset(InstancePath.GetConfigurationDataPath(levelConfiguration), editorInformationsData.LevelZonesID.ToString() + "_" + this.GetType().BaseType.GetGenericArguments()[0].Name, editorProfile); levelConfiguration.SetEntry(editorInformationsData.LevelZonesID, createdAsset); editorProfile.GameConfigurationModified(editorInformationsData.CommonGameConfigurations.GetConfiguration <LevelConfiguration>(), editorInformationsData.LevelZonesID, createdAsset); }
public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile) { var editorInfomrationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; var inherentDataClass = editorInfomrationsData.SelectedConfiguration.GetType().BaseType.GetGenericArguments()[1]; var generateSOObjectManager = new GeneratedScriptableObjectManager <ScriptableObject>(ScriptableObject.CreateInstance(inherentDataClass), InstancePath.GetConfigurationDataPath((ScriptableObject)editorInfomrationsData.SelectedConfiguration), editorInfomrationsData.SelectedKey.ToString() + "_" + editorInfomrationsData.SelectedConfiguration.GetType().BaseType.GetGenericArguments()[0].Name); editorProfile.AddToGeneratedObjects(generateSOObjectManager.GeneratedAsset); editorInfomrationsData.SelectedConfiguration.SetEntry(editorInfomrationsData.SelectedKey, generateSOObjectManager.GeneratedAsset); EditorUtility.SetDirty((UnityEngine.Object)editorInfomrationsData.SelectedConfiguration); editorProfile.GameConfigurationModified((UnityEngine.Object)editorInfomrationsData.SelectedConfiguration, editorInfomrationsData.SelectedKey, generateSOObjectManager.GeneratedAsset); }
protected override CommonGameConfigurations GetCommonGameConfigurations(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; return(editorInformationsData.CommonGameConfigurations); }
protected override LevelZonesID GetLevelZonesID(AbstractCreationWizardEditorProfile editorProfile) { var editorInformationsData = editorProfile.GetModule <EditorInformations>().EditorInformationsData; return(editorInformationsData.LevelZonesID); }
protected override SceneAsset GetCreatedSceneAsset(AbstractCreationWizardEditorProfile editorProfile) { var sceneCreation = editorProfile.GetModule <LevelSceneCreation>(); return(sceneCreation.CreatedSceneAsset); }