using UnityEngine; namespace Watermelon { /// /// Common interface for all pool types (Pool, PoolGeneric, PoolMultiple). /// public interface IPool { /// Unique name used to identify this pool in PoolManager. public string Name { get; } /// Registers the pool in PoolManager. Called automatically by constructors. public void Init(); /// Returns an inactive pooled object, activating it. Creates a new instance if none are available. public GameObject GetPooledObject(); /// Pre-warms the pool by ensuring at least objects exist. public void CreatePoolObjects(int count); /// Deactivates all active objects, returning them to the pool. public void ReturnToPoolEverything(bool resetParent = false); /// Destroys all pooled objects and unregisters the pool. Note: this method is performance heavy. public void Clear(); } }