- Home /
Question by
HuskyPanda213 · Apr 08, 2014 at 11:52 PM ·
terrainmaterialcolortree
How to change leave color at runtime?
How would I make the leaves on terrain trees made in the tree creator change color? I want to add a season system to my game, and I do not know how I would. I cannot figure out a working way to change leave color, at runtime.
Thanks in advance.
Comment
Answer by getyour411 · May 20, 2014 at 12:22 AM
The code is terrible I should go back and update it but as is, here's a starting point
http://answers.unity3d.com/questions/521056/access-terrain-tree-material-from-script.html
Essentially you create multiple trees/prefab combos maybe one represents normal, one fall and then a game trigger swaps them; that part is dangerous so make sure you backup/test in integration project/etc.