📅  最后修改于: 2022-03-11 14:49:06.709000             🧑  作者: Mango
public GameObject YourGameObject;
int randomChildIdx = Math.Random(0, YourGameObject.transform.childCount);
Transform randomChild = YourGameObject.transform.GetChild(randomChildIdx);