edit.
I just used for instead and it seems to work. Is there a foreach() in JS?
I am looking to use “foreach()” in US but am getting an error. What is the correct way to script ForEach in US?
edit.
I just used for instead and it seems to work. Is there a foreach() in JS?
I am looking to use “foreach()” in US but am getting an error. What is the correct way to script ForEach in US?
Im not a UnityScript guy but I think there is no foreach but you can do the same in a for loop example
// c#
foreach (int i in someIntArray) { }
// UnityScript
for (var i : int in someIntArray) { }
but dont quote me on that ^^
You don’t need to manually type it. The compiler knows what i is in either language if you just use var.
@element, yah, it seems that way.
for()