Struct OptionStruct
Struct representing a single option in a survey input. Includes the type of input (e.g., radio button, slider), label, and associated configuration data for dropdowns and sliders.
[Serializable]
public struct OptionStruct
Fields
dropDownOptionData
Configuration data for dropdown options (used if the option type is Dropdown).
[Tooltip("Reference to a Dropdown configuration asset used when this option type is Dropdown.")]
public SurveyDropdownOptionData dropDownOptionData
Field Value
enableTextfield
A flag indicating whether the text field is enabled if the option type supports text input.
[FormerlySerializedAs("enable_textfield")]
[Tooltip("Enable to allow user text input when this option supports it.")]
public bool enableTextfield
Field Value
bool
label
The label/description/text displayed in the survey.
[TextArea]
[Tooltip("The label or descriptive text shown alongside this option.")]
public string label
Field Value
string
numberOnlyTextfield
A flag indicating whether only numbers are allowed in the text field when it is enabled.
[FormerlySerializedAs("number_only")]
[Tooltip("Restrict the text field input to numbers only (if text input is enabled).")]
public bool numberOnlyTextfield
Field Value
bool
sliderOptionData
Configuration data for slider options (used if the option type is Slider).
[Tooltip("Reference to a Slider configuration asset used when this option type is Slider.")]
public SurveySliderOptionData sliderOptionData
Field Value
textfieldValue
The default or current value of the text field (used if text input is enabled).
[Tooltip("The default or initial value for the text input field (if enabled).")]
public string textfieldValue
Field Value
string
type
The type of the option (e.g., radio button, slider, text field, etc.). When set, the generator will create a matching survey input type.
[Tooltip("The type of the option (e.g., radio, checkbox, slider, etc.). Determines how the option is displayed in the survey.")]
public OptionDataType type