Skip to main content

Material.mainTexture

NameType
mainTextureTexture

Description

The main texture.

Extra Detail

By default, Unity considers a texture with the property name "_MainTex" to be the main texture. Use the [MainTexture] ShaderLab Properties attribute to make Unity consider a texture with a different property name to be the main texture. When the main texture is set using the [MainTexture] attribute, it is not visible in the Game view when you use the texture streaming debugging view mode or a custom debug tool.