Hello unity Community
Im a bit new at c# programming and I have a question about the ArrayList.
Im getting these errors: Assets/Scripts/ItemCreator.cs(34,33): error CS1502: The best overloaded method match for UnityEngine.Object.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments and Assets/Scripts/ItemCreator.cs(34,33): error CS1503: Argument #1’ cannot convert object' expression to type UnityEngine.Object’
Im making my list:
ArrayList myAL = new ArrayList();
Using add() to add gameobjects to the list:
myAL.Add(LargeCoin);
Using a for loop to go through the list with count. And inside the for loop is the following code:
Instantiate(myAL[cnt], _itemSpawnPointPos, Quaternion.identity);
Its in the last bit I get my error, and i think it has something to do with the accessing for the gameobjects.
Hope you can help with this noobish question:smile:
Best Regards
Qvist