As an Associate of Unity Asset Store, this website earns from qualifying purchases & contains affiliate links: check the footer for more info.

Object Pool & Object Pooling System

Object Pool is software design pattern that allows creating objects in advance (e.g., at the scene loading) and then reuse them, what has a positive effect on game performance for Unity Projects.

Object Pooling, Optimization and Performance in Unity

To prevent Garbage Collector issues (CPU Spikes) in games with many spawning and destroying objects, a method called Object Pooling can be used. Object Pooling refers to creating all necessary objects beforehand and disabling/enabling them when it necessary, instead of instantiating (Instantiate() function) and destroying (Destroy() function) objects during runtime.

Object Pool in Unity — Example in Game — Pooling System — Object Pooler — Pool Manager

This is often done by having an array containing disabled objects that are often used, e.g. bullets in FPS or units in a Strategy game. When a gun is fired, instead of spawning a new bullet and allocating memory for it, we take a game object from the list (object pool), move it to the right position & activate it.

When the bullet collides with something, instead of destroying it, we disable it and add it back our object pool in default state to use it later.

This way we can have many objects appear and disappear, without allocating any memory and causing issues with the Garbage Collector.

These objects can also be spawned beforehand during a loading screen and kept hidden until needed. This way they won’t cause performance issues when spawned during gameplay.

Unity Assets

Pool Boss

Pool Boss — the best pooling solution on Unity Asset Store that makes simple to avoid the costly Instantiate() and Destroy() calls that cause performance problems. All types of prefab are supported — even particle systems.

Unity Asset Store — Download Button
Unity Pool Boss — Unity Asset of Pooling System — Pool Manager

One short line of code can despawn or spawn prefabs, or you can use our included Playmaker scripts!

Pool Kit

Pool Kit — Ultimate Object Pool Manager, next generation system for pooling, spawning and despawning with ZERO Garbage Collection which can be up to 77% faster than instantiating (~33% on average) and helps to make your game a smoother experience which is increasingly needed on platforms like mobile, AR and VR!

Unity Asset Store — Download Button
Unity Pool Kit — Unity Asset of Pooling System — Object Pooler

Pool Kit also thinks about how you work in Unity and comes with its powerhouse of a Spawner. This can be used to create enemies in strategy or tower defense game genres, special effects, weapon systems and more!

Random Object Pooler

Random Object Pooler — improved version of the Object Pooling System by Unity Technologies.

Package is a Part of Unity Assets by Makaka Games

Random Object Pooler is available as a part of Complete Project Templates & Tools:

Basketball Game (docs).

AR Basketball (docs).

AR Shooter (docs).

Throw Object 3D (docs).

AR Throw & Score (docs).

Game Examples with Object Pool


First, read the latest docs online.
If it didn’t help, get the support.

Unity Assets

Support for Unity Assets

I am Andrey Sirota, Founder of Makaka Games and full-time Publisher on the Unity Asset Store. First, read the latest docs online. If it didn’t help, get the support.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.

Back to top button