We’ve been working on a game where we change the material of the object runtime. It works fine on PC but on mobile it occasionally fails and object becomes black (no baked lightmaps I guess). I’m loading the material async and setting that material. Loading material asset is successful and setting material also, but object stays black. Material is really simple and having only one base texture. We have only one spotlight which is Stationary. Object with the material is Static.
We would want to use baked lightmaps, but we’re planning to put the spotlight to dynamic (Movable) if we can’t find solution.
Any help is appreciated!
I think the object hasn’t loaded by the time you try to set the material.
It’s not the solution, but you could try a delay before setting the mat.