Hey,
I have written a custom firstpass shader for my terrain and I want to manually assign a texture to one of the properties at startup. Any ideas on how can I access the terrain shader properties through script?
Thanks in advance!
Hey,
I have written a custom firstpass shader for my terrain and I want to manually assign a texture to one of the properties at startup. Any ideas on how can I access the terrain shader properties through script?
Thanks in advance!
Through the material, by a method property type(GetInt, GetFloat, etc), please reference the material documentation for available methods including setter methods.
Hey Landern,
sadly, renderer.material and materialTemplate throw null-reference errors.
After a lot of trial and error I found a solution by following this workflow:
After that I managed to use SetTexture(…) successfully!
Thanks for your answer.