ValueReferenceDrawer Class
Definition
Section titled “Definition”[CustomPropertyDrawer(typeof(ValueReference<>), true)]public sealed class ValueReferenceDrawer : PropertyDrawerInheritance object → UnityEditor.GUIDrawer → UnityEditor.PropertyDrawer
Methods
Section titled “Methods”CreatePropertyGUI(SerializedProperty)
Section titled “CreatePropertyGUI(SerializedProperty)”Creates custom GUI with UI Toolkit for the property.
public override VisualElement CreatePropertyGUI(SerializedProperty property)Parameters
Section titled “Parameters”property UnityEditor.SerializedProperty
The SerializedProperty to make the custom GUI for.
Returns
Section titled “Returns”UnityEngine.UIElements.VisualElement
The element containing the custom GUI.
OnGUI(Rect, SerializedProperty, GUIContent)
Section titled “OnGUI(Rect, SerializedProperty, GUIContent)”Override this method to make your own IMGUI based GUI for the property.
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)Parameters
Section titled “Parameters”position UnityEngine.Rect
Rectangle on the screen to use for the property GUI.
property UnityEditor.SerializedProperty
The SerializedProperty to make the custom GUI for.
label UnityEngine.GUIContent
The label of this property.