Skip to main content

Class SurveyVisualPresetsDrawer

Custom property drawer for displaying SurveyVisualPresets as a custom property field in the scriptable object or project settings..

[CustomPropertyDrawer(typeof(SurveyVisualPresets))]
public class SurveyVisualPresetsDrawer : PropertyDrawer

Inheritance​

Methods​

CreatePropertyGUI(SerializedProperty)​

Creates custom GUI with UI Toolkit for the property.

public override VisualElement CreatePropertyGUI(SerializedProperty property)

Parameters​

NameTypeDescription
propertySerializedPropertyThe SerializedProperty to make the custom GUI for.

Returns​

VisualElement — The element containing the custom GUI.

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​

NameTypeDescription
positionRectRectangle on the screen to use for the property GUI.
propertySerializedPropertyThe SerializedProperty to make the custom GUI for.
labelGUIContentThe label of this property.
  • Methods
    • CreatePropertyGUI(SerializedProperty)
    • OnGUI(Rect, SerializedProperty, GUIContent)