Component:Texture2DAssetMetadata: Difference between revisions

From Resonite Wiki
add info
m clean up with proper references to other fields in description
 
Line 12: Line 12:
{{Table ComponentFields
{{Table ComponentFields
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| The texture to get metadata on.
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| The texture to get metadata on.
|Size|{{RootFieldType|RawOutput`1|[[Type:Int2|Int2]]}}|TypeAdv1=true| How big the texture is in pixels as a width height pair.
|Size|{{RootFieldType|RawOutput`1|[[Type:Int2|Int2]]}}|TypeAdv1=true| How big <code>Texture</code> is in pixels as a width height pair.
|Width|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv2=true| How wide the texture is in pixels.
|Width|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv2=true| How wide <code>Texture</code> is in pixels.
|Height|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| How tall the texture is in pixels.
|Height|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| How tall <code>Texture</code> is in pixels.
|HasMipMaps|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Whether the texture has mipmaps.
|HasMipMaps|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Whether <code>Texture</code> has mipmaps.
|MipMapCount|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv5=true| How many mipmap levels the texture has.
|MipMapCount|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv5=true| How many mipmap levels <code>Texture</code> has.
|MemoryBytes|{{RootFieldType|RawOutput`1|[[Type:Long|Long]]}}|TypeAdv6=true| How many bytes of memory this texture takes up.
|MemoryBytes|{{RootFieldType|RawOutput`1|[[Type:Long|Long]]}}|TypeAdv6=true| How many bytes of memory <code>Texture</code> takes up.
|FormattedMemoryBytes|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv7=true| The bytes of memory formatted into an easy to read format.
|FormattedMemoryBytes|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv7=true| The bytes of memory <code>Texture</code> takes up formatted into an easy to read format.
|Format|{{RootFieldType|RawOutput`1|[[Type:TextureFormat|TextureFormat]]}}|TypeAdv8=true| The format this texture has.
|Format|{{RootFieldType|RawOutput`1|[[Type:TextureFormat|TextureFormat]]}}|TypeAdv8=true| The format <code>Texture</code> is encoded in.
|ActualLoadedVariant|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv9=true| The actual variant of this texture that is loaded on the client.  
|ActualLoadedVariant|{{RootFieldType|RawOutput`1|[[Type:String|String]]}}|TypeAdv9=true| The actual variant of <code>Texture</code> that is loaded on the client.  
|Profile|{{RootFieldType|RawOutput`1|[[Type:ColorProfile|ColorProfile]]}}|TypeAdv10=true| The color profile this texture is being rendered and is encoded in.
|Profile|{{RootFieldType|RawOutput`1|[[Type:ColorProfile|ColorProfile]]}}|TypeAdv10=true| The color profile <code>Texture</code> is being rendered in.
}}
}}


Line 34: Line 34:
<!--T:5-->
<!--T:5-->
== See Also ==
== See Also ==
* [[Component:Texture3DAssetMetadata]]
</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]]

Latest revision as of 18:08, 4 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

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 Texture is in pixels as a width height pair.
Width raw output of Int How wide Texture is in pixels.
Height raw output of Int How tall Texture is in pixels.
HasMipMaps raw output of Bool Whether Texture has mipmaps.
MipMapCount raw output of Int How many mipmap levels Texture has.
MemoryBytes raw output of Long How many bytes of memory Texture takes up.
FormattedMemoryBytes raw output of String The bytes of memory Texture takes up formatted into an easy to read format.
Format raw output of TextureFormat The format Texture is encoded in.
ActualLoadedVariant raw output of String The actual variant of Texture that is loaded on the client.
Profile raw output of ColorProfile The color profile Texture is being rendered 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.


See Also