Introduction to Object Pooling in Unity | Object Pooling Tutorial
Published: 26 Jan 2021
In this video I will cover what Object Pooling is, why you need it, how to implement it, and cover some of the common pitfalls of using an object pool.
Object Pooling is the concept of pre-creating objects as disabled, then enabling and disabling them instead of instantiating and destroying them. Object instantiation is an expensive operation and allocates memory. When you later destroy the object, that frees the memory that eventually the garbage collector needs to come clean up. When that happens there is possibly a stutter in your game. Object Pooling is an optimization technique that helps prevent "GC Alloc" - which speeds up your game, and helps to prevent the garbage collector from having to come by and cause stutter in your game.
🔶 ALL THINGS LlamAcademy now available at: https://llamacademy.dev/support including latest tutorials, courses, ways to support, and more! Check it out 🙂
👨💻 No GitHub repository for this one, but you can find all of my projects for FREE on GitHub: https://github.com/llamacademy
🏷️Save 25% on the ultimate C# IDE: JetBrains Rider with code LLAMACADEMY: https://www.jetbrains.com/store/?section=personal&billing=yearly
Some links may be affiliate links, which at no additional cost to you, gives me a small portion of the purchase.