- Home /
Question by
syrka · May 20, 2011 at 08:15 PM ·
Can anyone translate this to JavaScript?
It's only this line i need in JavaScript:
List<PluginListEntry> pluginList = new List<PluginListEntry>();
Comment
Answer by ckfinite · May 20, 2011 at 08:39 PM
Try
var pluginList = new Array ();
See http://unity3d.com/support/documentation/ScriptReference/Array.html
this didn't work, but i found the solution by myselft ;)
http://forum.unity3d.com/threads/79760-How-to-use-generics-in-unity-javascript?p=510611#post510611
JS Arrays are really not comparable to Lists. Lists are type-safe and will probably get better performance especially with values types due to boxing and unboxing in an Array/ArrayList.
Your answer
Follow this Question
Related Questions
Convert C# to JS 1 Answer
Rewriting C# to JavaScript 2 Answers
Small C# error 1 Answer
Translation music script from c# to js 1 Answer
convert C# script to java 1 Answer