Documentation

Unity Engine

Unity Engine

RemoveAtSwapBack(int)

Copies the last element of this list to the specified index. Decrements the length by 1.
Read time 1 minuteLast updated a month ago

Definition

public void RemoveAtSwapBack(int index)

Parameters

index

The index to overwrite with the last element.

Remarks

Useful as a cheap way to remove an element from this list when you don't care about preserving order.