RequiredAttributeDrawer Class

Summary

[Editor-Only] [Pro-Only] A custom drawer for fields with a InspectorGadgets.Attributes.RequiredAttribute.
graph BT Type-->Base0["ObjectDrawer"] click Base0 "/inspector-gadgets/api/InspectorGadgets.Editor.PropertyDrawers/ObjectDrawer" Base0-->Base1["PropertyDrawer"] Type["RequiredAttributeDrawer"] class Type type-node

Syntax

[CustomPropertyDrawer(typeof(RequiredAttribute))]
public sealed class RequiredAttributeDrawer : ObjectDrawer

Attributes

Type Description
CustomPropertyDrawer

Fields

Name Constant Value Summary
AlwaysShowGet
Should the get button always be visible?
Inherited from ObjectDrawer
static
ItaliciseSelfReferences
Should references to components on the same object be italicised?
Inherited from ObjectDrawer
static
ObjectEditorNestLimit
The number of nesting levels allowed.
Inherited from ObjectDrawer
static

Methods

Name Value Summary
GetPropertyHeight(SerializedProperty, GUIContent) float
Initialize(FieldInfo) void
Initializes this attribute to check the value of the specified `property`.
Initialize(PropertyInfo) void
Initializes this attribute to check the value of the specified `property`.
IsDefaultValue(Object) bool
Does the attributed member on the specified `obj` still have its default value?
IsDefaultValue(Serialization.PropertyAccessor, Object) bool
Does the attributed member on the specified `obj` still have its default value?
OnGUI(Rect, SerializedProperty, GUIContent) void
ToString() string
Returns the full name of the attributed field or property.