Forum Discussion
theidleguest
2 years agoHonored Guest
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
- magnimus_studiosPartner
you can access the mesh renderer via script and you can replace the material during runtime.
gameobject.GetComponent<Renderer>().material = myMaterial
- theidleguestHonored Guest
Sounds great magnimus_studios
Do you think I can assign two materials?
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device