ドキュメント

Unity Engine

Unity Engine

RemoveAt(int)

Removes a child, at the provided index, from the contentContainer of the current element.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

public void RemoveAt(int index)

Parameters

index

Remarks

Removes the element from both the child list and the layout list. This also releases the rendering data of the element at the index and its descendants. As a result, this is an O(n) operation where n is the total number of descendants.
If the index is out of range, an exception will be thrown.
Note: Avoid removing an element during a layout pass to prevent invalid operation exceptions and potential side effects.