I am currently programmatically settings some shader textures, related to a Mesh Filter. The Mesh Filter is using a standard shader, and I am merely generating and setting the Bump and Height maps, via code.
Sphere.materials .mainTexture = biome; Sphere.GetComponent<MeshRenderer> ().materials .SetTexture ("_BumpMap", bump); Sphere.GetComponent<MeshRenderer> ().materials .SetTexture ("_ParallaxMap", heightTexture);
This is fine. The issue is that the shader only seems to activate itself once it is clicked in the inspector. Is there some sort of Activate() function I need to call in order to apply the shader effects to the Mesh?
Notice in the example (this is running in Play mode), that the shader only activates once I click the expand button on the Shader in the inspector.
What is going on here?