@@ -79,6 +79,13 @@ public open class AStarGrid2D : RefCounted() {
7979 /* *
8080 * The region of grid cells available for pathfinding. If changed, [update] needs to be called
8181 * before finding the next path.
82+ *
83+ * **Warning:**
84+ * Be careful when trying to modify a local
85+ * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
86+ * getter.
87+ * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
88+ * afterward.
8289 */
8390 @CoreTypeLocalCopy
8491 public final inline var region: Rect2i
@@ -92,6 +99,13 @@ public open class AStarGrid2D : RefCounted() {
9299 /* *
93100 * The size of the grid (number of cells of size [cellSize] on each axis). If changed, [update]
94101 * needs to be called before finding the next path.
102+ *
103+ * **Warning:**
104+ * Be careful when trying to modify a local
105+ * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
106+ * getter.
107+ * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
108+ * afterward.
95109 */
96110 @CoreTypeLocalCopy
97111 public final inline var size: Vector2i
@@ -105,6 +119,13 @@ public open class AStarGrid2D : RefCounted() {
105119 /* *
106120 * The offset of the grid which will be applied to calculate the resulting point position returned
107121 * by [getPointPath]. If changed, [update] needs to be called before finding the next path.
122+ *
123+ * **Warning:**
124+ * Be careful when trying to modify a local
125+ * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
126+ * getter.
127+ * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
128+ * afterward.
108129 */
109130 @CoreTypeLocalCopy
110131 public final inline var offset: Vector2
@@ -118,6 +139,13 @@ public open class AStarGrid2D : RefCounted() {
118139 /* *
119140 * The size of the point cell which will be applied to calculate the resulting point position
120141 * returned by [getPointPath]. If changed, [update] needs to be called before finding the next path.
142+ *
143+ * **Warning:**
144+ * Be careful when trying to modify a local
145+ * [copy](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types) obtained from this
146+ * getter.
147+ * Mutating it alone won't have any effect on the actual property, it has to be reassigned again
148+ * afterward.
121149 */
122150 @CoreTypeLocalCopy
123151 public final inline var cellSize: Vector2
@@ -196,14 +224,7 @@ public open class AStarGrid2D : RefCounted() {
196224 }
197225
198226 /* *
199- * The region of grid cells available for pathfinding. If changed, [update] needs to be called
200- * before finding the next path.
201- *
202- * This is a helper function to make dealing with local copies easier.
203- *
204- * For more information, see our
205- * [documentation](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types).
206- *
227+ * This is a helper function for [region] to make dealing with local copies easier.
207228 * Allow to directly modify the local copy of the property and assign it back to the Object.
208229 *
209230 * Prefer that over writing:
@@ -212,23 +233,18 @@ public open class AStarGrid2D : RefCounted() {
212233 * //Your changes
213234 * astargrid2d.region = myCoreType
214235 * ``````
236+ *
237+ * The region of grid cells available for pathfinding. If changed, [update] needs to be called
238+ * before finding the next path.
215239 */
216240 @CoreTypeHelper
217- public final fun regionMutate (block : Rect2i .() -> Unit ): Rect2i = region.apply {
218- block(this )
219- region = this
241+ public final fun regionMutate (block : Rect2i .() -> Unit ): Rect2i = region.apply {
242+ block(this )
243+ region = this
220244 }
221245
222-
223246 /* *
224- * The size of the grid (number of cells of size [cellSize] on each axis). If changed, [update]
225- * needs to be called before finding the next path.
226- *
227- * This is a helper function to make dealing with local copies easier.
228- *
229- * For more information, see our
230- * [documentation](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types).
231- *
247+ * This is a helper function for [size] to make dealing with local copies easier.
232248 * Allow to directly modify the local copy of the property and assign it back to the Object.
233249 *
234250 * Prefer that over writing:
@@ -237,23 +253,18 @@ public open class AStarGrid2D : RefCounted() {
237253 * //Your changes
238254 * astargrid2d.size = myCoreType
239255 * ``````
256+ *
257+ * The size of the grid (number of cells of size [cellSize] on each axis). If changed, [update]
258+ * needs to be called before finding the next path.
240259 */
241260 @CoreTypeHelper
242- public final fun sizeMutate (block : Vector2i .() -> Unit ): Vector2i = size.apply {
243- block(this )
244- size = this
261+ public final fun sizeMutate (block : Vector2i .() -> Unit ): Vector2i = size.apply {
262+ block(this )
263+ size = this
245264 }
246265
247-
248266 /* *
249- * The offset of the grid which will be applied to calculate the resulting point position returned
250- * by [getPointPath]. If changed, [update] needs to be called before finding the next path.
251- *
252- * This is a helper function to make dealing with local copies easier.
253- *
254- * For more information, see our
255- * [documentation](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types).
256- *
267+ * This is a helper function for [offset] to make dealing with local copies easier.
257268 * Allow to directly modify the local copy of the property and assign it back to the Object.
258269 *
259270 * Prefer that over writing:
@@ -262,23 +273,18 @@ public open class AStarGrid2D : RefCounted() {
262273 * //Your changes
263274 * astargrid2d.offset = myCoreType
264275 * ``````
276+ *
277+ * The offset of the grid which will be applied to calculate the resulting point position returned
278+ * by [getPointPath]. If changed, [update] needs to be called before finding the next path.
265279 */
266280 @CoreTypeHelper
267- public final fun offsetMutate (block : Vector2 .() -> Unit ): Vector2 = offset.apply {
268- block(this )
269- offset = this
281+ public final fun offsetMutate (block : Vector2 .() -> Unit ): Vector2 = offset.apply {
282+ block(this )
283+ offset = this
270284 }
271285
272-
273286 /* *
274- * The size of the point cell which will be applied to calculate the resulting point position
275- * returned by [getPointPath]. If changed, [update] needs to be called before finding the next path.
276- *
277- * This is a helper function to make dealing with local copies easier.
278- *
279- * For more information, see our
280- * [documentation](https://godot-kotl.in/en/stable/user-guide/api-differences/#core-types).
281- *
287+ * This is a helper function for [cellSize] to make dealing with local copies easier.
282288 * Allow to directly modify the local copy of the property and assign it back to the Object.
283289 *
284290 * Prefer that over writing:
@@ -287,14 +293,16 @@ public open class AStarGrid2D : RefCounted() {
287293 * //Your changes
288294 * astargrid2d.cellSize = myCoreType
289295 * ``````
296+ *
297+ * The size of the point cell which will be applied to calculate the resulting point position
298+ * returned by [getPointPath]. If changed, [update] needs to be called before finding the next path.
290299 */
291300 @CoreTypeHelper
292- public final fun cellSizeMutate (block : Vector2 .() -> Unit ): Vector2 = cellSize.apply {
293- block(this )
294- cellSize = this
301+ public final fun cellSizeMutate (block : Vector2 .() -> Unit ): Vector2 = cellSize.apply {
302+ block(this )
303+ cellSize = this
295304 }
296305
297-
298306 /* *
299307 * Called when estimating the cost between a point and the path's ending point.
300308 *
0 commit comments