ResourceManager.InitPool C# (CSharp) Method

InitPool() public method

public InitPool ( string poolName, int size, PoolInflationType type = PoolInflationType.DOUBLE ) : void
poolName string
size int
type PoolInflationType
return void
    public void InitPool(string poolName, int size, PoolInflationType type = PoolInflationType.DOUBLE)
    {
        if (poolDict.ContainsKey(poolName))
        {
            return;
        }
        else
        {
            GameObject pb = Resources.Load<GameObject>(poolName);
            if (pb == null)
            {
                Debug.LogError("[ResourceManager] Invalide prefab name for pooling :" + poolName);
                return;
            }
            poolDict[poolName] = new Pool(poolName, pb, gameObject, size, type);
        }
    }