Add warnings to docs for methods that return copies, not refs.
This commit is contained in:
parent
1174d10e3c
commit
ec94370053
4 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@
|
||||||
If true, no collision will be produced.
|
If true, no collision will be produced.
|
||||||
</member>
|
</member>
|
||||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -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 name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin">
|
||||||
</member>
|
</member>
|
||||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
|
Set the direction of the occlusion culling when not [code]CULL_DISABLED[/code]. Default value [code]DISABLED[/code].
|
||||||
</member>
|
</member>
|
||||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
|
<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>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
|
|
@ -99,7 +99,7 @@
|
||||||
The offset applied to each vertex.
|
The offset applied to each vertex.
|
||||||
</member>
|
</member>
|
||||||
<member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon">
|
<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>
|
||||||
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons">
|
<member name="polygons" type="Array" setter="set_polygons" getter="get_polygons">
|
||||||
</member>
|
</member>
|
||||||
|
|
Loading…
Reference in a new issue