public static PositioningSettingsSpline CreatePosSettings(MapSplineOutMark1 output) { PositioningSettingsSpline ps = new PositioningSettingsSpline { objHeight = output.objHeight, relativeHeight = output.relativeHeight, guiHeight = output.guiHeight, isRandomYaw = output.isRandomYaw, useRotation = output.useRotation, takeTerrainNormal = output.takeTerrainNormal, rotateYonly = output.rotateYonly, regardPrefabRotation = output.regardPrefabRotation, guiRotation = output.guiRotation, offset = output.offset, offsetRange = output.offsetRange, mergeSegments = output.mergeSegments, spacingFromScale = output.spacingFromScale, spacing = output.spacing, spacingRange = output.spacingRange, guiPositionSettings = output.guiPositionSettings, scale = output.scale, scaleRange = output.scaleRange, useScale = output.useScale, scaleYonly = output.scaleYonly, regardPrefabScale = output.regardPrefabScale, guiScale = output.guiScale }; return(ps); }
public static void DrawPositioningSettings(PositioningSettingsSpline posSettings, bool billboardRotWaring = false, bool showRelativeHeight = true) { // height // Cell.EmptyLinePx(1); //using (Cell.LinePx(0)) //using (new Draw.FoldoutGroup(ref posSettings.guiHeight, "Height")) // if (posSettings.guiHeight) // { // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.objHeight, "Object Height"); // // if (showRelativeHeight) // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.relativeHeight, "Relative Height"); // } //rotation Cell.EmptyLinePx(1); using (Cell.LinePx(0)) using (new Draw.FoldoutGroup(ref posSettings.guiRotation, "Rotation")) if (posSettings.guiRotation) { using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.isRandomYaw, "Random Yaw?"); //using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.useRotation, "Use Rotation"); //using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.takeTerrainNormal, "Terrain Normal"); //using (Cell.LineStd) //{ // Cell.current.disabled = posSettings.takeTerrainNormal; // Draw.ToggleLeft(ref posSettings.rotateYonly, "Rotate Y Only"); // //} // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.regardPrefabRotation, "Use Prefab Rot."); if (billboardRotWaring) { using (Cell.LinePx(40)) Draw.Helpbox("Note that Unity billboard trees could not be rotated"); Cell.EmptyLinePx(2); } } Cell.EmptyLinePx(1); using (Cell.LinePx(0)) using (new Draw.FoldoutGroup(ref posSettings.guiPositionSettings, "Mesh Options")) if (posSettings.guiPositionSettings) { // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.useScale, "Use Scale"); // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.scaleYonly, "Scale Y Only"); //using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.regardPrefabScale, "Use Prefab Scale"); using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.mergeSegments, "Segment Merge?"); using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.spacingFromScale, "Spacing from Scale"); using (Cell.LineStd) { Cell.current.disabled = posSettings.spacingFromScale; Draw.Field(ref posSettings.spacing, "Spacing"); } using (Cell.LineStd) Draw.Field(ref posSettings.spacingRange, "Spacing Range"); using (Cell.LineStd) Draw.Field(ref posSettings.offset, "Start Offset"); using (Cell.LineStd) Draw.Field(ref posSettings.offsetRange, "Offset Range"); //using (Cell.LineStd) //{ // Cell.EmptyRowPx(18); // using (Cell.Row) Draw.Label("Scale"); //} } //scale Cell.EmptyLinePx(1); using (Cell.LinePx(0)) using (new Draw.FoldoutGroup(ref posSettings.guiScale, "Scale")) if (posSettings.guiScale) { // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.useScale, "Use Scale"); // using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.scaleYonly, "Scale Y Only"); //using (Cell.LineStd) Draw.ToggleLeft(ref posSettings.regardPrefabScale, "Use Prefab Scale"); using (Cell.LineStd) Draw.Field(ref posSettings.scale, "Mesh Scale"); using (Cell.LineStd) Draw.Field(ref posSettings.scaleRange, "Scale Range"); //using (Cell.LineStd) //{ // Cell.EmptyRowPx(18); // using (Cell.Row) Draw.Label("Scale"); //} } }