Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
theidleguest's avatar
theidleguest
Honored Guest
2 years ago

MRUK - Unity - assigning two materials to global mesh

Hi,

I would like to assign two materials to the global mesh. Unfortunately, Effect Mesh allows to assign one only.

Is there a way to do it via code in Unity? 

Anyone willing to point me in the right direction? Newbie here 😥

Carlo

2 Replies

  • you can access the mesh renderer via script and you can replace the material during runtime.

    gameobject.GetComponent<Renderer>().material = myMaterial