Version: 2023.2

Transform.SetPositionAndRotation

切换到手册
public void SetPositionAndRotation (Vector3 position, Quaternion rotation);

描述

设置变换组件的世界空间位置和旋转。

When setting both the position and rotation of a transform, calling this method is more efficient than assigning to position and rotation individually.