Unity 3.3 no longer recognizes the 'List' type in Javascript?

Achievement.js

static var achievements : List.<Achievement>;

This compiled just fine in 3.2 but no longer does after the 3.3 update. Any ideas?

You need to use “import System.Collections.Generic”. (Or else use “static var achievements : System.Collections.Generic.List.;”, but that is of course quite annoying.) I suggested that this be included automatically (and invisibly), like “import UnityEngine” and “import System.Collections” are, but apparently not successfully.

–Eric

Yes, I also just found the “issue” here http://answers.unity3d.com/questions/1940/parsing-error-for-list-gameobject which made me think something of that kind changed with 3.3

It’s indeed annoying, and I expect it’s going to be confusing to many unless prominently explained somewhere.

the answer page you linked is stone age old from Unity iPhone 1.0.x actually.
Since unity iphone 1.5 that no longer is the case.

Also the C# thing mentioned there is actually not related to JS in any form.

Previously it potentially worked but that was likely more due to the boo version of List<> which faked the presence of the System.Collections.Generic one which lead to some miss assumptions and problems as people tried to use functions that the .net one offers but which the boo replica doesn’t (like reverse)

The good thing is that it is easy to remember: Datastucture that accepts a generic, ie stuff like List<>, Dictionary<> and alike → requires import of System.Collections.Generic
Normal object based datastructures like Hashtable etc only require System.Collections