How can we use two different material on a same game object at the same time?


I want to use two different materials at the same time on a game object using C# language. I tried to use do it with an array of materials but it also applies one material at a time.I used the following code to apply the textures.

GameObject.GetComponent().sharedMaterial = material[0];

Please reply to my problem.

Click on the object, in the inspector then in Mesh Renderer. Set Size to 2.


UV map your object to define where each material will be applied.


set the alpha value of each material to %50

Hope this helps :slight_smile:

Check out submesh from Unity Doc and this unity answer.
Those should give you idea on how to use materials and sub-mesh together.