- Home /
Question by
lancer · Aug 18, 2013 at 09:31 PM ·
javascriptlistclass
Unknow identifier"List"
I'm trying to make a list of the Current Objectives in my game, I typed as I saw in another script:
var CurrentObjectives = new List.<String>();
But I am getting this error:
Assets/Scripts/UI.js(8,29): BCE0005: Unknown identifier: 'List'.
Comment
Best Answer
Answer by save · Aug 18, 2013 at 09:35 PM
You must import generics, add this to the top of your document:
CSharp
using System.Collections.Generic;
UnityScript
import System.Collections.Generic;
Thanks!!!
I have been having this error for weeks every time I tried to use it.
Your answer
Follow this Question
Related Questions
List of Classes (js) - How to Construct Properly 1 Answer
A node in a childnode? 1 Answer
How can i store the Amount of an item i have in an inventory? 0 Answers
missingGameObject problem 3 Answers
Java Script command list 3 Answers