How to Setup An Object Pool (New Built In Method) | Unity Tutorial
https://www.youtube.com/watc...By the end of this Object Pooling tutorial, We will have replaced a projectile spawn setup from a simple Instantiate and Destroy setup, to an advanced object pooling system in Unity.
There is a LOT to learn here, and by the end you will understand:
- How to use Unity's built-in Object Pooling solution from start to finish.
- Analyzing and reading the profiler so you can dig into memory issues.
- How object pools work, and how to set them up for a variety of types of objects (including particle systems!)
- What kinds of problems we can expect to see when we replace Instantiate and Destroy setups to object pooling, and how to fix them.
I cover a lot here, so we're going to make this fast!
Link to Download the 2D Asset Pack seen in this tutorial:
https://veilofmaia.com/tutorial-asset-pack/
Join our Discord Community!
https://discord.com/invite/aHjTSBz3jH
Credits-----------------------------------------------------
Unity Order of Execution:
https://docs.unity3d.com/Manual/ExecutionOrder.html
Contents of This Video: ------------------------------------------
00:00 - Intro + Scene Explanation
01:17 - Analyzing the FPS and the Profiler
02:18 - Showing Where The Instantiate and Destroy Calls Are - So We Know How to Replace Them
03:35 - Setting Up the Projectile Object Pool Functionality
11:08 - Pool, Collection Check, Default and Max Capacity Explained
15:00 - Replacing Instantiate and Testing
15:48 - Replacing the Destroy Call
17:19 - Fixing Projectiles So They Work Properly With the Object Pooling System
19:47 - Setting Up the Particle Object Pool Functionality
23:43 - Replacing the Particle's Instantiate and Destroy Calls
26:30 - Improving the FindGameObjectWithTag Call
28:05 - Checking FPS and Profiler After the Switch to Object Pool
Who We Are-------------------------------------
If you're new to our channel, we're Brandon & Nikki from Sasquatch B Studios. We sold our house to start our game studio, and work full time on building our business and making our game, Veil of Maia.
Don't forget to Subscribe for NEW game dev videos every Monday & Thursday!
Don't forget to WISHLIST Veil of Maia on Steam!
https://store.steampowered.com/app/1948230/Veil_of_Maia/
Read our First Development Blog:
https://www.sasquatchbstudios.com/blog/
Want to be FIRST in line when the Free Demo is released?
Sign up for email updates and first access to the demo @ https://veilofmaia.com/
Follow us on Twitter for regular updates!
https://twitter.com/SasquatchBGames
***Purchase Links***
For those that would like to support the channel, please consider using the affiliate links below should you purchase a recommended product. We really appreciate it!
Equipment: We've been asked what we use, so here it is:
Microphone: Blue Yeti
Purchase in Canada: https://amzn.to/3WUXcWO
Purchase in USA: https://amzn.to/3Tke468
RGB Lights:
Purchase in Canada: https://amzn.to/3tflrkR
Purchase in USA: https://amzn.to/3g0Ci7L
Keylight: (Note: We use 2 of these for our lighting setup)
Purchase in Canada: https://amzn.to/3UINapv
Purchase in USA: https://amzn.to/3hq7sWx
#unitytutorial #unity2d #unity3d
Home
/
Indie Game Developers/
Sasquatch B Studios/
How to Setup An Object Pool (New Built In Method) | Unity Tutorial