Component:AssetReceiver: Difference between revisions

From Resonite Wiki
Automated: create new component page
 
add info
 
Line 3: Line 3:
|Name=Asset Receiver`1
|Name=Asset Receiver`1
}}
}}
{{stub}}
Asset Receiver is a useful component for getting asset data from a user through a UIX. When this item is placed on a UIX that allows receiving (like a [[Component:Button|Button]]) and it's <code>Reference</code> field is filled, it will be active. When an item is pushed through the canvas where the button is so the interaction laser is hitting it and the item is let go; the value within the field inside of <code>Reference</code> is set to the first available [[Type:IAsset`1|IAsset]] which is exposed by an [[Component:AssetProxy|Asset Proxy]].


== Usage ==
== Usage ==
{{Table ComponentFields
{{Table ComponentFields
|Reference|'''[[Type:AssetRef`1|AssetRef`1]]&lt;A&gt;'''|TypeAdv0=true|
|Reference|'''[[Type:AssetRef`1|AssetRef`1]]&lt;A&gt;'''|TypeAdv0=true| The field to fill with a value when a grabbed item with an [[Component:AssetProxy|Asset Proxy]] is dropped onto the canvas region with this component.
|Undoable|Bool|
|Undoable|Bool| Whether to add changes to this value via grab receiving to the undo stack of the user that changed it.
}}
}}


Line 14: Line 14:


== Examples ==
== Examples ==
<gallery widths=480px heights=480px>
File:AssetRecieverExample.png|How to use the Asset Receiver component in a way that will make it do something.
</gallery>


== See Also ==
== See Also ==
Line 20: Line 24:
[[Category:Components{{#translation:}}|Asset Receiver`1]]
[[Category:Components{{#translation:}}|Asset Receiver`1]]
[[Category:Generic Components{{#translation:}}|Asset Receiver`1]]
[[Category:Generic Components{{#translation:}}|Asset Receiver`1]]
[[Category:ComponentStubs]]

Latest revision as of 17:22, 13 October 2024

Component image 
Asset Receiver`1 component as seen in the Scene Inspector

Asset Receiver is a useful component for getting asset data from a user through a UIX. When this item is placed on a UIX that allows receiving (like a Button) and it's Reference field is filled, it will be active. When an item is pushed through the canvas where the button is so the interaction laser is hitting it and the item is let go; the value within the field inside of Reference is set to the first available IAsset which is exposed by an Asset Proxy.

Usage

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.
Reference AssetRef`1<A> The field to fill with a value when a grabbed item with an Asset Proxy is dropped onto the canvas region with this component.
Undoable Bool Whether to add changes to this value via grab receiving to the undo stack of the user that changed it.

Behavior

Examples

See Also