Beispiel #1
0
    /// <summary>
    /// Creates the new pool.
    /// </summary>
    /// <returns>The new pool.</returns>
    /// <param name="_parent">Parent.</param>
    /// <param name="_poolName">Pool name.</param>
    /// <param name="_maxPoolSize">Max pool size.</param>
    public static GenericPool CreateNewPool(
        Transform _parent,
        string _poolName = "Pool",
        int _maxPoolSize = NoSizeLimit)
    {
        GenericPool pool = GameObjectUtil.CreateInstance <GenericPool>(_parent, _poolName);

        pool.SetMaxPoolSize(_maxPoolSize);
        pool.InitializePool();
        return(pool);
    }