m ProbablePrime moved page AssetMultiplexer (Component) to Component:AssetMultiplexer: Creating component Namespace |
add information about referencemultidriver |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=AssetMultiplexer`1Component.png | |Image=AssetMultiplexer`1Component.png | ||
Line 8: | Line 7: | ||
}} | }} | ||
The AssetMultiplexer component is used to drive | The '''AssetMultiplexer''' component is used to drive an asset field from a list of assets and an index within the list. | ||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Target|AssetRef`1| | |Target|{{RootFieldType|DriveRef`1|[[Type:AssetRef`1|AssetRef`1]]<A>}}|TypeAdv0=true| The field to drive. | ||
|Index|Int| Which element in <code>Assets</code> to drive to <code>Target</code> | |Index|Int| Which element in <code>Assets</code> to drive to <code>Target</code> | ||
|Assets|SyncAssetList`1| | |Assets|{{RootFieldType|SyncAssetList`1|A}}|TypeAdv2=true| The list of assets to multiplex between. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Add the list of assets you want to use through the SyncAssetList<IAsset`1> area, then add in your assets into the items. Then you can specify the field through the Target you wanna switch between different assets for. Changing the Index will change which asset the Target has in it. | |||
{{Note|This component directly drives a value, not a reference. Therefore, trying to combine it with other components using an [[Type:IAssetProvider|IAssetProvider]]<T> type, such as a [[Component:ReferenceMultiDriver|ReferenceMultiDriver]], will not work. To drive by reference and thus interop this component, use a [[Component:ReferenceMultiDriver|ReferenceMultiDriver]]<IAssetProvider<T>>|information}} | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
Using an asset multiplexer to allow your avatar to switch shirts via changing the texture, a pattern changer for a music visualizer. | |||
<!--T:6--> | <!--T:6--> | ||
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Asset Multiplexer`1]] | [[Category:Components{{#translation:}}|Asset Multiplexer`1]] | ||
[[Category:Generic Components{{#translation:}}|Asset Multiplexer`1]] | |||
[[Category:Components:Assets:Utility{{#translation:}}|Asset Multiplexer`1]] | [[Category:Components:Assets:Utility{{#translation:}}|Asset Multiplexer`1]] |
Latest revision as of 21:45, 16 June 2024
Component image
The AssetMultiplexer component is used to drive an asset field from a list of assets and an index within the list.
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. |
Target
|
direct DriveRef`1<AssetRef`1<A>> | The field to drive. |
Index
|
Int | Which element in Assets to drive to Target
|
Assets
|
list of A | The list of assets to multiplex between. |
Usage
Add the list of assets you want to use through the SyncAssetList<IAsset`1> area, then add in your assets into the items. Then you can specify the field through the Target you wanna switch between different assets for. Changing the Index will change which asset the Target has in it.
Examples
Using an asset multiplexer to allow your avatar to switch shirts via changing the texture, a pattern changer for a music visualizer.