UsageHints

enumeration

Description

Offers a set of options that describe the intended usage patterns of a VisualElement. These options serve as guidance for optimizations. You can set multiple usage hints on an element. For example, if both position and color change, you can set both DynamicTransform and DynamicColor.

Note: Set the usage hints at edit time or before you add the VisualElement to a panel. In the case of transition, when it starts, the system might automatically add missing relevant usage hints to avoid regenerating geometry in every frame. However, this causes a one-frame performance penalty because the rendering data for the VisualElement and its descendants is regenerated.

Properties

None No particular hints applicable.
DynamicTransform Optimizes rendering of a VisualElement for frequent position and transformation changes.
GroupTransform Optimizes rendering of a VisualElement that changes its transformation and position frequently, and has many descendants that have their hints set to DynamicTransform.
MaskContainer Optimizes rendering of a VisualElement that has multiple descendants with nested masks.
DynamicColor Optimizes rendering of a VisualElement for frequent color changes, such as a built-in style color being animated.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961