Object Pool Manager
Midnite Oil Software
$0.0
Date |
Price |
---|---|
日期和时间 |
价钱($) |
08/02(2022) |
0.0 |
11/17(2024) |
0.0 |
Jump AssetStore
Lightweight, easy-to-use Object Pool manager designed to work with prefabs.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. 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 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.