예제 #1
0
    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);
        }
    }
예제 #2
0
    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);
            }
        }
    }