Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeList<T0>.InsertRange

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public void InsertRange(int index, int count);

Parameters

Parameter Description
index The index of the first element that will be shifted up.
count The number of elements to insert.

Description

Shifts elements toward the end of this list, increasing its length.

Right-shifts elements in the list so as to create 'free' slots at the beginning or in the middle.

The length is increased by count. If necessary, the capacity will be increased accordingly.

If count equals 0, the method does nothing.

The element at index index will be copied to index index + count, the element at index index + 1 will be copied to index + count + 1, and so forth.

The indexes index up to index + count are not cleared: they will contain whatever values they held prior.