Unity 直下の子供を取得 / 直下以下の子供を再帰的に取得 方法

// get immediate children only
foreach(Transform child in transform){
  // do something
}

// get myself and all children recursively
Transform[] transformArray = this.GetComponentsInChildren<Transform>();