- Home /
Modifying texture from within class behaves different than from without class
Currently setting a material to blend from one texture to another. When I call the function that sets the blend target texture from within the Update function in the script that is attached to the object that shows the texture blend it works fine. However, when I call the same function in the same manner from any other class, there is a distinct flickering happening in the blend (lerping from 0 to 1 in the blend script).
Is there some caveat with modifying textures used in shaders from outside of the object that is using said shader?
Edit; should add that when I'm calling the function from outside of the script attached to the object that uses the textures, it's done inside of a loop that's iterating over the results of a Physics.OverlapBox call. Is there some tie-in to the physics system that could be messing with it?