Automated: update component fields |
fill out page |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<languages></languages> | <languages></languages> | ||
<translate> | <translate> | ||
{{Infobox Component | {{Infobox Component | ||
|Image=MainTexturePropertyBlockComponent.png | |Image=MainTexturePropertyBlockComponent.png | ||
Line 8: | Line 6: | ||
}} | }} | ||
The '''MainTexturePropertyBlock''' component is a [[Material Property Block]] for the main texture of a component. | |||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|HighPriorityIntegration|Bool| | |HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}} | ||
|Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv1=true| | |Texture|{{RootFieldType|AssetRef`1|[[Type:ITexture2D|ITexture2D]]}}|TypeAdv1=true|Texture to swap out the main texture with. | ||
}} | }} | ||
== Usage == | == Usage == | ||
< | This component allows one to swap out what a material considers its main texture, such as the albedo texture, with the given <code>Texture</code>. This property block only applies to materials that contain a <code>_MainTex</code> material property field. Notably, [[Component:UnlitMaterial|UnlitMaterial]] does not support this property block. | ||
== Examples == | == Examples == | ||
A good use for this component could be a picture wall, wherein a significant amount of pictures that should look the same but with different textures can be built with efficient memory usage and initial draw calls. Each picture would have its own [[Component:MeshRenderer|MeshRenderer]] using the same material but with its own MainTexturePropertyBlock. | |||
== See Also == | |||
* [[Material Property Block]] | |||
</translate> | </translate> | ||
[[Category:Components{{#translation:}}|Main Texture Property Block]] | [[Category:Components{{#translation:}}|Main Texture Property Block]] | ||
[[Category:Components:Assets:Material Property Blocks{{#translation:}}|Main Texture Property Block]] | [[Category:Components:Assets:Material Property Blocks{{#translation:}}|Main Texture Property Block]] |
Latest revision as of 18:30, 1 August 2024
Component image
The MainTexturePropertyBlock component is a Material Property Block for the main texture of a component.
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. |
HighPriorityIntegration
|
Bool | If true, integrating this asset (e.g. processing procedural assets) gets higher priority than assets with this flag off. An example is user laser procedural meshes. |
Texture
|
ITexture2D | Texture to swap out the main texture with. |
Usage
This component allows one to swap out what a material considers its main texture, such as the albedo texture, with the given Texture
. This property block only applies to materials that contain a _MainTex
material property field. Notably, UnlitMaterial does not support this property block.
Examples
A good use for this component could be a picture wall, wherein a significant amount of pictures that should look the same but with different textures can be built with efficient memory usage and initial draw calls. Each picture would have its own MeshRenderer using the same material but with its own MainTexturePropertyBlock.