Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


selectedIndices

Returns the indices of selected items in the data source. Always returns an enumerable, even if no item is selected, or a single item is selected.
Read time 1 minuteLast updated 12 days ago

Definition

public IEnumerable<int> selectedIndices { get; }

Remarks

In a tree, if a child item is collapsed, its index is not included in the selection. To get selected items regardless of whether they are collapsed or not, use BaseVerticalCollectionView.selectedIds instead.