- Home /
How to attach a script to a static Tree Prefab?
Sir,
How to attach a script to a static Tree Prefab?
Regards, vanhouten777.
Answer by Bunny83 · Feb 13, 2012 at 01:07 PM
You can't. Trees are just rendered objects on the Terrain. They are not real GameObjects. Each tree is just a TreeInstance inside the Terrain's TerrainData object.
And please don't use the word static all the time ;) It just confuses everyone. Inside Unity there are only two things that can be "static". In scripting a static class / method / variable or in Unity the "isStatic" checkmark on gameobjects. You're not refering to one of them. Also it would be nice to stick to the FAQs and post clear and detailed questions that doesn't require discussions. Some questions can be described with just one short sentence, but for most it's a little bit too short.