top of page
Buscar

Smart Object Pooler - Inspector Based Performance Kit

25 de abr.
2 min de leitura

Smart Object Pooler is a complete pooling system that eliminates performance stuttering caused by frequent Instantiate() and Destroy() calls.


KEY BENEFITS:


• NO CODING REQUIRED for basic use - everything configurable via Inspector


• Eliminates GC spikes and improves mobile performance


• Reduces memory allocations during gameplay



HOW IT WORKS:


1. Add SmartObjectPooler to any GameObject in your scene


2. Configure your prefabs in the Inspector (Initial Size, Max Size, Auto Return Time)


3. Call GetObject() to retrieve objects and ReturnObject() to send them back



FEATURES:


• Multiple pools support (different prefab types)


• Auto return system with configurable delay


• Expandable pools with max size limits


• Transform auto-reset on return (position, rotation, scale)


• Editor gizmos showing real-time pool statistics


• IPoolable interface for custom callbacks (OnTakeFromPool, OnReturnToPool)


• UnityEvents for OnObjectTaken and OnObjectReturned


• Optional auto-cleanup of unused objects


• Warning system for missing pools (can be disabled)



PERFECT FOR:


• Shoot 'em ups (bullets)


• Endless runners (obstacles, pickups)


• RPGs (projectiles, effects, enemies)


• Any game with frequent spawning/destroying



COMPATIBILITY:


• Unity 2021.3 LTS, 2022.3 LTS, 2023.3+


• Built-in render pipeline (scripts work in URP/HDRP)



INCLUDED EXAMPLES:


• ShooterController - complete shooting example with UI stats


• AutoReturnBullet - projectile with IPoolable implementation


• CollisionParticle - particle effect on collision


• Fully configured demo scene



DOCUMENTATION:


• Complete PDF manual with setup guide and API reference


• English README files


• Step-by-step tutorial


• FAQ with 10+ common problems and solutions



SUPPORTED LAYERS:


• Works with any Unity object (GameObjects, UI, Particles, etc.)


Eye-level view of a person engaged in a thoughtful conversation

Technical details

KEY FEATURES:


• Inspector-based configuration (no coding required)


• Auto Return Time (seconds until object returns to pool)


• Initial Size pre-warming


• Max Size limit (0 = unlimited)


• Expandable pools (auto-create on demand)


• Reset Transform On Return (position, rotation, scale)


• Show Gizmos with live statistics (Active/Available count)


• Customizable Gizmo Color


• Warn On Missing Pool toggle


• Auto Clean Unused (memory optimization)


• Unused Cleanup Interval


• Default Parent transform for pool containers



PUBLIC API:


- GameObject GetObject(string poolID)


- GameObject GetObject(GameObject prefab)


- GameObject GetObject(int poolIndex)


- void ReturnObject(GameObject obj)


- void ReturnAllToPool()


- void PrewarmPool(string poolID, int additionalCount)


- PoolStats GetPoolStats(string poolID)


- UnityEvent OnObjectTaken


- UnityEvent OnObjectReturned



IPoolable INTERFACE:


- void OnTakeFromPool() – called when object is taken from pool


- void OnReturnToPool() – called when object is returned to pool



INCLUDED SCRIPTS (Examples/Scripts):


- ShooterController.cs – complete shooting system with UI


- AutoReturnBullet.cs – projectile with IPoolable


- CollisionParticle.cs – particle effect on trigger collision



INCLUDED PREFABS:


- Example_Bullet.prefab


- Example_PlayerShooter.prefab


- Example_PoolManager.prefab



INCLUDED SCENE:


- SmartPoolerDemo.unity – fully functional demonstration



SCRIPT LOCATIONS:


- Core scripts: SmartObjectPooler/Scripts/Core/


- Example scripts: SmartObjectPooler/Examples/Scripts/


- Documentation: SmartObjectPooler/Documentation/



NAMESPACES:


- Core: SmartPooler


- Examples: SmartPooler.Examples



REQUIREMENTS:


- Unity 2021.3 LTS or higher


- No additional packages required



 
 
 

Comentários


bottom of page