How to change the material of gameObject efficiently in runtime?


I use this to change the material, it works. But I am a little worried about the Resources.Load , cause I need to call this function frequently.Will it slow the game,and is there any alternatvie with
more efficient?

Ps: cameraMaterials[index] is path in string

It seems that resources.load will not be loaded repeatedly

1 Like