Hello,
I have a custom property drawer to print an integer vector as read-only value.
The code is like this:
[CustomPropertyDrawer(typeof(IntVector4))]
public class IntVector4Drawer : PropertyDrawer
{
public override void OnGUI(Rect Position, SerializedProperty Property, GUIContent Label)
{
IntVector4 Vector = new IntVector4(
Property.FindPropertyRelative("mX").intValue,
Property.FindPropertyRelative("mY").intValue,
Property.FindPropertyRelative("mZ").intValue,
Property.FindPropertyRelative("mW").intValue
);
EditorGUI.BeginProperty(Position, Label, Property);
Position = EditorGUI.PrefixLabel(Position, Label);
EditorGUI.PropertyField(Position, Property, new GUIContent(Vector.ToString()));
EditorGUI.EndProperty();
}
}
Basically everything works: The values are visible in the inspector as read-only values. However the values have this little folding arrow at the side and I can fold and unfold them, even if there is no content to unfold. Is there any possibility to get rid of this folding symbol?
This is an image:
![]()
