Instantiation is one of those words that strike fear into the heart of evil-doers everywhere. Evil-doers and new game developers. But you can think of it as simply cloning.
Want a new copy of a prefab in your code during the game? Clone it with Instantiate(). Want horrific monsters to drift onto the screen, heading for the heroine who’s dropped her sword? Instantiate() those monsters!
Be forewarned — there are a couple concepts that I purposefully gloss over in this lesson, such as Vector3 structures and Quaternions. The good news is that even with the glossiness you’ll end up with enough knowledge to be cloning by midnight tonight, guaranteed!*
Instantiate (Clone) (10:28)
Now that we can instantiate, I want to instantiate all the time, 24/7! So let’s discover the secret formula for that…
Later in the course we’ll be using an updated version of the Instantiate script. If you like, go ahead and grab it now so you’ll be ready to go.
* Not really guaranteed.
Back to the Beginning 2D Game Development Dashboard