I have a ResourcePool class that uses generics.
public class ResourcePool<T> where T : class
{
bool isWrappable;
int wrapIndex;
int numberOfInvalidObjects;
ValidateObject objectCheck;
T[] objects;
If I have multiple ResourcePool classes.
private ResourcePool<PlasmaAmmo> poolPlasmaAmmo;
private ResourcePool<LazerAmmo> poolLazerAmmo;
private ResourcePool<HappyAmmo> poolHappyAmmo;
How can I store these pools in a dictionary or list?
List<ResourcePool<T>> pools = new List<ResourcePool<T>>();
Doesn't work for me.