Unity Learn home
View Tutorial Content

Lesson 2.3 - Random Animal Stampede

Tutorial
Beginner
+10 XP
1 Hour
(25290)
Overview
Skills
For Educators
Summary
Overview:
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.
Select your Unity version
Last updated: January 03, 2024
2022.3
2022.2
2022.1
2021.3
2021.2
2021.1
2020.3
2020.2
2020.1
2019.4
2019.3
2019.2
2019.1
2018.4
Language
English
Overview Video
Overview
Lesson 2.3 - Random Animal Stampede
0 Secs
Lesson 2.3 - Random Animal Stampede