Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


RemoveAtSwapBack(int)

Copies the last element of this list to an index. Decrements the length by 1.
Read time 1 minuteLast updated 10 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule
public void RemoveAtSwapBack(int index)

Parameters

index

The index to overwrite with the last element.

Remarks

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