Component:AssetLoader: Difference between revisions

From Resonite Wiki
m ProbablePrime moved page AssetLoader (Component) to Component:AssetLoader: Creating component Namespace
give info, no longer stub
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=AssetLoader`1Component.png
|Image=AssetLoader`1Component.png
|Name=Asset Loader`1
|Name=Asset Loader`1
}}
}}
AssetLoader is a Component that is used to tell the game that an asset is still being used. This is helpful for when an asset is referenced in a way that deletes it during asset cleanup or during save. This component will prevent the asset from being cleaned up because it has a fake user.


<!--T:2-->
<!--T:2-->
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|Asset|IAssetProvider`1|TypeString0=IAssetProvider<IAsset>|
|Asset|IAssetProvider`1|TypeString0=IAssetProvider<IAsset`1>| The [[Type:IAsset`1|Asset]] to give a fake user.
}}
}}


<!--T:3-->
<!--T:3-->
== Usage ==
== Usage ==
When attaching component, specify any [[Type:IAsset`1|Asset]] type by name, and then insert an asset of that type into the asset field to give it a fake user.


<!--T:4-->
<!--T:4-->
== Examples ==
== Examples ==
Images on fake badges, some UIX elements.


<!--T:5-->
<!--T:5-->
== Related Components ==
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
[[Category:Generics{{#translation:}}]]
[[Category:Generics{{#translation:}}]]
[[Category:Components{{#translation:}}|Asset Loader`1]]
[[Category:Components{{#translation:}}|Asset Loader`1]]
[[Category:Components:Assets:Utility{{#translation:}}|Asset Loader`1]]
[[Category:Components:Assets:Utility{{#translation:}}|Asset Loader`1]]

Revision as of 01:30, 14 February 2024

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

AssetLoader is a Component that is used to tell the game that an asset is still being used. This is helpful for when an asset is referenced in a way that deletes it during asset cleanup or during save. This component will prevent the asset from being cleaned up because it has a fake user.

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.
Asset IAssetProvider<IAsset`1> The Asset to give a fake user.

Usage

When attaching component, specify any Asset type by name, and then insert an asset of that type into the asset field to give it a fake user.

Examples

Images on fake badges, some UIX elements.

Related Components