Hello,
I have a gameobject with many gameobject children that contain transforms for spawn points. I am trying to grab all of the transforms with the following code but i get a casting error. Could you please explain to me what is wrong.
var SpawnPt : Transform[];
SpawnPt = GameObject.Find("Spawns").GetComponentsInChildren(Transform);
Here is Unity’s example
var hingeJoints : HingeJoint[];
hingeJoints = GetComponentsInChildren (HingeJoint);
for (var joint : HingeJoint in hingeJoints) {
joint.useSpring = false;
}