Automated: update component fields |
add info |
||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=Texture2DAssetMetadataComponent.png | |Image=Texture2DAssetMetadataComponent.png | ||
|Name=Texture 2D Asset Metadata | |Name=Texture 2D Asset Metadata | ||
}} | }} | ||
The '''Texture2DAssetMetadata''' component converts the metadata often seen on texture components in an inspector into data that can be pulled into other systems as actual numbers and values. | |||
<!--T:2--> | <!--T:2--> | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| | |Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| The texture to get metadata on. | ||
|Size|{{RootFieldType|RawOutput`1|[[Type:Int2|Int2]]}}|TypeAdv1=true| | |Size|{{RootFieldType|RawOutput`1|[[Type:Int2|Int2]]}}|TypeAdv1=true| How big the texture is in pixels as a width height pair. | ||
|Width|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv2=true| | |Width|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv2=true| How wide the texture is in pixels. | ||
|Height|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| | |Height|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| How tall the texture is in pixels. | ||
|HasMipMaps|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| | |HasMipMaps|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Whether the texture has mipmaps. | ||
|MipMapCount|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv5=true| | |MipMapCount|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv5=true| How many mipmap levels the texture has. | ||
|MemoryBytes|{{RootFieldType|RawOutput`1|[[Type:Long|Long]]}}|TypeAdv6=true| | |MemoryBytes|{{RootFieldType|RawOutput`1|[[Type:Long|Long]]}}|TypeAdv6=true| How many bytes of memory this texture takes up. | ||
|FormattedMemoryBytes|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv7=true| | |FormattedMemoryBytes|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv7=true| The bytes of memory formatted into an easy to read format. | ||
|Format|{{RootFieldType|RawOutput`1|[[Type:TextureFormat|TextureFormat]]}}|TypeAdv8=true| | |Format|{{RootFieldType|RawOutput`1|[[Type:TextureFormat|TextureFormat]]}}|TypeAdv8=true| The format this texture has. | ||
|ActualLoadedVariant|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv9=true| | |ActualLoadedVariant|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv9=true| The actual variant of this texture that is loaded on the client. | ||
|Profile|{{RootFieldType|RawOutput`1|[[Type:ColorProfile|ColorProfile]]}}|TypeAdv10=true| | |Profile|{{RootFieldType|RawOutput`1|[[Type:ColorProfile|ColorProfile]]}}|TypeAdv10=true| The color profile this texture is being rendered and is encoded in. | ||
}} | }} | ||
<!--T:3--> | <!--T:3--> | ||
== Usage == | == Usage == | ||
Attach to a slot and provide an asset to <code>Texture</code> to start getting values and using the component. | |||
<!--T:4--> | <!--T:4--> | ||
== Examples == | == Examples == | ||
{{stub}} | |||
<!--T:5--> | <!--T:5--> | ||
== | == See Also == | ||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Texture 2D Asset Metadata]] | [[Category:Components{{#translation:}}|Texture 2D Asset Metadata]] | ||
[[Category:Components:Assets:Utility{{#translation:}}|Texture 2D Asset Metadata]] | [[Category:Components:Assets:Utility{{#translation:}}|Texture 2D Asset Metadata]] |
Revision as of 18:39, 3 February 2025
Component image 
Texture 2D Asset Metadata component as seen in the Scene Inspector

The Texture2DAssetMetadata component converts the metadata often seen on texture components in an inspector into data that can be pulled into other systems as actual numbers and values.
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 get metadata on. |
Size
|
raw output of Int2 | How big the texture is in pixels as a width height pair. |
Width
|
raw output of Int | How wide the texture is in pixels. |
Height
|
raw output of Int | How tall the texture is in pixels. |
HasMipMaps
|
raw output of Bool | Whether the texture has mipmaps. |
MipMapCount
|
raw output of Int | How many mipmap levels the texture has. |
MemoryBytes
|
raw output of Long | How many bytes of memory this texture takes up. |
FormattedMemoryBytes
|
raw output of String | The bytes of memory formatted into an easy to read format. |
Format
|
raw output of TextureFormat | The format this texture has. |
ActualLoadedVariant
|
raw output of String | The actual variant of this texture that is loaded on the client. |
Profile
|
raw output of ColorProfile | The color profile this texture is being rendered and is encoded in. |
Usage
Attach to a slot and provide an asset to Texture
to start getting values and using the component.
Examples
This article or section is a Stub. You can help the Resonite Wiki by expanding it.