You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #111817 from charjr/fix-array-remove-at
Correct Array `remove_at()` class reference
This commit is contained in:
@@ -684,7 +684,6 @@
|
||||
Removes the element from the array at the given index ([param position]). If the index is out of bounds, this method fails. If the index is negative, [param position] is considered relative to the end of the array.
|
||||
If you need to return the removed element, use [method pop_at]. To remove an element by value, use [method erase] instead.
|
||||
[b]Note:[/b] This method shifts every element's index after [param position] back, which may have a noticeable performance cost, especially on larger arrays.
|
||||
[b]Note:[/b] The [param position] cannot be negative. To remove an element relative to the end of the array, use [code]arr.remove_at(arr.size() - (i + 1))[/code]. To remove the last element from the array, use [code]arr.resize(arr.size() - 1)[/code].
|
||||
</description>
|
||||
</method>
|
||||
<method name="resize">
|
||||
|
||||
Reference in New Issue
Block a user