/// <summary> /// Static equivalent of GetNext. /// </summary> /// <returns> /// True if you got an item; false otherwise (no such pool, pool is empty, etc.) /// </returns> public static bool TryGetNext(string poolName, out T item) { ComponentPool <T> pool = PoolManager.Get(poolName) as ComponentPool <T>; if (pool != null) { item = pool.GetNext(); } else { item = null; } return(item != null); }