Ok, I was trying to gather a bunch of GameObjects using JS and FindGameObjectsWithTag(), but I can’t seem to get it working (haven’t tried with C# yet). I guess my main problem was declaring it as an array from the start (it looked like FindGameObjectsWithTag wants to put stuff in an array from the docs. Here is the code I have currently:
var targetArray : GameObject;
targetArray = GameObject.FindGameObjectsWithTag("target");
I tried doing this withvar targetArray = new Array();
and also
var targetArray = new ArrayList();
but all seem to generate errors I can do this all fine as long as I am not needing to fine multiple GameObjects and only use FindGameObjectWithTag()…
Any ideas are appreciated!