📅  最后修改于: 2022-03-11 14:49:07.581000             🧑  作者: Mango
public GameObject GameObjectYouWantToParent;
public GameObject TheNewParent;
Transform GameObjectsTransform = GameObjectYouWantToParent.transform;
GameObjectsTransform.parent = TheNewParent;