Here’s the rub: I have a loot table for a game I’m working on. Originally, it was an array of objects that could spawn when you opened a chest. Now I want that loot table to be dynamic based on a player’s actions- Things may get added or removed as time goes on.
Because I wouldn’t know the size of the array, it was suggested that I use a List<>. Easy enough to set up, but I can’t seem to instantiate FROM a list.
Doing this (Where tempO is a GameObject and lootTable is a List<>):
tempO = lootTable(1);
Gets me this error:
Assets/_scripts/spawnManager.cs(35,33): error CS1955: The member `spawnManager.lootTable' cannot be used as method or delegate
My question: Why? And SHOULD I be using a List<>? What are my other options?