Debian Codegraph @

doc/classes/TileSet.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <class name="TileSet" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Tile library for tilemaps.
5 </brief_description>
6 <description>
7 A TileSet is a library of tiles for a [TileMapLayer]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles.
8 Tiles can either be from a [TileSetAtlasSource], which renders tiles out of a texture with support for physics, navigation, etc., or from a [TileSetScenesCollectionSource], which exposes scene-based tiles.
9 Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID, and their alternative tile ID.
10 A TileSet can be configured so that its tiles expose more or fewer properties. To do so, the TileSet resources use property layers, which you can add or remove depending on your needs.
11 For example, adding a physics layer allows giving collision shapes to your tiles. Each layer has dedicated properties (physics layer and mask), so you may add several TileSet physics layers for each type of collision you need.
12 See the functions to add new layers for more information.
13 </description>
14 <tutorials>
15 <link title="Using Tilemaps">$DOCS_URL/tutorials/2d/using_tilemaps.html</link>
16 <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/2727</link>
17 <link title="2D Isometric Demo">https://godotengine.org/asset-library/asset/2718</link>
18 <link title="2D Hexagonal Demo">https://godotengine.org/asset-library/asset/2717</link>
19 <link title="2D Grid-based Navigation with AStarGrid2D Demo">https://godotengine.org/asset-library/asset/2723</link>
20 <link title="2D Role Playing Game (RPG) Demo">https://godotengine.org/asset-library/asset/2729</link>
21 <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/2719</link>
22 </tutorials>
23 <methods>
24 <method name="add_custom_data_layer">
25 <return type="void" />
26 <param index="0" name="to_position" type="int" default="-1" />
27 <description>
28 Adds a custom data layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
29 Custom data layers allow assigning custom properties to atlas tiles.
30 </description>
31 </method>
32 <method name="add_navigation_layer">
33 <return type="void" />
34 <param index="0" name="to_position" type="int" default="-1" />
35 <description>
36 Adds a navigation layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
37 Navigation layers allow assigning a navigable area to atlas tiles.
38 </description>
39 </method>
40 <method name="add_occlusion_layer">
41 <return type="void" />
42 <param index="0" name="to_position" type="int" default="-1" />
43 <description>
44 Adds an occlusion layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
45 Occlusion layers allow assigning occlusion polygons to atlas tiles.
46 </description>
47 </method>
48 <method name="add_pattern">
49 <return type="int" />
50 <param index="0" name="pattern" type="TileMapPattern" />
51 <param index="1" name="index" type="int" default="-1" />
52 <description>
53 Adds a [TileMapPattern] to be stored in the TileSet resource. If provided, insert it at the given [param index].
54 </description>
55 </method>
56 <method name="add_physics_layer">
57 <return type="void" />
58 <param index="0" name="to_position" type="int" default="-1" />
59 <description>
60 Adds a physics layer to the TileSet at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
61 Physics layers allow assigning collision polygons to atlas tiles.
62 </description>
63 </method>
64 <method name="add_source">
65 <return type="int" />
66 <param index="0" name="source" type="TileSetSource" />
67 <param index="1" name="atlas_source_id_override" type="int" default="-1" />
68 <description>
69 Adds a [TileSetSource] to the TileSet. If [param atlas_source_id_override] is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated.
70 The function returns the added source ID or -1 if the source could not be added.
71 [b]Warning:[/b] A source cannot belong to two TileSets at the same time. If the added source was attached to another [TileSet], it will be removed from that one.
72 </description>
73 </method>
74 <method name="add_terrain">
75 <return type="void" />
76 <param index="0" name="terrain_set" type="int" />
77 <param index="1" name="to_position" type="int" default="-1" />
78 <description>
79 Adds a new terrain to the given terrain set [param terrain_set] at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
80 </description>
81 </method>
82 <method name="add_terrain_set">
83 <return type="void" />
84 <param index="0" name="to_position" type="int" default="-1" />
85 <description>
86 Adds a new terrain set at the given position [param to_position] in the array. If [param to_position] is -1, adds it at the end of the array.
87 </description>
88 </method>
89 <method name="cleanup_invalid_tile_proxies">
90 <return type="void" />
91 <description>
92 Clears tile proxies pointing to invalid tiles.
93 </description>
94 </method>
95 <method name="clear_tile_proxies">
96 <return type="void" />
97 <description>
98 Clears all tile proxies.
99 </description>
100 </method>
101 <method name="get_alternative_level_tile_proxy">
102 <return type="Array" />
103 <param index="0" name="source_from" type="int" />
104 <param index="1" name="coords_from" type="Vector2i" />
105 <param index="2" name="alternative_from" type="int" />
106 <description>
107 Returns the alternative-level proxy for the given identifiers. The returned array contains the three proxie's target identifiers (source ID, atlas coords ID and alternative tile ID).
108 If the TileSet has no proxy for the given identifiers, returns an empty Array.
109 </description>
110 </method>
111 <method name="get_coords_level_tile_proxy">
112 <return type="Array" />
113 <param index="0" name="source_from" type="int" />
114 <param index="1" name="coords_from" type="Vector2i" />
115 <description>
116 Returns the coordinate-level proxy for the given identifiers. The returned array contains the two target identifiers of the proxy (source ID and atlas coordinates ID).
117 If the TileSet has no proxy for the given identifiers, returns an empty Array.
118 </description>
119 </method>
120 <method name="get_custom_data_layer_by_name" qualifiers="const">
121 <return type="int" />
122 <param index="0" name="layer_name" type="String" />
123 <description>
124 Returns the index of the custom data layer identified by the given name.
125 </description>
126 </method>
127 <method name="get_custom_data_layer_name" qualifiers="const">
128 <return type="String" />
129 <param index="0" name="layer_index" type="int" />
130 <description>
131 Returns the name of the custom data layer identified by the given index.
132 </description>
133 </method>
134 <method name="get_custom_data_layer_type" qualifiers="const">
135 <return type="int" enum="Variant.Type" />
136 <param index="0" name="layer_index" type="int" />
137 <description>
138 Returns the type of the custom data layer identified by the given index.
139 </description>
140 </method>
141 <method name="get_custom_data_layers_count" qualifiers="const">
142 <return type="int" />
143 <description>
144 Returns the custom data layers count.
145 </description>
146 </method>
147 <method name="get_navigation_layer_layer_value" qualifiers="const">
148 <return type="bool" />
149 <param index="0" name="layer_index" type="int" />
150 <param index="1" name="layer_number" type="int" />
151 <description>
152 Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index] is enabled, given a navigation_layers [param layer_number] between 1 and 32.
153 </description>
154 </method>
155 <method name="get_navigation_layer_layers" qualifiers="const">
156 <return type="int" />
157 <param index="0" name="layer_index" type="int" />
158 <description>
159 Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer.
160 </description>
161 </method>
162 <method name="get_navigation_layers_count" qualifiers="const">
163 <return type="int" />
164 <description>
165 Returns the navigation layers count.
166 </description>
167 </method>
168 <method name="get_next_source_id" qualifiers="const">
169 <return type="int" />
170 <description>
171 Returns a new unused source ID. This generated ID is the same that a call to [method add_source] would return.
172 </description>
173 </method>
174 <method name="get_occlusion_layer_light_mask" qualifiers="const">
175 <return type="int" />
176 <param index="0" name="layer_index" type="int" />
177 <description>
178 Returns the light mask of the occlusion layer.
179 </description>
180 </method>
181 <method name="get_occlusion_layer_sdf_collision" qualifiers="const">
182 <return type="bool" />
183 <param index="0" name="layer_index" type="int" />
184 <description>
185 Returns if the occluders from this layer use [code]sdf_collision[/code].
186 </description>
187 </method>
188 <method name="get_occlusion_layers_count" qualifiers="const">
189 <return type="int" />
190 <description>
191 Returns the occlusion layers count.
192 </description>
193 </method>
194 <method name="get_pattern">
195 <return type="TileMapPattern" />
196 <param index="0" name="index" type="int" default="-1" />
197 <description>
198 Returns the [TileMapPattern] at the given [param index].
199 </description>
200 </method>
201 <method name="get_patterns_count">
202 <return type="int" />
203 <description>
204 Returns the number of [TileMapPattern] this tile set handles.
205 </description>
206 </method>
207 <method name="get_physics_layer_collision_layer" qualifiers="const">
208 <return type="int" />
209 <param index="0" name="layer_index" type="int" />
210 <description>
211 Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.
212 </description>
213 </method>
214 <method name="get_physics_layer_collision_mask" qualifiers="const">
215 <return type="int" />
216 <param index="0" name="layer_index" type="int" />
217 <description>
218 Returns the collision mask of bodies on the given TileSet's physics layer.
219 </description>
220 </method>
221 <method name="get_physics_layer_collision_priority" qualifiers="const">
222 <return type="float" />
223 <param index="0" name="layer_index" type="int" />
224 <description>
225 Returns the collision priority of bodies on the given TileSet's physics layer.
226 </description>
227 </method>
228 <method name="get_physics_layer_physics_material" qualifiers="const">
229 <return type="PhysicsMaterial" />
230 <param index="0" name="layer_index" type="int" />
231 <description>
232 Returns the physics material of bodies on the given TileSet's physics layer.
233 </description>
234 </method>
235 <method name="get_physics_layers_count" qualifiers="const">
236 <return type="int" />
237 <description>
238 Returns the physics layers count.
239 </description>
240 </method>
241 <method name="get_source" qualifiers="const">
242 <return type="TileSetSource" />
243 <param index="0" name="source_id" type="int" />
244 <description>
245 Returns the [TileSetSource] with ID [param source_id].
246 </description>
247 </method>
248 <method name="get_source_count" qualifiers="const">
249 <return type="int" />
250 <description>
251 Returns the number of [TileSetSource] in this TileSet.
252 </description>
253 </method>
254 <method name="get_source_id" qualifiers="const">
255 <return type="int" />
256 <param index="0" name="index" type="int" />
257 <description>
258 Returns the source ID for source with index [param index].
259 </description>
260 </method>
261 <method name="get_source_level_tile_proxy">
262 <return type="int" />
263 <param index="0" name="source_from" type="int" />
264 <description>
265 Returns the source-level proxy for the given source identifier.
266 If the TileSet has no proxy for the given identifier, returns -1.
267 </description>
268 </method>
269 <method name="get_terrain_color" qualifiers="const">
270 <return type="Color" />
271 <param index="0" name="terrain_set" type="int" />
272 <param index="1" name="terrain_index" type="int" />
273 <description>
274 Returns a terrain's color.
275 </description>
276 </method>
277 <method name="get_terrain_name" qualifiers="const">
278 <return type="String" />
279 <param index="0" name="terrain_set" type="int" />
280 <param index="1" name="terrain_index" type="int" />
281 <description>
282 Returns a terrain's name.
283 </description>
284 </method>
285 <method name="get_terrain_set_mode" qualifiers="const">
286 <return type="int" enum="TileSet.TerrainMode" />
287 <param index="0" name="terrain_set" type="int" />
288 <description>
289 Returns a terrain set mode.
290 </description>
291 </method>
292 <method name="get_terrain_sets_count" qualifiers="const">
293 <return type="int" />
294 <description>
295 Returns the terrain sets count.
296 </description>
297 </method>
298 <method name="get_terrains_count" qualifiers="const">
299 <return type="int" />
300 <param index="0" name="terrain_set" type="int" />
301 <description>
302 Returns the number of terrains in the given terrain set.
303 </description>
304 </method>
305 <method name="has_alternative_level_tile_proxy">
306 <return type="bool" />
307 <param index="0" name="source_from" type="int" />
308 <param index="1" name="coords_from" type="Vector2i" />
309 <param index="2" name="alternative_from" type="int" />
310 <description>
311 Returns if there is an alternative-level proxy for the given identifiers.
312 </description>
313 </method>
314 <method name="has_coords_level_tile_proxy">
315 <return type="bool" />
316 <param index="0" name="source_from" type="int" />
317 <param index="1" name="coords_from" type="Vector2i" />
318 <description>
319 Returns if there is a coodinates-level proxy for the given identifiers.
320 </description>
321 </method>
322 <method name="has_custom_data_layer_by_name" qualifiers="const">
323 <return type="bool" />
324 <param index="0" name="layer_name" type="String" />
325 <description>
326 Returns if there is a custom data layer named [param layer_name].
327 </description>
328 </method>
329 <method name="has_source" qualifiers="const">
330 <return type="bool" />
331 <param index="0" name="source_id" type="int" />
332 <description>
333 Returns if this TileSet has a source for the given source ID.
334 </description>
335 </method>
336 <method name="has_source_level_tile_proxy">
337 <return type="bool" />
338 <param index="0" name="source_from" type="int" />
339 <description>
340 Returns if there is a source-level proxy for the given source ID.
341 </description>
342 </method>
343 <method name="map_tile_proxy" qualifiers="const">
344 <return type="Array" />
345 <param index="0" name="source_from" type="int" />
346 <param index="1" name="coords_from" type="Vector2i" />
347 <param index="2" name="alternative_from" type="int" />
348 <description>
349 According to the configured proxies, maps the provided identifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array.
350 This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies.
351 If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.
352 </description>
353 </method>
354 <method name="move_custom_data_layer">
355 <return type="void" />
356 <param index="0" name="layer_index" type="int" />
357 <param index="1" name="to_position" type="int" />
358 <description>
359 Moves the custom data layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
360 </description>
361 </method>
362 <method name="move_navigation_layer">
363 <return type="void" />
364 <param index="0" name="layer_index" type="int" />
365 <param index="1" name="to_position" type="int" />
366 <description>
367 Moves the navigation layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
368 </description>
369 </method>
370 <method name="move_occlusion_layer">
371 <return type="void" />
372 <param index="0" name="layer_index" type="int" />
373 <param index="1" name="to_position" type="int" />
374 <description>
375 Moves the occlusion layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
376 </description>
377 </method>
378 <method name="move_physics_layer">
379 <return type="void" />
380 <param index="0" name="layer_index" type="int" />
381 <param index="1" name="to_position" type="int" />
382 <description>
383 Moves the physics layer at index [param layer_index] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
384 </description>
385 </method>
386 <method name="move_terrain">
387 <return type="void" />
388 <param index="0" name="terrain_set" type="int" />
389 <param index="1" name="terrain_index" type="int" />
390 <param index="2" name="to_position" type="int" />
391 <description>
392 Moves the terrain at index [param terrain_index] for terrain set [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
393 </description>
394 </method>
395 <method name="move_terrain_set">
396 <return type="void" />
397 <param index="0" name="terrain_set" type="int" />
398 <param index="1" name="to_position" type="int" />
399 <description>
400 Moves the terrain set at index [param terrain_set] to the given position [param to_position] in the array. Also updates the atlas tiles accordingly.
401 </description>
402 </method>
403 <method name="remove_alternative_level_tile_proxy">
404 <return type="void" />
405 <param index="0" name="source_from" type="int" />
406 <param index="1" name="coords_from" type="Vector2i" />
407 <param index="2" name="alternative_from" type="int" />
408 <description>
409 Removes an alternative-level proxy for the given identifiers.
410 </description>
411 </method>
412 <method name="remove_coords_level_tile_proxy">
413 <return type="void" />
414 <param index="0" name="source_from" type="int" />
415 <param index="1" name="coords_from" type="Vector2i" />
416 <description>
417 Removes a coordinates-level proxy for the given identifiers.
418 </description>
419 </method>
420 <method name="remove_custom_data_layer">
421 <return type="void" />
422 <param index="0" name="layer_index" type="int" />
423 <description>
424 Removes the custom data layer at index [param layer_index]. Also updates the atlas tiles accordingly.
425 </description>
426 </method>
427 <method name="remove_navigation_layer">
428 <return type="void" />
429 <param index="0" name="layer_index" type="int" />
430 <description>
431 Removes the navigation layer at index [param layer_index]. Also updates the atlas tiles accordingly.
432 </description>
433 </method>
434 <method name="remove_occlusion_layer">
435 <return type="void" />
436 <param index="0" name="layer_index" type="int" />
437 <description>
438 Removes the occlusion layer at index [param layer_index]. Also updates the atlas tiles accordingly.
439 </description>
440 </method>
441 <method name="remove_pattern">
442 <return type="void" />
443 <param index="0" name="index" type="int" />
444 <description>
445 Remove the [TileMapPattern] at the given index.
446 </description>
447 </method>
448 <method name="remove_physics_layer">
449 <return type="void" />
450 <param index="0" name="layer_index" type="int" />
451 <description>
452 Removes the physics layer at index [param layer_index]. Also updates the atlas tiles accordingly.
453 </description>
454 </method>
455 <method name="remove_source">
456 <return type="void" />
457 <param index="0" name="source_id" type="int" />
458 <description>
459 Removes the source with the given source ID.
460 </description>
461 </method>
462 <method name="remove_source_level_tile_proxy">
463 <return type="void" />
464 <param index="0" name="source_from" type="int" />
465 <description>
466 Removes a source-level tile proxy.
467 </description>
468 </method>
469 <method name="remove_terrain">
470 <return type="void" />
471 <param index="0" name="terrain_set" type="int" />
472 <param index="1" name="terrain_index" type="int" />
473 <description>
474 Removes the terrain at index [param terrain_index] in the given terrain set [param terrain_set]. Also updates the atlas tiles accordingly.
475 </description>
476 </method>
477 <method name="remove_terrain_set">
478 <return type="void" />
479 <param index="0" name="terrain_set" type="int" />
480 <description>
481 Removes the terrain set at index [param terrain_set]. Also updates the atlas tiles accordingly.
482 </description>
483 </method>
484 <method name="set_alternative_level_tile_proxy">
485 <return type="void" />
486 <param index="0" name="source_from" type="int" />
487 <param index="1" name="coords_from" type="Vector2i" />
488 <param index="2" name="alternative_from" type="int" />
489 <param index="3" name="source_to" type="int" />
490 <param index="4" name="coords_to" type="Vector2i" />
491 <param index="5" name="alternative_to" type="int" />
492 <description>
493 Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
494 Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
495 </description>
496 </method>
497 <method name="set_coords_level_tile_proxy">
498 <return type="void" />
499 <param index="0" name="p_source_from" type="int" />
500 <param index="1" name="coords_from" type="Vector2i" />
501 <param index="2" name="source_to" type="int" />
502 <param index="3" name="coords_to" type="Vector2i" />
503 <description>
504 Creates a coordinates-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers. The alternative tile ID is kept the same when using coordinates-level proxies.
505 Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
506 </description>
507 </method>
508 <method name="set_custom_data_layer_name">
509 <return type="void" />
510 <param index="0" name="layer_index" type="int" />
511 <param index="1" name="layer_name" type="String" />
512 <description>
513 Sets the name of the custom data layer identified by the given index. Names are identifiers of the layer therefore if the name is already taken it will fail and raise an error.
514 </description>
515 </method>
516 <method name="set_custom_data_layer_type">
517 <return type="void" />
518 <param index="0" name="layer_index" type="int" />
519 <param index="1" name="layer_type" type="int" enum="Variant.Type" />
520 <description>
521 Sets the type of the custom data layer identified by the given index.
522 </description>
523 </method>
524 <method name="set_navigation_layer_layer_value">
525 <return type="void" />
526 <param index="0" name="layer_index" type="int" />
527 <param index="1" name="layer_number" type="int" />
528 <param index="2" name="value" type="bool" />
529 <description>
530 Based on [param value], enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given [param layer_index], given a navigation_layers [param layer_number] between 1 and 32.
531 </description>
532 </method>
533 <method name="set_navigation_layer_layers">
534 <return type="void" />
535 <param index="0" name="layer_index" type="int" />
536 <param index="1" name="layers" type="int" />
537 <description>
538 Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer.
539 </description>
540 </method>
541 <method name="set_occlusion_layer_light_mask">
542 <return type="void" />
543 <param index="0" name="layer_index" type="int" />
544 <param index="1" name="light_mask" type="int" />
545 <description>
546 Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.
547 </description>
548 </method>
549 <method name="set_occlusion_layer_sdf_collision">
550 <return type="void" />
551 <param index="0" name="layer_index" type="int" />
552 <param index="1" name="sdf_collision" type="bool" />
553 <description>
554 Enables or disables SDF collision for occluders in the given TileSet occlusion layer.
555 </description>
556 </method>
557 <method name="set_physics_layer_collision_layer">
558 <return type="void" />
559 <param index="0" name="layer_index" type="int" />
560 <param index="1" name="layer" type="int" />
561 <description>
562 Sets the collision layer (as in the physics server) for bodies in the given TileSet physics layer.
563 </description>
564 </method>
565 <method name="set_physics_layer_collision_mask">
566 <return type="void" />
567 <param index="0" name="layer_index" type="int" />
568 <param index="1" name="mask" type="int" />
569 <description>
570 Sets the collision mask for bodies in the given TileSet physics layer.
571 </description>
572 </method>
573 <method name="set_physics_layer_collision_priority">
574 <return type="void" />
575 <param index="0" name="layer_index" type="int" />
576 <param index="1" name="priority" type="float" />
577 <description>
578 Sets the collision priority for bodies in the given TileSet physics layer.
579 </description>
580 </method>
581 <method name="set_physics_layer_physics_material">
582 <return type="void" />
583 <param index="0" name="layer_index" type="int" />
584 <param index="1" name="physics_material" type="PhysicsMaterial" />
585 <description>
586 Sets the physics material for bodies in the given TileSet physics layer.
587 </description>
588 </method>
589 <method name="set_source_id">
590 <return type="void" />
591 <param index="0" name="source_id" type="int" />
592 <param index="1" name="new_source_id" type="int" />
593 <description>
594 Changes a source's ID.
595 </description>
596 </method>
597 <method name="set_source_level_tile_proxy">
598 <return type="void" />
599 <param index="0" name="source_from" type="int" />
600 <param index="1" name="source_to" type="int" />
601 <description>
602 Creates a source-level proxy for the given source ID. A proxy will map set of tile identifiers to another set of identifiers. Both the atlas coordinates ID and the alternative tile ID are kept the same when using source-level proxies.
603 Proxied tiles can be automatically replaced in TileMapLayer nodes using the editor.
604 </description>
605 </method>
606 <method name="set_terrain_color">
607 <return type="void" />
608 <param index="0" name="terrain_set" type="int" />
609 <param index="1" name="terrain_index" type="int" />
610 <param index="2" name="color" type="Color" />
611 <description>
612 Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.
613 </description>
614 </method>
615 <method name="set_terrain_name">
616 <return type="void" />
617 <param index="0" name="terrain_set" type="int" />
618 <param index="1" name="terrain_index" type="int" />
619 <param index="2" name="name" type="String" />
620 <description>
621 Sets a terrain's name.
622 </description>
623 </method>
624 <method name="set_terrain_set_mode">
625 <return type="void" />
626 <param index="0" name="terrain_set" type="int" />
627 <param index="1" name="mode" type="int" enum="TileSet.TerrainMode" />
628 <description>
629 Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.
630 </description>
631 </method>
632 </methods>
633 <members>
634 <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0">
635 For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the [TileMapLayer] grid.
636 </member>
637 <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0">
638 For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis.
639 </member>
640 <member name="tile_shape" type="int" setter="set_tile_shape" getter="get_tile_shape" enum="TileSet.TileShape" default="0">
641 The tile shape.
642 </member>
643 <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)">
644 The tile size, in pixels. For all tile shapes, this size corresponds to the encompassing rectangle of the tile shape. This is thus the minimal cell size required in an atlas.
645 </member>
646 <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false">
647 Enables/Disable uv clipping when rendering the tiles.
648 </member>
649 </members>
650 <constants>
651 <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape">
652 Rectangular tile shape.
653 </constant>
654 <constant name="TILE_SHAPE_ISOMETRIC" value="1" enum="TileShape">
655 Diamond tile shape (for isometric look).
656 [b]Note:[/b] Isometric [TileSet] works best if all sibling [TileMapLayer]s and their parent inheriting from [Node2D] have Y-sort enabled.
657 </constant>
658 <constant name="TILE_SHAPE_HALF_OFFSET_SQUARE" value="2" enum="TileShape">
659 Rectangular tile shape with one row/column out of two offset by half a tile.
660 </constant>
661 <constant name="TILE_SHAPE_HEXAGON" value="3" enum="TileShape">
662 Hexagonal tile shape.
663 </constant>
664 <constant name="TILE_LAYOUT_STACKED" value="0" enum="TileLayout">
665 Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
666 </constant>
667 <constant name="TILE_LAYOUT_STACKED_OFFSET" value="1" enum="TileLayout">
668 Same as [constant TILE_LAYOUT_STACKED], but the first half-offset is negative instead of positive.
669 </constant>
670 <constant name="TILE_LAYOUT_STAIRS_RIGHT" value="2" enum="TileLayout">
671 Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
672 </constant>
673 <constant name="TILE_LAYOUT_STAIRS_DOWN" value="3" enum="TileLayout">
674 Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.
675 </constant>
676 <constant name="TILE_LAYOUT_DIAMOND_RIGHT" value="4" enum="TileLayout">
677 Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
678 </constant>
679 <constant name="TILE_LAYOUT_DIAMOND_DOWN" value="5" enum="TileLayout">
680 Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
681 </constant>
682 <constant name="TILE_OFFSET_AXIS_HORIZONTAL" value="0" enum="TileOffsetAxis">
683 Horizontal half-offset.
684 </constant>
685 <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis">
686 Vertical half-offset.
687 </constant>
688 <constant name="CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor">
689 Neighbor on the right side.
690 </constant>
691 <constant name="CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor">
692 Neighbor in the right corner.
693 </constant>
694 <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor">
695 Neighbor on the bottom right side.
696 </constant>
697 <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor">
698 Neighbor in the bottom right corner.
699 </constant>
700 <constant name="CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor">
701 Neighbor on the bottom side.
702 </constant>
703 <constant name="CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor">
704 Neighbor in the bottom corner.
705 </constant>
706 <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor">
707 Neighbor on the bottom left side.
708 </constant>
709 <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor">
710 Neighbor in the bottom left corner.
711 </constant>
712 <constant name="CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor">
713 Neighbor on the left side.
714 </constant>
715 <constant name="CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor">
716 Neighbor in the left corner.
717 </constant>
718 <constant name="CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor">
719 Neighbor on the top left side.
720 </constant>
721 <constant name="CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor">
722 Neighbor in the top left corner.
723 </constant>
724 <constant name="CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor">
725 Neighbor on the top side.
726 </constant>
727 <constant name="CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor">
728 Neighbor in the top corner.
729 </constant>
730 <constant name="CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor">
731 Neighbor on the top right side.
732 </constant>
733 <constant name="CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor">
734 Neighbor in the top right corner.
735 </constant>
736 <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode">
737 Requires both corners and side to match with neighboring tiles' terrains.
738 </constant>
739 <constant name="TERRAIN_MODE_MATCH_CORNERS" value="1" enum="TerrainMode">
740 Requires corners to match with neighboring tiles' terrains.
741 </constant>
742 <constant name="TERRAIN_MODE_MATCH_SIDES" value="2" enum="TerrainMode">
743 Requires sides to match with neighboring tiles' terrains.
744 </constant>
745 </constants>
746 </class>