format
typescript
List.InsertRange(index, objects)class: List
description
Inserts a group of elements at the specified index position in the list.
parameter
| param_name | type | description |
|---|---|---|
| index | number | The index value. |
| objects | T[]List<T> | The group of elements. |
reture
| type | description |
|---|---|
void |
code example
typescript
let list = new List<Number>(Number);
list.AddRange([100, 200]);
// Insert the group of elements [10,20] at index 0
list.InsertRange(0,[10,20]);
for (let index = 0; index < list.count; index++) {
Debug.Log(list.get(index));
}