用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:recttransform:recttransform

RectTransform 矩形变换

class in UnityEngine/Inherits from: Transform

Description 描述

Position, size, anchor and pivot information for a rectangle.

矩形的位置,大小,锚点和中心点信息。

RectTransforms are used for GUI but can also be used for other things. It's used to store and manipulate the position, size, and anchoring of a rectangle and supports various forms of scaling based on a parent RectTransform.

矩形变换是用于GUI但是也可以用于其他方面。它用于存储和巧妙处理矩形的位置,大小,锚点并且支持基于父矩形变换的各种缩放表单。

Variables 变量

anchoredPositionThe position of the pivot of this RectTransform relative to the anchor reference point.
该矩形变换相对于锚点参考点的中心点位置。
anchoredPosition3DThe 3D position of the pivot of this RectTransform relative to the anchor reference point.
该矩阵变换相对于锚点参考点的中心点的3D位置。
anchorMaxThe normalized position in the parent RectTransform that the upper right corner is anchored to.
该锚点在父矩阵变换中归一化位置,右上角是锚点。
anchorMinThe normalized position in the parent RectTransform that the lower left corner is anchored to.
在父矩阵变换上归一化位置,该锚点在左下角。
offsetMaxThe offset of the upper right corner of the rectangle relative to the upper right anchor.
矩形右上角相对于右上角锚点的偏移量。
offsetMinThe offset of the lower left corner of the rectangle relative to the lower left anchor.
矩形左下角相对于左下角锚点的偏移量。
pivotThe normalized position in this RectTransform that it rotates around.
在该矩阵变换的归一化位置,围绕该中心点旋转。
rectThe calculated rectangle in the local space of the Transform.
计算矩形自身空间的变换。
sizeDeltaThe size of this RectTransform relative to the distances between the anchors.
矩阵变换的大小相对于锚点之间的距离。

Public Functions 公共函数

GetLocalCornersGet the corners of the calculated rectangle in the local space of its Transform.
在该变换的本地空间中获取计算的矩形的折角的本地坐标。
GetWorldCornersGet the corners of the calculated rectangle in world space.
获取世界空间中矩形计算的折角。
SetInsetAndSizeFromParentEdgeSet the distance of this rectangle relative to a specified edge of the parent rectangle, while also setting its size.
设置父矩形的指定边缘的相对于该矩形的距离,当然也设置它的大小。
SetSizeWithCurrentAnchorsMakes the RectTransform calculated rect be a given size on the specified axis.
使矩形变换计算矩形在指定坐标轴上是给定大小。

Delegates 委托

ReapplyDrivenPropertiesDelegate used for the reapplyDrivenProperties event.
委托用于reapplyDrivenProperties事件。
script/unityengine/classes/recttransform/recttransform.txt · 最后更改: 2016/08/02 05:29 (外部编辑)