About 'Instantiate As Child'!

In this video (objectives)...

  1. Instatiate our attacker as an Attacker game object.
  2. Change the instantiated object's parent to be the object which spawned it.

After watching (learning outcomes)...

Change the parent of an instantiated object.

(Unique Video Reference: 31_GL_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

Hi, the fourth parameter of Instantiate, can be the Transform of parent.
Use Template version of Instantiate avoid to cast with “as” operator.

Instantiate<Attacker> (attackerPrefab, transform.position, Quaternion.identity, transform);

Privacy & Terms