I'd like to access the child transforms of a game object by index (like an array). I know this is 'undefined', but as long as they don't randomly change order, I'm ok with it. Is there a clean way of doing this, short of using the 'foreach' clause and stopping it at the desired index?
Is this clean?
List<Transform> children;
void PopulateChildren () {
children.Clear();
foreach (Transform child in transform) children.Add(child);
}