In this episode we'll take a look at how to get enemies and items randomly spawning on top of our platforms! We're going to gather valid spawn locations using our tilemaps then spawn our enemies and items at a set random % chance.
We'll also be regathering our valid spawn locations on level change!
Lots to do in this episode - very big and complex script!
Available on my Patreon below if you're interested ;-)
❗️❗️❗️📢 BUY THE COMPLETE GAME TEMPLATE NOW!!! 👾❗️❗️❗️
https://gamecodelibrary.itch.io/2d-pl...
All source code for all videos I have made and will make in the future can be found on my Patreon:
https://www.patreon.com/posts/advance...
Check out the series previous videos:
• FULL Platformer Tutorial Series - Uni...
Sprite sheet: https://www.kenney.nl/assets/1-bit-pl...
Discord: / discord
I'll be posting new videos every week, so be sure to subscribe to see what kind of adventure we can go on together! I'm excited! :-)
If you have any suggestions, feedback or questions, be sure to comment below! Any opinions will help me out on our journey ♡
0:00 - Intro
0:23 - ObjectSpawner GameObject
0:52 - ObjectSpawner Script (Main Functionality)
10:29 - Unity Setup + Initial Spawn Working
10:51 - Enemy Error Script Fix (Skip to next chapter if don't need fix!)
11:35 - Enemy Fixed
11:42 - ObjectSpawner Script (Update Functionality)
12:05 - Found a bug!
12:18 - How to Debug
13:03 - Fix Bug
13:20 - Object Spawning Working!!
13:44 - Script: Update Spawn Locations on Lvl Change
15:13 - Final Setup
15:34 - All Working!
16:00 - Next Video
16:20 - Outro
Watch video Advanced Object Spawning on Tilemap Platforms - 2D Platformer Unity #13 online without registration, duration hours minute second in high quality. This video was added by user Game Code Library 10 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,595 once and liked it 53 people.