Automated: create new component page |
add info |
||
Line 3: | Line 3: | ||
|Name=Boolean Asset Driver`1 | |Name=Boolean Asset Driver`1 | ||
}} | }} | ||
This component is functionally identical to [[Component:BooleanReferenceDriver|Boolean Reference Driver]]. Except it only accepts [[Type:IAsset`1|IAssets]] and acts as a user for assets in <code>FalseTarget</code> and <code>TrueTarget</code> meaning assets assigned to this component won't get cleaned up by the asset optimizer world processes. | |||
== | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|State|Bool| | |State|Bool| Whether to drive <code>Target</code> to <code>TrueTarget</code> or <code>FalseTarget</code> | ||
|Target|{{RootFieldType|DriveRef`1|[[Type:AssetRef`1|AssetRef`1]]<A>}}|TypeAdv1=true| | |Target|{{RootFieldType|DriveRef`1|[[Type:AssetRef`1|AssetRef`1]]<A>}}|TypeAdv1=true| The field to drive the value of. | ||
|FalseTarget|{{RootFieldType|AssetRef`1|A}}|TypeAdv2=true| | |FalseTarget|{{RootFieldType|AssetRef`1|A}}|TypeAdv2=true| The asset to drive <code>Target</code> to when <code>State</code> is false. | ||
|TrueTarget|{{RootFieldType|AssetRef`1|A}}|TypeAdv3=true| | |TrueTarget|{{RootFieldType|AssetRef`1|A}}|TypeAdv3=true| The asset to drive <code>Target</code> to when <code>State</code> is true. | ||
}} | }} | ||
== | == Usage == | ||
Attach this component to a slot, and (optionally) put an asset into the False and/or True target fields. Then, put a field which you want to change the asset of into <code>Target</code>. now, switching <code>State</code> will allow switching between the values of <code>FalseTarget</code> and <code>TrueTarget</code>. | |||
== Examples == | == Examples == | ||
This can be used to switch textures, materials, documents, and many other [[Type:IAsset`1|IAssets]] between two different values. This can be used to allow flip flopping eye textures, or having an evil/good texture. | |||
== See Also == | == See Also == | ||
[[Component:AssetMultiplexer|Asset Multiplexer]] for switching between more than 2 assets. | |||
[[Category:Components:Assets:Utility{{#translation:}}|Boolean Asset Driver`1]] | [[Category:Components:Assets:Utility{{#translation:}}|Boolean Asset Driver`1]] | ||
[[Category:Components{{#translation:}}|Boolean Asset Driver`1]] | [[Category:Components{{#translation:}}|Boolean Asset Driver`1]] | ||
[[Category:Generic Components{{#translation:}}|Boolean Asset Driver`1]] | [[Category:Generic Components{{#translation:}}|Boolean Asset Driver`1]] | ||
Latest revision as of 17:46, 16 October 2024
This component is functionally identical to Boolean Reference Driver. Except it only accepts IAssets and acts as a user for assets in FalseTarget
and TrueTarget
meaning assets assigned to this component won't get cleaned up by the asset optimizer world processes.
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 | Whether to drive Target to TrueTarget or FalseTarget
|
Target
|
direct DriveRef`1<AssetRef`1<A>> | The field to drive the value of. |
FalseTarget
|
A | The asset to drive Target to when State is false.
|
TrueTarget
|
A | The asset to drive Target to when State is true.
|
Usage
Attach this component to a slot, and (optionally) put an asset into the False and/or True target fields. Then, put a field which you want to change the asset of into Target
. now, switching State
will allow switching between the values of FalseTarget
and TrueTarget
.
Examples
This can be used to switch textures, materials, documents, and many other IAssets between two different values. This can be used to allow flip flopping eye textures, or having an evil/good texture.
See Also
Asset Multiplexer for switching between more than 2 assets.