unity object pool
https://github.com/stupeak/RePool.git?path=Assets/RePool
// base interface for pool containersinterfaceIPoolContainer<T>// UnityEngine.Component pool
class ComponentPool<T>// ComponentPool<TValue> with keysclass MultiComponentPool<TKey, TValue>// UnityEngine.GameObject poolclass GameObjectPoolusingStupeak.RePool;classBullet{}ComponentPool<Bullet>bulletPool=new(bulletPrefab,bulletParent);BulletbulletInstance=bulletPool.Rent();// adding a new instancebulletPool.AddExisting(newBullet());// return to poolbulletPool.Return(bulletInstance);// release instance bulletPool.Release(bulletInstance);