用户工具

站点工具


侧边栏



Unity3D中文文档

script:unityengine:classes:drivenrecttransformtracker:drivenrecttransformtracker

DrivenRectTransformTracker 驱动矩形变换跟踪器

struct in UnityEngine

Description 描述

A component can be designed drive a RectTransform. The DrivenRectTransformTracker struct is used to specify which RectTransforms it is driving.

组件被设计驱动一个RectTransform。该DrivenRectTransformTracker结构使用于指定的RectTransform。

Driving a RectTransform means that the values of the driven RectTransform are controlled by that component. These driven values cannot be edited in the Inspector (they are shown as disabled). They also won't be saved when saving a scene, which prevents undesired scene file changes.

驱动一个RectTransform意味着驱动RectTransform的值由组件控制。这些驱动的值不能在检视面板中修改(显示被禁用)。当保存场景时它们也不会被保存,这防止不需要的场景文件更改。

Whenever the component is changing values of driven RectTransforms, it should first call the Clear method and then use the Add method to add all RectTransforms it is driving. The Clear method should also be called in the OnDisable callback of the component.

每当该组件改变驱动RectTransform的值,应该首先调用Clear方法,然后使用Add方法添加驱动的所有RectTransform。在该组件的OnDisable回调,Clear方法也应该被调用。

Public Functions

AddAdd a RectTransform to be driven.
添加一个驱动RectTransform。
ClearClear the list of RectTransforms being driven.
清除正驱动的RectTransforms列表。
script/unityengine/classes/drivenrecttransformtracker/drivenrecttransformtracker.txt · 最后更改: 2016/08/02 05:35 (外部编辑)