public void Perload(string poolName, GameObject prefab, int count = 1) { UISimplePool pool = getPool(poolName); if (pool != null) { pool.Perload(count); } else { UISimplePool _pool = spawnPool(poolName, prefab); _pool.Perload(count); } }
public void Perload(string poolName, string prefabPath, int count = 1) { UISimplePool pool = getPool(poolName); if (pool != null) { pool.Perload(count); } else { GameObject prefab = createPerfab(prefabPath); if (prefab != null) { Perload(poolName, prefab); } } }