- Home /
List in JS, Unknown indentifier
I'm trying to make a list.
#pragma strict
var RandomNumber = new List.<int>();
I did it just the same as in http://wiki.unity3d.com/index.php?title=Which_Kind_Of_Array_Or_Collection_Should_I_Use? but with my line unity says: Assest/Builder.js(4,24): BCE0005: Unknown identifier: 'List'.
Answer by Dave-Carlile · Jul 02, 2013 at 07:01 PM
import System.Collections.Generic;
Thanks guys, sorry for the late response, took some shut eye. This helped me a lot
Answer by InfiniBuzz · Jul 02, 2013 at 07:05 PM
You need to import it to be able to use it.
put this at the top of your script:
import System.Collections.Generic;
next time make sure to first search for what your looking for, on unity answers or google, I'm sure there is much information about this out there, so always try to avoid duplicate questions ;)
Your answer
Follow this Question
Related Questions
Need some help with my Gravity Gun, New to Scripting. 1 Answer
A node in a childnode? 1 Answer
BCE0005 Unknown identifier issue 1 Answer
Issue with OnTriggerEnter. 1 Answer
expecting (, found 'Update' and unexpected char: 0x200B. 2 Answers