public override void OnInspectorGUI() { if (HasErrors()) { return; } BeginEditing(); OnPreInspectorGUI(); DropDownProperty("Type", _typeProperty, RampTypeLabels, RampTypeValues, true, true); DropDownProperty("Image Mode", _imageAlignmentProperty, RampImageAlignmentLabels, RampImageAlignmentValues, true); if (_foldoutGeometry = EditorGUILayout.BeginFoldoutHeaderGroup(_foldoutGeometry, "Geometry")) { PropertyField(_heightTopProperty, "Top Height", true); PropertyField(_heightBottomProperty, "Bottom Height", true); EditorGUILayout.Space(10); PropertyField(_widthTopProperty, "Top Width", true); PropertyField(_widthBottomProperty, "Bottom Width", true); EditorGUILayout.Space(10); if (MainComponent.IsWireRamp) { EditorGUILayout.LabelField("Wire Ramp"); EditorGUI.indentLevel++; PropertyField(_wireDiameterProperty, "Diameter", true); PropertyField(_wireDistanceXProperty, "Distance X", true); PropertyField(_wireDistanceYProperty, "Distance Y", true); EditorGUI.indentLevel--; } else { EditorGUILayout.LabelField("Wall Mesh"); EditorGUI.indentLevel++; PropertyField(_leftWallHeightVisibleProperty, "Left Wall", true, updateVisibility: true); PropertyField(_rightWallHeightVisibleProperty, "Right Wall", true, updateVisibility: true); EditorGUI.indentLevel--; } } EditorGUILayout.EndFoldoutHeaderGroup(); DragPointsHelper.OnInspectorGUI(this); base.OnInspectorGUI(); EndEditing(); }
public override void OnInspectorGUI() { if (HasErrors()) { return; } BeginEditing(); OnPreInspectorGUI(); PropertyField(_insertHeightProperty, rebuildMesh: true); PropertyField(_positionZProperty, updateTransforms: true); DragPointsHelper.OnInspectorGUI(this); base.OnInspectorGUI(); EndEditing(); }
public override void OnInspectorGUI() { if (HasErrors()) { return; } BeginEditing(); OnPreInspectorGUI(); PropertyField(_rotationProperty, rebuildMesh: true); PropertyField(_heightProperty, rebuildMesh: true); PropertyField(_thicknessProperty, rebuildMesh: true); DragPointsHelper.OnInspectorGUI(this); base.OnInspectorGUI(); EndEditing(); }
public override void OnInspectorGUI() { if (HasErrors()) { return; } BeginEditing(); OnPreInspectorGUI(); PropertyField(_positionProperty, updateTransforms: true); PropertyField(_scaleProperty, updateTransforms: true); PropertyField(_rotationProperty, updateTransforms: true); PropertyField(_surfaceProperty, updateTransforms: true); DragPointsHelper.OnInspectorGUI(this); base.OnInspectorGUI(); EndEditing(); }
public override void OnInspectorGUI() { if (HasErrors()) { return; } BeginEditing(); OnPreInspectorGUI(); PropertyField(_heightTopProperty, "Top Height", true, onChanged: () => { WalkChildren(PlayfieldComponent.transform, UpdateSurfaceReferences); }); PropertyField(_heightBottomProperty, "Bottom Height", true); DragPointsHelper.OnInspectorGUI(this); base.OnInspectorGUI(); EndEditing(); }