How silentbenjininja/unity-object-pooler works
This Unity package provides a generic, component-typed object pool. A consumer requests an inactive component through a derived MB_ObjectPooler; its lifecycle initialization constructs a ComponentObjectPool, which pre-warms instances and expands on demand. Consumers configure returned instances and activate them; deactivation makes them available again. README-described Odin Inspector enhancements are conditional presentation support in the pooler source. Evidence is limited to the README and the two excerpted runtime files.
Main entry points: ComponentObjectPool.cs Component pool · MB_ObjectPooler.cs Pooler component
Components 4
Pool access
- Pooler component
Runtime/MB_ObjectPooler.cs
Pool runtime
- Component pool
Runtime/ComponentObjectPool.cs - Pooled instances
Other components
- Game code
Connections 7
- Game code → Pooler component: requests instance
README.md - Pooler component → Component pool: constructs on load
Runtime/MB_ObjectPooler.cs - Pooler component → Component pool: requests next
Runtime/MB_ObjectPooler.cs - Component pool → Pooled instances: prewarms or expands
Runtime/ComponentObjectPool.cs - Component pool → Pooled instances: returns inactive
Runtime/ComponentObjectPool.cs - Game code → Pooled instances: configures and activates
README.md - Game code → Pooled instances: deactivates to return
README.md