Component:TextExportable: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page TextExportable (Component) to Component:TextExportable: Creating component Namespace
add usage, related
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=TextExportableComponent.png
|Image=TextExportableComponent.png
|Name=Text Exportable
|Name=Text Exportable
}}
}}
The '''TextExportable''' component allows the user to take a [[Slot]] and export it as a text file on their device.
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
|TextSource|IValue`1|TypeString0=IValue<string>|
|TextSource|'''[[Type:IValue`1|IValue`1]]&lt;[[Type:String|String]]&gt;'''|TypeAdv0=true| Anything that is a string, such as textfields, contents, etc.
|Extension|String|
|Extension|String| The file type, defaults to <code>.txt</code>.
|Description|String|
|Description|String| The description of what this text export is. Will be shown during the export process.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
This can be used to export anything that is text based, or anything you can fill the <code>TextSource</code> with such as log information or anything else that you wish to export out.
{{Template:AssetExportableUsage}}


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


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

Latest revision as of 17:41, 13 November 2024

Component image 
Text Exportable component as seen in the Scene Inspector

The TextExportable component allows the user to take a Slot and export it as a text file on their device.

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.
TextSource IValue`1<String> Anything that is a string, such as textfields, contents, etc.
Extension String The file type, defaults to .txt.
Description String The description of what this text export is. Will be shown during the export process.

Usage

This can be used to export anything that is text based, or anything you can fill the TextSource with such as log information or anything else that you wish to export out.

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