|Reference|{{RootFieldType|RelayRef`1|[[Type:SyncRef`1|SyncRef`1]]<T>}}|TypeAdv0=true| The reference field to compare against
|Reference|{{RootFieldType|RelayRef`1|[[Type:SyncRef`1|SyncRef`1]]<T>}}|TypeAdv0=true| The reference field to compare against
|ForceDeselected|Bool| Forces any context menu item source to change reguardless if it is deselected.
|ForceDeselected|Bool| Forces any context menu item source to change regardless if it is deselected.
|Label|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv2=true| The string to set to the chosen label in the list of <code>Options</code>
|Label|{{RootFieldType|FieldDrive`1|[[Type:String|String]]}}|TypeAdv2=true| The string to set to the chosen label in the list of <code>Options</code>
|Color|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv3=true| The color to set to the chosen color in the list of <code>Options</code>
|Color|{{RootFieldType|FieldDrive`1|[[Type:ColorX|ColorX]]}}|TypeAdv3=true| The color to set to the chosen color in the list of <code>Options</code>
Latest revision as of 21:58, 12 September 2024
Component image
Reference Option Description Driver`1 component as seen in the Scene Inspector
The Reference Option Description Driver component is used primarily to drive the parts that make up a Context Menu Item Source. This component along with ContextMenuItemSource is used in context menus for toggles where the toggle controls a reference like a slot or object.
The list to search for a ReferenceTarget that matches Reference. once a match is found, the option's Label, Color, and Sprite is used to drive this section's drive targets of Label, Color, and Sprite.
The sprite to use if ReferenceTarget matches Reference
Usage
This component can be more efficient than using a bunch of Reference Equality Drivers and generating a number based on such, or using ProtoFlux for a context menu.
Examples
This is useful for managing toggles where you want to switch things like music and drive the description based on which music asset you chose in your context menu.