Version: 2018.3 (switch to 2019.1 )
Using Components
Creating components with scripting
Other Versions

Transform

Switch to Scripting

The Transform component determines the Position, Rotation, and Scale of each object in the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. Every GameObjectThe fundamental object in Unity scenes, which can represent characters, props, scenery, cameras, waypoints, and more. A GameObject’s functionality is defined by the Components attached to it. More info
See in Glossary
has a Transform.

Properties

Property: Function:
Position Position of the Transform in X, Y, and Z coordinates.
Rotation Rotation of the Transform around the X, Y, and Z axes, measured in degrees.
Scale Scale of the Transform along X, Y, and Z axes. Value “1” is the original size (size at which the object was imported).

The position, rotation and scale values of a Transform are measured relative to the Transform’s parent. If the Transform has no parent, the properties are measured in world space.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答