Hey guys. I’m trying to convert a built in array to a javascript array, but I keep getting this error message:
ArgumentNullException: Argument cannot be null.
Parameter name: collection
UnityScript.Lang.Array.AddRange (IEnumerable collection)
UnityScript.Lang.Array…ctor (IEnumerable collection)
Here is my code:
var st:GameObject[];
st=GameObject.FindGameObjectsWithTag("st");
Debug.Log(st[0]);
Debug.Log(st[1]);
Debug.Log(st[2]);
Debug.Log(st[3]);
var stp= new Array(st);
Thanks for the help:)