x


How to attach a script to a static Tree Prefab?

Sir,

How to attach a script to a static Tree Prefab?

Regards, vanhouten777.

more ▼

asked Feb 13 '12 at 12:40 PM

vanhouten777 gravatar image

vanhouten777
-4 5 6 7

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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.

more ▼

answered Feb 13 '12 at 01:07 PM

Bunny83 gravatar image

Bunny83
46.8k 12 50 210

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3418
x1285
x284
x235
x80

asked: Feb 13 '12 at 12:40 PM

Seen: 673 times

Last Updated: Feb 13 '12 at 01:07 PM