示例#1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            EditorGUILayout.LabelField("Rounding", EditorStyles.boldLabel);

            Rect rect = EditorGUILayout.GetControlRect(false, 2);

            rect.x     = 0.0f;
            rect.y    -= 1.0f;
            rect.width = Screen.width;
            EditorGUI.DrawRect(rect, new Color(86.0f / 255.0f, 86.0f / 255.0f, 86.0f / 255.0f, 1));

            PropertyDrawerHelpers.ShapeRoundingsDrawer(position, property, label);
        }
示例#2
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            SerializedProperty topWidth     = property.FindPropertyRelative("topWidth");
            SerializedProperty middleHeight = property.FindPropertyRelative("middleHeight");

            EditorGUI.PropertyField(position, topWidth);
            EditorGUI.PropertyField(EditorGUILayout.GetControlRect(), middleHeight);

            EditorGUILayout.GetControlRect(false, 15);

            EditorGUILayout.LabelField("Rounding", EditorStyles.boldLabel);

            Rect rect = EditorGUILayout.GetControlRect(false, 2);

            rect.x     = 0.0f;
            rect.y    -= 1.0f;
            rect.width = Screen.width;
            EditorGUI.DrawRect(rect, new Color(86.0f / 255.0f, 86.0f / 255.0f, 86.0f / 255.0f, 1));

            PropertyDrawerHelpers.ShapeRoundingsDrawer(position, property, label);
        }
示例#3
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            SerializedProperty resolution  = property.FindPropertyRelative("resolution");
            SerializedProperty innerRadius = property.FindPropertyRelative("innerRadius");
            SerializedProperty roundType   = property.FindPropertyRelative("roundType");

            EditorGUI.PropertyField(position, resolution);
            EditorGUI.PropertyField(EditorGUILayout.GetControlRect(), innerRadius);
            roundType.boolValue = GUILayout.Toggle(roundType.boolValue, "Round Dents", "Button");

            EditorGUILayout.GetControlRect(false, 15);

            EditorGUILayout.LabelField(new GUIContent("Rounding", "Adjust The Mesh Type"), EditorStyles.boldLabel);

            Rect rect = EditorGUILayout.GetControlRect(false, 2);

            rect.x     = 0.0f;
            rect.y    -= 1.0f;
            rect.width = Screen.width;
            EditorGUI.DrawRect(rect, new Color(86.0f / 255.0f, 86.0f / 255.0f, 86.0f / 255.0f, 1));

            PropertyDrawerHelpers.ShapeRoundingsDrawer(position, property, label);
        }