コード例 #1
0
ファイル: UIPoolManager.cs プロジェクト: hjj0416/Demo
    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
ファイル: UIPoolManager.cs プロジェクト: hjj0416/Demo
    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);
            }
        }
    }