Component:BooleanReferenceDriver

From Resonite Wiki
Revision as of 12:51, 16 October 2024 by 989onan (talk | contribs) (Add info, remove stub)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


This article or section is a Stub. You can help the Resonite Wiki by expanding it.


Component image 
Boolean Reference Driver`1 component as seen in the Scene Inspector


The BooleanReferenceDriver component is used to drive a reference to one value or another, depending on its State field.

Fields

Fields
Name Type Description
persistent Bool Determines whether or not this item will be saved to the server.
UpdateOrder Int Controls the order in which this component is updated.
Enabled Bool Controls whether or not this component is enabled.
State Bool Determines whether TargetReference should be driven to TrueTarget or to FalseTarget.
TargetReference direct RefDrive`1<T> The field that should be driven.
FalseTarget T The value that the field will be driven to if State is false.
TrueTarget T The value that the field will be driven to if State is true.

Usage

Attach this component to a slot by first choosing what kind of value you want to boolean switch. See Interface on how similar types can be used that are different classes (Like materials for example). Once a type has been chosen, this component can be used to switch the value in a field between two different ones using State

Examples

Can be used as an alternative to Boolean Asset Driver to switch assets, and as a way of switching slot references around

Related Issues

Related Components