m clean up with proper references to other fields in description
(3 intermediate revisions by 3 users not shown)
Line 2:
Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
{{stub}}
{{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.
|Texture|{{RootFieldType|AssetRef`1|[[Type:Texture2D|Texture2D]]}}|TypeAdv0=true| The texture to get metadata on.
|Size|Int2|
|Size|{{RootFieldType|RawOutput`1|[[Type:Int2|Int2]]}}|TypeAdv1=true| How big <code>Texture</code> is in pixels as a width height pair.
|Width|Int|
|Width|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv2=true| How wide <code>Texture</code> is in pixels.
|Height|Int|
|Height|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv3=true| How tall <code>Texture</code> is in pixels.
|HasMipMaps|Bool|
|HasMipMaps|{{RootFieldType|RawOutput`1|[[Type:Bool|Bool]]}}|TypeAdv4=true| Whether <code>Texture</code> has mipmaps.
|MipMapCount|Int|
|MipMapCount|{{RootFieldType|RawOutput`1|[[Type:Int|Int]]}}|TypeAdv5=true| How many mipmap levels <code>Texture</code> has.
|MemoryBytes|Long|
|MemoryBytes|{{RootFieldType|RawOutput`1|[[Type:Long|Long]]}}|TypeAdv6=true| How many bytes of memory <code>Texture</code> takes up.
|FormattedMemoryBytes|String|
|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|TextureFormat|
|Format|{{RootFieldType|RawOutput`1|[[Type:TextureFormat|TextureFormat]]}}|TypeAdv8=true| The format <code>Texture</code> is encoded in.
|ActualLoadedVariant|String|
|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 <code>Texture</code> is being rendered 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.
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.