Version: Unity 6.2 Alpha (6000.2)
LanguageEnglish
  • C#

TransformOrigin

struct in UnityEngine.UIElements

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents the point of origin where the transformations (Scale, Translate, and Rotate) are applied.

By default, transform-origin is set in percentages relative to the element's size. For example, 50% 50% sets the origin to the center of the element. These percentages are calculated based on the element’s resulting layout size (resolvedStyle.height and resolvedStyle.width). You can also specify transform-origin in pixels. The origin is determined based on the local coordinate system of the element, where the top-left corner is considered the origin point (0,0) regardless of whether you use percentages or pixels. Negative values and values larger than 100% are valid and move the transform-origin outside the element.

Constructors

TransformOrigin

Static Methods

Initial Returns the initial value for the TransformOrigin property.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961