Interface IXRFilterList<T>
A list of items.
Namespace: UnityEngine.XR.Interaction.Toolkit.Filtering
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
public interface IXRFilterList<T>
Type Parameters
Name | Description |
---|---|
T | The type of the items in this list. |
Properties
count
The number of items in this list.
Declaration
int count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Add(T)
Adds the given item to the end of this list.
Declaration
void Add(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to add. |
Clear()
Removes all items from this list.
Declaration
void Clear()
GetAll(List<T>)
Returns all items into List results
.
Declaration
void GetAll(List<T> results)
Parameters
Type | Name | Description |
---|---|---|
List<T> | results | List to receive all items. |
Remarks
Clears results
before adding to it.
GetAt(int)
Returns the item at index
in this list.
Declaration
T GetAt(int index)
Parameters
Type | Name | Description |
---|---|---|
int | index | Index of the item to return. Must be smaller than count and not negative. |
Returns
Type | Description |
---|---|
T | Returns the item at the given index. |
MoveTo(T, int)
Moves the given item in this list. If the given item is not in this list, this can be used to insert the item at the specified index.
Declaration
void MoveTo(T item, int newIndex)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to move or add. |
int | newIndex | New index of the item. |
Remove(T)
Removes the given item from this list.
Declaration
bool Remove(T item)
Parameters
Type | Name | Description |
---|---|---|
T | item | The item to remove. |
Returns
Type | Description |
---|---|
bool | Returns true if |