mirror of
https://github.com/godotengine/godot-docs.git
synced 2025-12-31 17:49:03 +03:00
classref: Sync with current master branch (029aade)
This commit is contained in:
@@ -19,6 +19,10 @@ Description
|
||||
|
||||
An array specifically designed to hold :ref:`Vector2<class_Vector2>`. Packs data tightly, so it saves memory for large array sizes.
|
||||
|
||||
\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedVector3Array<class_PackedVector3Array>` versus ``Array[Vector2]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`Array.map<class_Array_method_map>`. Typed arrays are in turn faster to iterate on and modify than untyped arrays.
|
||||
|
||||
\ **Note:** Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate<class_PackedVector2Array_method_duplicate>`. This is *not* the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will *not* affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again.
|
||||
|
||||
.. note::
|
||||
|
||||
There are notable differences when using this API with C#. See :ref:`doc_c_sharp_differences` for more information.
|
||||
@@ -28,7 +32,7 @@ An array specifically designed to hold :ref:`Vector2<class_Vector2>`. Packs data
|
||||
Tutorials
|
||||
---------
|
||||
|
||||
- `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__
|
||||
- `Grid-based Navigation with AStarGrid2D Demo <https://godotengine.org/asset-library/asset/2723>`__
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
|
||||
Reference in New Issue
Block a user