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