diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-02-20 10:50:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-20 10:50:53 +0100 |
commit | 5db6e371b3e96aff21bf406ee841732243b0c042 (patch) | |
tree | 54efc4eb30c470887554a77856ecc84332d40d79 | |
parent | 7376cbdc94f2c00f006b153e33349fe605e2112a (diff) | |
parent | ec94370053f1a5b46a05172b0aea7b2311578a7d (diff) |
Merge pull request #26043 from JosephCatrambone/master
Add some documentation for methods that return Copy-on-Write arrays.
-rw-r--r-- | doc/classes/CollisionPolygon.xml | 2 | ||||
-rw-r--r-- | doc/classes/CollisionPolygon2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/OccluderPolygon2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/Polygon2D.xml | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/doc/classes/CollisionPolygon.xml b/doc/classes/CollisionPolygon.xml index 28e9ba4217..0b4f07578e 100644 --- a/doc/classes/CollisionPolygon.xml +++ b/doc/classes/CollisionPolygon.xml @@ -20,7 +20,7 @@ If true, no collision will be produced. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - Array of vertices which define the polygon. + Array of vertices which define the polygon. Note that the returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index 3dd87a4120..e754a2f2d1 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -25,7 +25,7 @@ <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin"> </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - The polygon's list of vertices. The final point will be connected to the first. + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. </member> </members> <constants> diff --git a/doc/classes/OccluderPolygon2D.xml b/doc/classes/OccluderPolygon2D.xml index 58ad268f05..b8adc4c96f 100644 --- a/doc/classes/OccluderPolygon2D.xml +++ b/doc/classes/OccluderPolygon2D.xml @@ -20,7 +20,7 @@ Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code]. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - A [Vector2] array with the index for polygon's vertices positions. + A [Vector2] array with the index for polygon's vertices positions. Note that the returned value is a copy of the underlying array, rather than a reference. </member> </members> <constants> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 9803837e5d..31ee0a9490 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -99,7 +99,7 @@ The offset applied to each vertex. </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon"> - The polygon's list of vertices. The final point will be connected to the first. + The polygon's list of vertices. The final point will be connected to the first. Note that this returns a copy of the [PoolVector2Array] rather than a reference. </member> <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons"> </member> |