Not sure why this isn't working, here's the relevant snippet of my code:
public var myObject : GameObject; //dragged the object here
private var allTrans : Transform[];
function Start(){
allTrans = myObject.GetComponentsInChildren(Transform);
}
From the looks of the docs, this should work. Not sure why it doesn't? I'm getting:
Cannot convert 'UnityEngine.Transform' to 'UnityEngine.Transform[]'.
It works if I change the typing of allTrans to Component[], but then I can't access the transform info of each object in the array, so that doesn't really help me at all.