Version: 2018.2
public static float GetPropertyHeight (SerializedProperty property, bool includeChildren);
public static float GetPropertyHeight (SerializedPropertyType type, GUIContent label);
public static float GetPropertyHeight (SerializedProperty property, GUIContent label= null, bool includeChildren= true);

パラメーター

propertyプロパティー領域の高さ
label説明するテキストやイメージ
includeChildren返される高さは子プロパティーの高さを含む必要があるか。

説明

PropertyField 制御に必要な高さを取得します。

The height is based on the type of the SerializedProperty, and inclues the height of all expanded children if the includeChildren parameter is set to true, which is the default. If the property has a custom PropertyDrawer, the function will return the height returned by that drawer. The includeChildren parameter is ignored in that case, as PropertyDrawers always include children.

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