예제 #1
0
        public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
        {
            position.height = singleLine;
            if (string.IsNullOrEmpty(label.text))
            {
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("X"), property, 4, 0, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("Y"), property, 4, 1, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("Z"), property, 4, 2, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("W"), property, 4, 3, false, false);
            }
            else
            {
                EditorGUI.LabelField(position, label);

                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("X"), property, 5, 1, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("Y"), property, 5, 2, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("Z"), property, 5, 3, false, false);
                property.Next(true);
                EditorDrawersUtilities.DrawPropertyWidthIndexed(position, new GUIContent("W"), property, 5, 4, false, false);
            }
        }
예제 #2
0
 public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
 {
     EditorDrawersUtilities.DrawPropertyWidthIndexed(position, label, property, GetAttribute.totalAmount, GetAttribute.index, GetAttribute.expandToWidth);
 }