namespace Pooling { /// /// Interface for objects that can be pooled. /// Implement this interface on any component that should be managed by an ObjectPool. /// public interface IPoolable { /// /// Called when the object is retrieved from the pool. /// Use this to reset the object's state. /// void OnSpawn(); /// /// Called when the object is returned to the pool. /// Use this to clean up any resources or state. /// void OnDespawn(); } }