public override void OnInspectorGUI() { base.BeginProperties(showColor: true); EditorGUILayout.PropertyField(propGeometry); ShapesUI.DrawTypeSwitchButtons(propSides, SideCountTypes, indexToPolygonPreset); //ShapesUI.EnumButtonRow(); // todo EditorGUILayout.PropertyField(propSides); EditorGUILayout.PropertyField(propRoundness); ShapesUI.FloatInSpaceField(propRadius, propRadiusSpace); EditorGUILayout.PropertyField(propHollow); using (new EditorGUI.DisabledScope(propHollow.boolValue == false || propHollow.hasMultipleDifferentValues)) ShapesUI.FloatInSpaceField(propThickness, propThicknessSpace); ShapesUI.AngleProperty(propAngle, "Angle", propAngUnitInput, angLabelLayout); ShapesUI.DrawAngleSwitchButtons(propAngUnitInput); bool canEditInSceneView = propRadiusSpace.hasMultipleDifferentValues || propRadiusSpace.enumValueIndex == (int)ThicknessSpace.Meters; using (new EditorGUI.DisabledScope(canEditInSceneView == false)) discEditor.GUIEditButton(); fillEditor.DrawProperties(this); base.EndProperties(); }
void DrawAngleProperties(DiscType selectedType) { using (new EditorGUI.DisabledScope(selectedType.HasSector() == false && serializedObject.isEditingMultipleObjects == false)) { ShapesUI.AngleProperty(propAngRadiansStart, "Angle start", propAngUnitInput, angLabelLayout); ShapesUI.AngleProperty(propAngRadiansEnd, "Angle end", propAngUnitInput, angLabelLayout); ShapesUI.DrawAngleSwitchButtons(propAngUnitInput); } }