internal void ShouldFillPool(string name) { EventPool <GameEvent> pool = EventPoolHolder <GameEvent> .mInstance.GetPool(name); //--Safe while int count = 0; while (pool.IsBelowThreshold() && ++count < 100) { if (count == 99) { Debug.Log("Safe while reached!"); } //--Fill pool with obstacles FillPool(pool, 10, "Obstacles"); //--Fill pool with goods FillPool(pool, 10, "Goods"); } }