Component:MainTexturePropertyBlock: Difference between revisions

From Resonite Wiki
Automated: update 'HighPriorityIntegration' description
fill out page
 
Line 1: Line 1:
<languages></languages>
<languages></languages>
<translate>
<translate>
<!--T:1-->
{{stub}}
{{Infobox Component
{{Infobox Component
|Image=MainTexturePropertyBlockComponent.png
|Image=MainTexturePropertyBlockComponent.png
Line 8: Line 6:
}}
}}


<!--T:2-->
The '''MainTexturePropertyBlock''' component is a [[Material Property Block]] for the main texture of a component.
 
== Fields ==
== Fields ==
{{Table ComponentFields
{{Table ComponentFields
|HighPriorityIntegration|Bool|{{Asset HighPriorityIntegration Field}}
|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.
}}
}}


<!--T:3-->
== Usage ==
== Usage ==


<!--T:4-->
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]]


<!--T:5-->
== Related Components ==
</translate>
</translate>
[[Category:ComponentStubs]]
 
[[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 
Main Texture Property Block component as seen in the Scene Inspector


The MainTexturePropertyBlock component is a Material Property Block for the main texture of a component.

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.
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.

See Also