Center pivot Instantied GameObject”改写为中文可以简单地翻译为“以中心轴为旋转点的实例化游戏对象”。
代码示例:
//以中心轴为旋转点的实例化游戏对象
public GameObject centerPivotInstantiatedPrefab;
void InstantiatePrefabWithCenterPivot()
{
//生成实例化对象
GameObject instantiatedObject = Instantiate(centerPivotInstantiatedPrefab);
//调整对象的旋转中心
instantiatedObject.transform.RotateAround(instantiatedObject.transform.position, Vector3.up, 90f);
}