Component:TextureExportable: Difference between revisions

From Resonite Wiki
imported>Xekri
Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=TextureExportableComponent.png |Name=Texture Exportable }} <!--T:2--> == Fields == {{Table..."
 
add Sync delegate description
 
(9 intermediate revisions by 6 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=TextureExportableComponent.png
|Image=TextureExportableComponent.png
|Name=Texture Exportable
|Name=Texture Exportable
}}
}}
The '''TextureExportable''' allows you to make a [[StaticTexture2D (Component)|StaticTexture2D]] exportable through the files page in the [[Dash Menu|dash menu]].
To export using this component, look at the [[File Browser#Importing And Exporting|file browser export section]].


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Texture|IAssetProvider`1|TypeString0=IAssetProvider<Texture2D>|
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| The texture to be exported.
}}
 
== Sync Delegates ==
{{Table ComponentTriggers
|CopyImage:[[Type:ButtonEventHandler|ButtonEventHandler]]|[[Type:ButtonEventHandler|ButtonEventHandler]]|true| Shows as a button in the user's context menu. Allows copying the image this component points to into the user's clipboard.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
To use this component attach it to an object, than reference a Texture2D in the <code>Texture</code> field.
{{Template:AssetExportableUsage}}


<!--T:4-->
== Examples ==
== Examples ==
{{stub}}


<!--T:5-->
== See Also ==
== Related Components ==
{{Template:AssetExportableComponents}}
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Components{{#translation:}}|Texture Exportable]]
[[Category:Components{{#translation:}}|Texture Exportable]]
[[Category:Components:Assets:Export{{#translation:}}|Texture Exportable]]
[[Category:Components:Assets:Export{{#translation:}}|Texture Exportable]]

Latest revision as of 15:12, 30 April 2025

Component image 
Texture Exportable component as seen in the Scene Inspector

The TextureExportable allows you to make a StaticTexture2D exportable through the files page in the dash menu.

To export using this component, look at the file browser export section.

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. Some components stop their functionality when this field is disabled, but some don't.
Texture Texture2D The texture to be exported.

Sync Delegates

Triggers
Method Name Method type and Arguments. Is the method hidden? Description
CopyImage:ButtonEventHandler ButtonEventHandler Shows as a button in the user's context menu. Allows copying the image this component points to into the user's clipboard.

Usage

To use this component attach it to an object, than reference a Texture2D in the Texture field.

This component is used mainly to add an export option to the user's context menu as they are holding an item. Which can be used to easily communicate to the user that an item is made for exporting to their local machine. For example, screenshots, figurines, pictures, recorded audio clips, some generated text from protoflux, and Avatars can have Asset exportables like this component to signify that they can be downloaded to one's local storage.

Examples

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

See Also