예제 #1
0
    public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile)
    {
        var levelZoneConfiguration = this.CreateAsset(InstancePath.LevelZoneSceneConfigurationDataPath, GetLevelZonesID(editorProfile) + NameConstants.LevelSceneConfigurationData, editorProfile);

        GetCommonGameConfigurations(editorProfile).GetConfiguration <LevelZonesSceneConfiguration>().SetEntry(GetLevelZonesID(editorProfile), levelZoneConfiguration);
        editorProfile.GameConfigurationModified(GetCommonGameConfigurations(editorProfile).GetConfiguration <LevelZonesSceneConfiguration>(), GetLevelZonesID(editorProfile), levelZoneConfiguration);
    }
예제 #2
0
        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);
        }
예제 #3
0
    public override void OnGenerationClicked(AbstractCreationWizardEditorProfile editorProfile)
    {
        var generatedHierarchy = this.CreateAsset(InstancePath.PuzzleLevelHierarchyDataPath, this.GetLevelZonesID(editorProfile) + NameConstants.LevelHierarchyConfigurationData, editorProfile);

        this.GetCommonGameConfigurations(editorProfile).GetConfiguration <LevelHierarchyConfiguration>().SetEntry(this.GetLevelZonesID(editorProfile), generatedHierarchy);
        editorProfile.GameConfigurationModified(this.GetCommonGameConfigurations(editorProfile).GetConfiguration <LevelHierarchyConfiguration>(), this.GetLevelZonesID(editorProfile), generatedHierarchy);

        var generatedHierarchySerialized = new SerializedObject(generatedHierarchy);

        SerializableObjectHelper.SetArray((new List <LevelZoneChunkID>()).ConvertAll(e => (Enum)e), generatedHierarchySerialized.FindProperty(nameof(generatedHierarchy.LevelHierarchy)));
        generatedHierarchySerialized.ApplyModifiedProperties();
    }
예제 #4
0
        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);
        }