COVID-19 Support:
We’re providing all users three months of complimentary access to Unity Learn Premium, from March 19 to June 20, 2020.
Just log in to start learning.

Lesson 2.3 - Random Animal Stampede

1 Hour
For Educators
Tutorial Materials
Our animal prefabs walk across the screen and get destroyed out of bounds, but they don’t actually appear in the game unless we drag them in! In this lesson we will allow the animals to spawn on their own, in a random location at the top of the screen. In order to do so, we will create a new object and a new script to manage the entire spawning process.
Project Outcome:
When the user presses the S key, a randomly selected animal will spawn at a random position at the top of the screen, walking towards the player.
Recommended Unity versions
2018.4 and Above
Topics we'll cover
Lesson 2.3 - Random Animal Stampede