View on Asset Store (opens in new tab)
Package details
- Latest version
- 1.3.1
- Last updated
- First released
- Unity version
- 2021.3.1 or later
- Package size
- 722 KB
- Files
- 26
- Favorites
- 26
- Views in the past week
- 4
Price tracking
- Last checked
- Tracked since
- Lowest recorded
- Free on
Keywords
Object Pool Manager
Lightweight, easy-to-use Object Pool manager designed to work with prefabs.
Affiliate link · Purchases support this site
Price history
Last 6 months
USDAsset preview
1 / 6
Object Pool Manager screenshot 1
About this asset
The Object Pool Manager is a lightweight, easy-to-use object pooler that makes it simpler than ever to implement object pooling in your game. It's designed specifically to work with prefabs which can be defined as simply as SerializedField of type GameObject.
Simply call the static ObjectPoolManager.SpawnGameObject(prefab) method and you are guaranteed to get an instance of the correct prefab type.
Calling ObjectPoolManager.DespawnGameObject(prefab) will deactive the object and add it to the appropriate pool.
The package is very lighweight and extremely performant. It is ideal for games which Instantiate/Destroy lots of objects repeatedly.
After being imported into your project the ObjectPoolManager will automatically load when your game starts and will persist across scenes.
From the publisher's Asset Store listing.
Technical details
Under the covers this package uses a Dictionary that maps prefabs to a Queue of GameObjects. The key is the name of the prefab.
Since objects are only stored in the pool when they are despawned, spawning objects from the pool is incredibly fast since we don't need to search for an inactive object.
Unlike the built-in ObjectPool<T> provided by Unity which requires you to use exact types, this package allows you to work with prefabs with the pool being agnostic of the underlying type.
Compatibility
| Unity version | Built-in | URP | HDRP | Custom |
|---|---|---|---|---|
| 2021.3.23f1 | Compatible | Compatible | Compatible | Compatible |
| 2021.3.1f1 | Compatible | Compatible | Compatible | Compatible |
As listed on the Asset Store.