SpawnPool Create(string poolName) Description Creates a new pool in PoolManager.Pools which can then be accessed using the PoolName (the name of the pool). This creates a new GameObject in the scene and adds the SpawnPool component to it. The GameObject will be named poolName+"Pool" for convenience. You only need to use this if you need to create a pool via script. Otherwise, add a component to a GameObject in your scene to achieve the same result. There can only be one pool with a particular name, so be sure to use this function in a place which is only run once.
SpawnPool Create(string poolName, GameObject owner) Description Creates a new pool in PoolManager.Pools which can then be accessed using the PoolName (the name of the pool). Creates a SpawnPool Component on an 'owner' GameObject which registers itself with the PoolManager.Pools dictionary. The SpawnPool can then be accessed directly via the return value of this function or via the PoolManager.Pools dictionary. You only need to use this if you need to create a pool via script. Otherwise, add a component to a GameObject in your scene to achieve the same result. There can only be one pool with a particular name, so be sure to use this function in a place which is only run once.
|