x


All subsequent instantiated objects = auto-named with suffix (Clone)?

Just double checking, will all instantiated objects of "Bill" be called "Bill(Clone)" ? (At least that is what they are reading as in hit.transform.gameObject.name)

In that case, to find these objects, would you use Find("Bill(Clone)") instead of Find("Bill")

more ▼

asked Dec 27 '10 at 10:06 PM

ina gravatar image

ina
3.3k 492 550 602

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

1 answer: sort voted first

That's the default name but you can change that.

GameObject go = Instantiate( prefab ) as GameObject;
go.name = whatever;
more ▼

answered Dec 27 '10 at 10:33 PM

Tetrad gravatar image

Tetrad
7.2k 27 37 89

since by default all clones will be named "Clone(clone)", basically with the (clone) suffix, will you have to use Find("Clone(Clone)" instead of just Find ("Clone")?

Dec 28 '10 at 05:42 AM ina

Yes, unless you rename them on instantiation like demoed above, add (Clone) to your prefab name when searching for it.

Dec 28 '10 at 07:53 AM azzogat
(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:

x2091
x1679
x208
x143
x25

asked: Dec 27 '10 at 10:06 PM

Seen: 2140 times

Last Updated: Dec 27 '10 at 10:06 PM