protected void DrawModuleEditor(string path, string label, ref bool toggled, ref Editor editor) { EditorHelpers.DrawLine(); var module = serializedObject.FindProperty(path).objectReferenceValue; EditorHelpers.DrawFoldoutEditor(label, module, ref toggled, ref editor); }
protected override void DrawModuleEditors() { base.DrawModuleEditors(); string floorPath = GetPath(FLOOR_HEIGHTMAP_NAME); string outlinePath = GetPath(OUTLINE_NAME); DrawModuleEditor(floorPath, FLOOR_HEIGHTMAP_LABEL, ref drawFloorHeightMapEditor, ref floorHeightMapEditor); DrawModuleEditor(outlinePath, OUTLINE_MODULE_LABEL, ref drawOutlineEditor, ref outlineEditor); EditorHelpers.DrawLine(); }
protected override void DrawModuleEditors() { base.DrawModuleEditors(); string floorPath = GetPath(FLOOR_HEIGHTMAP_NAME); string ceilingPath = GetPath(CEILING_HEIGHTMAP_NAME); string wallPath = GetPath(WALL_MODULE_NAME); DrawModuleEditor(floorPath, FLOOR_HEIGHTMAP_LABEL, ref drawFloorEditor, ref floorEditor); DrawModuleEditor(ceilingPath, CEILING_HEIGHTMAP_LABEL, ref drawCeilingEditor, ref ceilingEditor); DrawModuleEditor(wallPath, WALL_MODULE_LABEL, ref drawWallEditor, ref wallEditor); EditorHelpers.DrawLine(); }
protected override void DrawModuleEditors() { base.DrawModuleEditors(); EditorHelpers.DrawLine(); var floorHeightMap = serializedObject.FindProperty(FLOOR_HEIGHTMAP_PATH).objectReferenceValue; EditorHelpers.DrawFoldoutEditor(FLOOR_HEIGHTMAP_LABEL, floorHeightMap, ref drawFloorHeightMapEditor, ref floorHeightMapEditor); EditorHelpers.DrawLine(); var ceilingModule = serializedObject.FindProperty(CEILING_HEIGHTMAP_PATH).objectReferenceValue; EditorHelpers.DrawFoldoutEditor(CEILING_HEIGHTMAP_LABEL, ceilingModule, ref drawCeilingHeightMapEditor, ref ceilingHeightMapEditor); EditorHelpers.DrawLine(); }
protected override void DrawModuleEditors() { base.DrawModuleEditors(); EditorHelpers.DrawLine(); var floorHeightMap = serializedObject.FindProperty(FLOOR_HEIGHTMAP_PATH).objectReferenceValue; EditorHelpers.DrawFoldoutEditor(FLOOR_HEIGHTMAP_LABEL, floorHeightMap, ref drawFloorHeightMapEditor, ref floorHeightMapEditor); EditorHelpers.DrawLine(); var outlineModule = serializedObject.FindProperty(OUTLINE_MODULE_PATH).objectReferenceValue; EditorHelpers.DrawFoldoutEditor(OUTLINE_MODULE_LABEL, outlineModule, ref drawOutlineEditor, ref outlineEditor); EditorHelpers.DrawLine(); }
void DrawModuleEditors() { // Note: this will almost definitely need rewriting once new cave gen types are implemented - we're taking // advantage of the fact that both current types make use of both a map gen module and a floor heightmap module. EditorHelpers.DrawLine(); DrawModuleEditor(MAP_GEN_MODULE_LABEL, MAP_GEN_NAME, ref drawMapGenEditor, ref mapGenEditor); EditorHelpers.DrawLine(); DrawModuleEditor(FLOOR_HEIGHTMAP_LABEL, FLOOR_HEIGHTMAP_NAME, ref drawFloorHeightMapEditor, ref floorHeightMapEditor); EditorHelpers.DrawLine(); if (caveGenType == CaveGeneratorUI.CaveGeneratorType.ThreeTiered) { DrawModuleEditor(CEILING_HEIGHTMAP_LABEL, CEILING_HEIGHTMAP_NAME, ref drawCeilingHeightMapEditor, ref ceilingHeightMapEditor); EditorHelpers.DrawLine(); } if (caveGenType == CaveGeneratorUI.CaveGeneratorType.RockOutline) { DrawModuleEditor(OUTLINE_MODULE_LABEL, OUTLINE_NAME, ref drawOutlineEditor, ref outlineEditor); EditorHelpers.DrawLine(); } }
protected virtual void DrawModuleEditors() { EditorHelpers.DrawLine(); EditorHelpers.DrawFoldoutEditor(MAP_GEN_MODULE_LABEL, GetMapGenModule(), ref drawMapGenEditor, ref mapGenEditor); }