Difference between revisions of "ItemTextureThumbnailSource (Component)"
Jump to navigation
Jump to search
AshtonSparx (talk | contribs) (Created page with "<languages></languages> <translate> <!--T:1--> {{stub}} {{Infobox Component |Image=ItemTextureThumbnailSourceComponent.png |Name=Texture Thumbnail Source }} <!--T:2--> == Fie...") |
(Wrote the entire article.) |
||
Line 7: | Line 7: | ||
|Name=Texture Thumbnail Source | |Name=Texture Thumbnail Source | ||
}} | }} | ||
+ | |||
+ | The ItemTextureThumbnailSource component can be used to customize the inventory preview of an item, setting it to a texture. | ||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
− | |Texture|IAssetProvider`1|TypeString0=IAssetProvider<Texture2D>| | + | |Texture|IAssetProvider`1|TypeString0=IAssetProvider<Texture2D>|The texture that should be used as the item's inventory preview. If null, the component will be ignored. |
− | |Crop|Nullable`1|TypeString1=Nullable<Rect>| | + | |Crop|Nullable`1|TypeString1=Nullable<Rect>|The rectangle that defines what section of the image to use. (Or null to use the entire image) |
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
+ | To work, the component just needs to be attached to any slot in the object's hierarchy and have an image in its <code>Texture</code>. | ||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
+ | This component can be used when the automatically generated preview for an item isn't satisfying enough or you want to ensure that the preview looks the same every time or shows the item off in a certain way. | ||
+ | |||
+ | An example of an item that uses this is the Clear Logix button in the Essential Tools folder. | ||
+ | |||
+ | == Related Issues == <!--T:5--> | ||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/677 <s>#677 - TextureThumbnailSource component prevents the saving of an object if the Crop parameter is invalid</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/761 <s>#761 - TextureThumbnailSource Doesn't work on curtain items.</s>] | ||
+ | |||
+ | [https://github.com/Neos-Metaverse/NeosPublic/issues/949 <s>#949 - When you have more than one Texture Thumbnail Source component in slot hierarchy, it ignores all of them.</s>] | ||
− | <!--T: | + | <!--T:6--> |
== Related Components == | == Related Components == | ||
</translate> | </translate> | ||
− | |||
[[Category:Components{{#translation:}}|Texture Thumbnail Source]] | [[Category:Components{{#translation:}}|Texture Thumbnail Source]] | ||
[[Category:Components:Uncategorized{{#translation:}}|Texture Thumbnail Source]] | [[Category:Components:Uncategorized{{#translation:}}|Texture Thumbnail Source]] |
Latest revision as of 16:57, 25 January 2022
This article or section is a Stub. You can help the Neos Wiki by expanding it.
The ItemTextureThumbnailSource component can be used to customize the inventory preview of an item, setting it to a texture.
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 |
Texture
|
IAssetProvider<Texture2D> | The texture that should be used as the item's inventory preview. If null, the component will be ignored. |
Crop
|
Nullable<Rect> | The rectangle that defines what section of the image to use. (Or null to use the entire image) |
Usage
To work, the component just needs to be attached to any slot in the object's hierarchy and have an image in its Texture
.
Examples
This component can be used when the automatically generated preview for an item isn't satisfying enough or you want to ensure that the preview looks the same every time or shows the item off in a certain way.
An example of an item that uses this is the Clear Logix button in the Essential Tools folder.
Related Issues
#761 - TextureThumbnailSource Doesn't work on curtain items.