- Home /
Question by
_invalidusername · Oct 10, 2016 at 09:33 PM ·
terrainterraindata
Default TreeInstance.color
I'm instantiating a tree using:
TreeInstance treeInstance = new TreeInstance();
treeInstance.position = new Vector3 ( 0 , 0, 0);
treeInstance.color = Color.white;
treeInstance.widthScale = 1;
treeInstance.heightScale = 1;
treeInstance.prototypeIndex = 0;
terrain.AddTreeInstance(treeInstance);
The instantiated tree is grey. I've tried using different color values for treeInstance.color
but it always comes out grey. I have also tried leaving out the color value altogether. The docs provide no insights.
What is the "default" color the Unity uses when you manually place a tree on a terrain?
Comment
Answer by _invalidusername · Oct 10, 2016 at 09:38 PM
Nevermind, I see you need to set the lightmapColor property as well:
treeInstance.lightmapColor = Color.white;
Your answer
![](https://koobas.hobune.stream/wayback/20220612094401im_/https://answers.unity.com/themes/thub/images/avi.jpg)