ArrayUtility Manual     Reference     Scripting  
Scripting > Editor Classes > ArrayUtility
ArrayUtility

Helpers for builtin arrays ...

Note: This is an editor class. To use it you have to place your script in Assets/Editor inside your project folder. Editor classes are in the UnityEditor namespace so for C# scripts you need to add "using UnityEditor;" at the beginning of the script.

Class Functions
Add

appends item to the end of array

ArrayEquals

compares two arrays

AddRange

appends items to the end of array

Insert

inserts item item at position index

Remove

removes item from array

Find

Find the first element that satisfies the predicate

FindIndex

Find the index of the first element that satisfies the predicate

IndexOf

index of first element with value value

LastIndexOf

index of the last element with value value

RemoveAt

remove element at position index

Contains

determines if the array contains the item

Clear

Clears the array