ドキュメント

Unity Engine

Unity Engine

GetCustomRowHeight(int, TreeViewItem)

Override to control individual row heights.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

注意
Removed. TreeView is now deprecated. You can likely now use TreeView\<int\> instead and not think more about it. But if you were using that identifier to store EntityId data, you should instead opt to upgrade your TreeViews to use TreeView\<EntityId\> to get the proper typing.
protected virtual float GetCustomRowHeight(int row, TreeViewItem item)

Parameters

row

Row index.

Item for given row.

Returns

Type

Description

floatHeight of row.

Remarks

Override this method if custom row rects are needed for each row in the TreeView, for example if you have content that can vary in height depending on the content. This method is called internally by the TreeView for each row after BuildRows have been called. If this method is not overridden then the
rowHeight
property is used for all rows.
This method should only be overridden if row heights can differ; if all rows have same height then use the
rowHeight
property as this is more performant for large data sets.
The heights returned by this method are cached. To update the cache call RefreshCustomRowHeights.