void Awake()
{
current = this;
poolDict = new Dictionary<string, List<GameObject>>();
objPool = new List<GameObject>();
foreach (var poolObj in pooledObjects)
{
// Clear the temporary list
List<GameObject> tempPool = new List<GameObject>();
for (int i = 0; i < pooledAmount; i++)
{
GameObject obj = (GameObject)Instantiate(poolObj);
obj.SetActive(false);
tempPool.Add(obj);
}
poolDict.Add(poolObj.name, tempPool);
}
}