- Home /
Question by
Ramphic · Aug 08, 2017 at 03:16 PM ·
performancematerialsmobileoptimization
Best way of changing material shader properties performance wise
From performance perspective, is it better to change material properties in update() of c# script or write a separate shader for it, for mobile games in unity?
Comment
Answer by Trevdevs · Aug 08, 2017 at 05:17 PM
If by properties you mean the RGB and alpha settings you should have no problem doing it in the update function as long as long as its not too much.
However if you mean suddenly switch the ambient occlusion or how shadows are generated on the object.
A. I have absolutely no idea why you would ever want to do that. and B it's physically not possible in a non shader script.
I actually want something like changing offset of textures etc.,
Your answer
![](https://koobas.hobune.stream/wayback/20220612132245im_/https://answers.unity.com/themes/thub/images/avi.jpg)