From docs "**Builtin arrays (native .NET arrays), are extremely fast and efficient but they can not be resized.**"
[http://docs.unity3d.com/Documentation/ScriptReference/Array.html][1]
Option A. You must use a resizable collection.
var array = new Array();
array.Add("yeah");
Option B. Temporary move to a resizable collection.
var array = ["one", "two"];
var ar = new Array(array);
ar.Add("tree");
array = ar.ToBuiltin(String);
Option C. Resize the array
var array = ["one", "two"];
System.Array.Resize.(array, array.length + 1);
array[array.length-1] = "tree";
Option D. Be creative
PS: I write now by hand, don't expect everything to compile
[1]: http://docs.unity3d.com/Documentation/ScriptReference/Array.html
↧