- Home /
Question by
RoadkillMike · Dec 05, 2013 at 03:14 PM ·
arraylistarraylistusingcollection
Collections don't work!
Hi guys.
This one is driving me nuts! The only collection I can use is the regular Array. List, ArrayList etc. simply don't work!
I get a "the name .... does not exist in the current context."
I have absolutely no idea what the problem is.
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class ScoreMgr : MonoBehaviour {
public ArrayList myList;
public List<int> myList2;
}
Comment
Answer by nikita68 · Dec 05, 2013 at 03:58 PM
It needs to be:
public List<int> myList2 = new List<int>();