文档

Unity Engine

Unity Engine

Transforms

Position, rotate, scale, and parent GameObjects with transforms in the Editor and from scripts.
阅读时间1 分钟最后更新于 1 天前

The Transform component stores a GameObject's position, rotation, scale, and parent. You can change transforms in the Unity Editor, from scripts with the
Transform
API, or from Burst-compiled code with the unmanaged
TransformHandle
API.

Topic

Description

Introduction to transformsLearn what a Transform component stores, how local and world space differ, and how to change transforms in the Editor and from scripts.
Change a transform from a scriptLearn how to modify Transform component from a script, how aRigidbody component affects transforms, and how transforms affect performance.
Rotate a GameObject from a scriptLearn how Unity stores rotation, and how to rotate a transform.
Using unmanaged API for transform operationsUse the
TransformHandle
API as an alternative to the
Transform
API.

Additional resources