Experimental: this API is experimental and might be changed or removed in the future.

IUxmlAttributes

interface in UnityEngine.Experimental.UIElements

切换到手册

描述

此类型允许在 VisualElement 实例化期间检索 UXML 属性值。将向 factory 方法提供一个实例 - 请参阅 UXMLFactoryAttribute。

公共函数

GetPropertyBoolReturn the value of an attribute as a bool, or the defaultValue if the property is not found.
GetPropertyColorReturn the value of an attribute as a Color, or the defaultValue if the property is not found.
GetPropertyDoubleReturn the value of an attribute as a double, or the defaultValue if the property is not found.
GetPropertyEnumReturn the value of an attribute as a T, or the defaultValue if the property is not found.
GetPropertyFloatReturn the value of an attribute as a float, or the defaultValue if the property is not found.
GetPropertyIntReturn the value of an attribute as an int, or the defaultValue if the property is not found.
GetPropertyLongReturn the value of an attribute as a long, or the defaultValue if the property is not found.
GetPropertyStringReturn the value of an attribute as a string, or the defaultValue if the property is not found.