Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BaseVerticalCollectionView

Creates a BaseVerticalCollectionView with all default properties. The _itemsSource must all be set for the BaseVerticalCollectionView to function properly.
Read time 1 minuteLast updated 8 days ago

Definition

BaseVerticalCollectionView()

Creates a BaseVerticalCollectionView with all default properties. The _itemsSource must all be set for the BaseVerticalCollectionView to function properly.
public BaseVerticalCollectionView()

BaseVerticalCollectionView(IList, float)

Constructs a BaseVerticalCollectionView, with all required properties provided.
public BaseVerticalCollectionView(IList itemsSource, float itemHeight = -1)

Parameters

itemsSource

The list of items to use as a data source.

itemHeight

The height of each item, in pixels. For
FixedHeight
virtualization only.

BaseVerticalCollectionView(IList, float, Func<VisualElement>, Action<VisualElement, int>)

Obsolete. Use ListView or TreeView constructor directly.
Warning
Deprecated. makeItem and bindItem are now in ListView and TreeView directly, please use a constructor without these parameters.
public BaseVerticalCollectionView(IList itemsSource, float itemHeight = -1, Func<VisualElement> makeItem = null, Action<VisualElement, int> bindItem = null)

Parameters

itemsSource

The list of items to use as a data source.

itemHeight

The height of each item, in pixels. For
FixedHeight
virtualization only.

The factory method to call to create a display item. The method should return a VisualElement that can be bound to a data item.

The method to call to bind a data item to a display item. The method receives as parameters the display item to bind, and the index of the data item to bind it to.