class_tileset.rst 102 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/TileSet.xml.
  6. .. _class_TileSet:
  7. TileSet
  8. =======
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Tile library for tilemaps.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A TileSet is a library of tiles for a :ref:`TileMap<class_TileMap>`. A TileSet handles a list of :ref:`TileSetSource<class_TileSetSource>`, each of them storing a set of tiles.
  15. Tiles can either be from a :ref:`TileSetAtlasSource<class_TileSetAtlasSource>`, that render tiles out of a texture with support for physics, navigation, etc... or from a :ref:`TileSetScenesCollectionSource<class_TileSetScenesCollectionSource>` which exposes scene-based tiles.
  16. Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID.
  17. A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs.
  18. For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer and mask), you may add several TileSet physics layers for each type of collision you need.
  19. See the functions to add new layers for more information.
  20. .. rst-class:: classref-introduction-group
  21. Tutorials
  22. ---------
  23. - :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>`
  24. - `2D Platformer Demo <https://godotengine.org/asset-library/asset/120>`__
  25. - `2D Isometric Demo <https://godotengine.org/asset-library/asset/112>`__
  26. - `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/111>`__
  27. - `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__
  28. - `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__
  29. - `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__
  30. .. rst-class:: classref-reftable-group
  31. Properties
  32. ----------
  33. .. table::
  34. :widths: auto
  35. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  36. | :ref:`TileLayout<enum_TileSet_TileLayout>` | :ref:`tile_layout<class_TileSet_property_tile_layout>` | ``0`` |
  37. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  38. | :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` | :ref:`tile_offset_axis<class_TileSet_property_tile_offset_axis>` | ``0`` |
  39. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  40. | :ref:`TileShape<enum_TileSet_TileShape>` | :ref:`tile_shape<class_TileSet_property_tile_shape>` | ``0`` |
  41. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  42. | :ref:`Vector2i<class_Vector2i>` | :ref:`tile_size<class_TileSet_property_tile_size>` | ``Vector2i(16, 16)`` |
  43. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  44. | :ref:`bool<class_bool>` | :ref:`uv_clipping<class_TileSet_property_uv_clipping>` | ``false`` |
  45. +----------------------------------------------------+------------------------------------------------------------------+----------------------+
  46. .. rst-class:: classref-reftable-group
  47. Methods
  48. -------
  49. .. table::
  50. :widths: auto
  51. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | void | :ref:`add_custom_data_layer<class_TileSet_method_add_custom_data_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** |
  53. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | void | :ref:`add_navigation_layer<class_TileSet_method_add_navigation_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** |
  55. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | void | :ref:`add_occlusion_layer<class_TileSet_method_add_occlusion_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** |
  57. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`int<class_int>` | :ref:`add_pattern<class_TileSet_method_add_pattern>` **(** :ref:`TileMapPattern<class_TileMapPattern>` pattern, :ref:`int<class_int>` index=-1 **)** |
  59. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | void | :ref:`add_physics_layer<class_TileSet_method_add_physics_layer>` **(** :ref:`int<class_int>` to_position=-1 **)** |
  61. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`add_source<class_TileSet_method_add_source>` **(** :ref:`TileSetSource<class_TileSetSource>` source, :ref:`int<class_int>` atlas_source_id_override=-1 **)** |
  63. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`add_terrain<class_TileSet_method_add_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position=-1 **)** |
  65. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`add_terrain_set<class_TileSet_method_add_terrain_set>` **(** :ref:`int<class_int>` to_position=-1 **)** |
  67. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`cleanup_invalid_tile_proxies<class_TileSet_method_cleanup_invalid_tile_proxies>` **(** **)** |
  69. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`clear_tile_proxies<class_TileSet_method_clear_tile_proxies>` **(** **)** |
  71. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`Array<class_Array>` | :ref:`get_alternative_level_tile_proxy<class_TileSet_method_get_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |
  73. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Array<class_Array>` | :ref:`get_coords_level_tile_proxy<class_TileSet_method_get_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** |
  75. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`int<class_int>` | :ref:`get_custom_data_layer_by_name<class_TileSet_method_get_custom_data_layer_by_name>` **(** :ref:`String<class_String>` layer_name **)** |const| |
  77. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`String<class_String>` | :ref:`get_custom_data_layer_name<class_TileSet_method_get_custom_data_layer_name>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  79. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` | :ref:`get_custom_data_layer_type<class_TileSet_method_get_custom_data_layer_type>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  81. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`int<class_int>` | :ref:`get_custom_data_layers_count<class_TileSet_method_get_custom_data_layers_count>` **(** **)** |const| |
  83. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`get_navigation_layer_layer_value<class_TileSet_method_get_navigation_layer_layer_value>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number **)** |const| |
  85. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`int<class_int>` | :ref:`get_navigation_layer_layers<class_TileSet_method_get_navigation_layer_layers>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  87. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`get_navigation_layers_count<class_TileSet_method_get_navigation_layers_count>` **(** **)** |const| |
  89. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`int<class_int>` | :ref:`get_next_source_id<class_TileSet_method_get_next_source_id>` **(** **)** |const| |
  91. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | :ref:`int<class_int>` | :ref:`get_occlusion_layer_light_mask<class_TileSet_method_get_occlusion_layer_light_mask>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  93. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`bool<class_bool>` | :ref:`get_occlusion_layer_sdf_collision<class_TileSet_method_get_occlusion_layer_sdf_collision>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  95. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | :ref:`int<class_int>` | :ref:`get_occlusion_layers_count<class_TileSet_method_get_occlusion_layers_count>` **(** **)** |const| |
  97. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`TileMapPattern<class_TileMapPattern>` | :ref:`get_pattern<class_TileSet_method_get_pattern>` **(** :ref:`int<class_int>` index=-1 **)** |
  99. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`int<class_int>` | :ref:`get_patterns_count<class_TileSet_method_get_patterns_count>` **(** **)** |
  101. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_layer<class_TileSet_method_get_physics_layer_collision_layer>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  103. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | :ref:`int<class_int>` | :ref:`get_physics_layer_collision_mask<class_TileSet_method_get_physics_layer_collision_mask>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  105. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`PhysicsMaterial<class_PhysicsMaterial>` | :ref:`get_physics_layer_physics_material<class_TileSet_method_get_physics_layer_physics_material>` **(** :ref:`int<class_int>` layer_index **)** |const| |
  107. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`get_physics_layers_count<class_TileSet_method_get_physics_layers_count>` **(** **)** |const| |
  109. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`TileSetSource<class_TileSetSource>` | :ref:`get_source<class_TileSet_method_get_source>` **(** :ref:`int<class_int>` source_id **)** |const| |
  111. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`int<class_int>` | :ref:`get_source_count<class_TileSet_method_get_source_count>` **(** **)** |const| |
  113. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`int<class_int>` | :ref:`get_source_id<class_TileSet_method_get_source_id>` **(** :ref:`int<class_int>` index **)** |const| |
  115. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`get_source_level_tile_proxy<class_TileSet_method_get_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** |
  117. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Color<class_Color>` | :ref:`get_terrain_color<class_TileSet_method_get_terrain_color>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| |
  119. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`String<class_String>` | :ref:`get_terrain_name<class_TileSet_method_get_terrain_name>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const| |
  121. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`TerrainMode<enum_TileSet_TerrainMode>` | :ref:`get_terrain_set_mode<class_TileSet_method_get_terrain_set_mode>` **(** :ref:`int<class_int>` terrain_set **)** |const| |
  123. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`int<class_int>` | :ref:`get_terrain_sets_count<class_TileSet_method_get_terrain_sets_count>` **(** **)** |const| |
  125. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`int<class_int>` | :ref:`get_terrains_count<class_TileSet_method_get_terrains_count>` **(** :ref:`int<class_int>` terrain_set **)** |const| |
  127. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`bool<class_bool>` | :ref:`has_alternative_level_tile_proxy<class_TileSet_method_has_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |
  129. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`bool<class_bool>` | :ref:`has_coords_level_tile_proxy<class_TileSet_method_has_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** |
  131. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`has_source<class_TileSet_method_has_source>` **(** :ref:`int<class_int>` source_id **)** |const| |
  133. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`bool<class_bool>` | :ref:`has_source_level_tile_proxy<class_TileSet_method_has_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** |
  135. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`Array<class_Array>` | :ref:`map_tile_proxy<class_TileSet_method_map_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |const| |
  137. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | void | :ref:`move_custom_data_layer<class_TileSet_method_move_custom_data_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** |
  139. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | void | :ref:`move_navigation_layer<class_TileSet_method_move_navigation_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** |
  141. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | void | :ref:`move_occlusion_layer<class_TileSet_method_move_occlusion_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** |
  143. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`move_physics_layer<class_TileSet_method_move_physics_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)** |
  145. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`move_terrain<class_TileSet_method_move_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`int<class_int>` to_position **)** |
  147. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`move_terrain_set<class_TileSet_method_move_terrain_set>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position **)** |
  149. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`remove_alternative_level_tile_proxy<class_TileSet_method_remove_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |
  151. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`remove_coords_level_tile_proxy<class_TileSet_method_remove_coords_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)** |
  153. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`remove_custom_data_layer<class_TileSet_method_remove_custom_data_layer>` **(** :ref:`int<class_int>` layer_index **)** |
  155. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`remove_navigation_layer<class_TileSet_method_remove_navigation_layer>` **(** :ref:`int<class_int>` layer_index **)** |
  157. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`remove_occlusion_layer<class_TileSet_method_remove_occlusion_layer>` **(** :ref:`int<class_int>` layer_index **)** |
  159. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`remove_pattern<class_TileSet_method_remove_pattern>` **(** :ref:`int<class_int>` index **)** |
  161. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`remove_physics_layer<class_TileSet_method_remove_physics_layer>` **(** :ref:`int<class_int>` layer_index **)** |
  163. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`remove_source<class_TileSet_method_remove_source>` **(** :ref:`int<class_int>` source_id **)** |
  165. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`remove_source_level_tile_proxy<class_TileSet_method_remove_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from **)** |
  167. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`remove_terrain<class_TileSet_method_remove_terrain>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |
  169. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`remove_terrain_set<class_TileSet_method_remove_terrain_set>` **(** :ref:`int<class_int>` terrain_set **)** |
  171. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`set_alternative_level_tile_proxy<class_TileSet_method_set_alternative_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to, :ref:`int<class_int>` alternative_to **)** |
  173. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`set_coords_level_tile_proxy<class_TileSet_method_set_coords_level_tile_proxy>` **(** :ref:`int<class_int>` p_source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to **)** |
  175. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`set_custom_data_layer_name<class_TileSet_method_set_custom_data_layer_name>` **(** :ref:`int<class_int>` layer_index, :ref:`String<class_String>` layer_name **)** |
  177. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`set_custom_data_layer_type<class_TileSet_method_set_custom_data_layer_type>` **(** :ref:`int<class_int>` layer_index, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` layer_type **)** |
  179. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`set_navigation_layer_layer_value<class_TileSet_method_set_navigation_layer_layer_value>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** |
  181. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`set_navigation_layer_layers<class_TileSet_method_set_navigation_layer_layers>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layers **)** |
  183. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | void | :ref:`set_occlusion_layer_light_mask<class_TileSet_method_set_occlusion_layer_light_mask>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` light_mask **)** |
  185. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | void | :ref:`set_occlusion_layer_sdf_collision<class_TileSet_method_set_occlusion_layer_sdf_collision>` **(** :ref:`int<class_int>` layer_index, :ref:`bool<class_bool>` sdf_collision **)** |
  187. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`set_physics_layer_collision_layer<class_TileSet_method_set_physics_layer_collision_layer>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer **)** |
  189. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. | void | :ref:`set_physics_layer_collision_mask<class_TileSet_method_set_physics_layer_collision_mask>` **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` mask **)** |
  191. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  192. | void | :ref:`set_physics_layer_physics_material<class_TileSet_method_set_physics_layer_physics_material>` **(** :ref:`int<class_int>` layer_index, :ref:`PhysicsMaterial<class_PhysicsMaterial>` physics_material **)** |
  193. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  194. | void | :ref:`set_source_id<class_TileSet_method_set_source_id>` **(** :ref:`int<class_int>` source_id, :ref:`int<class_int>` new_source_id **)** |
  195. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  196. | void | :ref:`set_source_level_tile_proxy<class_TileSet_method_set_source_level_tile_proxy>` **(** :ref:`int<class_int>` source_from, :ref:`int<class_int>` source_to **)** |
  197. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  198. | void | :ref:`set_terrain_color<class_TileSet_method_set_terrain_color>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`Color<class_Color>` color **)** |
  199. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  200. | void | :ref:`set_terrain_name<class_TileSet_method_set_terrain_name>` **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`String<class_String>` name **)** |
  201. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  202. | void | :ref:`set_terrain_set_mode<class_TileSet_method_set_terrain_set_mode>` **(** :ref:`int<class_int>` terrain_set, :ref:`TerrainMode<enum_TileSet_TerrainMode>` mode **)** |
  203. +-----------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  204. .. rst-class:: classref-section-separator
  205. ----
  206. .. rst-class:: classref-descriptions-group
  207. Enumerations
  208. ------------
  209. .. _enum_TileSet_TileShape:
  210. .. rst-class:: classref-enumeration
  211. enum **TileShape**:
  212. .. _class_TileSet_constant_TILE_SHAPE_SQUARE:
  213. .. rst-class:: classref-enumeration-constant
  214. :ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_SQUARE** = ``0``
  215. Rectangular tile shape.
  216. .. _class_TileSet_constant_TILE_SHAPE_ISOMETRIC:
  217. .. rst-class:: classref-enumeration-constant
  218. :ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_ISOMETRIC** = ``1``
  219. Diamond tile shape (for isometric look).
  220. \ **Note:** Isometric **TileSet** works best if :ref:`TileMap<class_TileMap>` and all its layers have Y-sort enabled.
  221. .. _class_TileSet_constant_TILE_SHAPE_HALF_OFFSET_SQUARE:
  222. .. rst-class:: classref-enumeration-constant
  223. :ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_HALF_OFFSET_SQUARE** = ``2``
  224. Rectangular tile shape with one row/column out of two offset by half a tile.
  225. .. _class_TileSet_constant_TILE_SHAPE_HEXAGON:
  226. .. rst-class:: classref-enumeration-constant
  227. :ref:`TileShape<enum_TileSet_TileShape>` **TILE_SHAPE_HEXAGON** = ``3``
  228. Hexagonal tile shape.
  229. .. rst-class:: classref-item-separator
  230. ----
  231. .. _enum_TileSet_TileLayout:
  232. .. rst-class:: classref-enumeration
  233. enum **TileLayout**:
  234. .. _class_TileSet_constant_TILE_LAYOUT_STACKED:
  235. .. rst-class:: classref-enumeration-constant
  236. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STACKED** = ``0``
  237. Tile coordinates layout where both axis stay consistent with their respective local horizontal and vertical axis.
  238. .. _class_TileSet_constant_TILE_LAYOUT_STACKED_OFFSET:
  239. .. rst-class:: classref-enumeration-constant
  240. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STACKED_OFFSET** = ``1``
  241. Same as :ref:`TILE_LAYOUT_STACKED<class_TileSet_constant_TILE_LAYOUT_STACKED>`, but the first half-offset is negative instead of positive.
  242. .. _class_TileSet_constant_TILE_LAYOUT_STAIRS_RIGHT:
  243. .. rst-class:: classref-enumeration-constant
  244. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STAIRS_RIGHT** = ``2``
  245. Tile coordinates layout where the horizontal axis stay horizontal, and the vertical one goes down-right.
  246. .. _class_TileSet_constant_TILE_LAYOUT_STAIRS_DOWN:
  247. .. rst-class:: classref-enumeration-constant
  248. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_STAIRS_DOWN** = ``3``
  249. Tile coordinates layout where the vertical axis stay vertical, and the horizontal one goes down-right.
  250. .. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_RIGHT:
  251. .. rst-class:: classref-enumeration-constant
  252. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_DIAMOND_RIGHT** = ``4``
  253. Tile coordinates layout where the horizontal axis goes up-right, and the vertical one goes down-right.
  254. .. _class_TileSet_constant_TILE_LAYOUT_DIAMOND_DOWN:
  255. .. rst-class:: classref-enumeration-constant
  256. :ref:`TileLayout<enum_TileSet_TileLayout>` **TILE_LAYOUT_DIAMOND_DOWN** = ``5``
  257. Tile coordinates layout where the horizontal axis goes down-right, and the vertical one goes down-left.
  258. .. rst-class:: classref-item-separator
  259. ----
  260. .. _enum_TileSet_TileOffsetAxis:
  261. .. rst-class:: classref-enumeration
  262. enum **TileOffsetAxis**:
  263. .. _class_TileSet_constant_TILE_OFFSET_AXIS_HORIZONTAL:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **TILE_OFFSET_AXIS_HORIZONTAL** = ``0``
  266. Horizontal half-offset.
  267. .. _class_TileSet_constant_TILE_OFFSET_AXIS_VERTICAL:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **TILE_OFFSET_AXIS_VERTICAL** = ``1``
  270. Vertical half-offset.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _enum_TileSet_CellNeighbor:
  274. .. rst-class:: classref-enumeration
  275. enum **CellNeighbor**:
  276. .. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_SIDE:
  277. .. rst-class:: classref-enumeration-constant
  278. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_RIGHT_SIDE** = ``0``
  279. Neighbor on the right side.
  280. .. _class_TileSet_constant_CELL_NEIGHBOR_RIGHT_CORNER:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_RIGHT_CORNER** = ``1``
  283. Neighbor in the right corner.
  284. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE** = ``2``
  287. Neighbor on the bottom right side.
  288. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER:
  289. .. rst-class:: classref-enumeration-constant
  290. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER** = ``3``
  291. Neighbor in the bottom right corner.
  292. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_SIDE:
  293. .. rst-class:: classref-enumeration-constant
  294. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_SIDE** = ``4``
  295. Neighbor on the bottom side.
  296. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_CORNER:
  297. .. rst-class:: classref-enumeration-constant
  298. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_CORNER** = ``5``
  299. Neighbor in the bottom corner.
  300. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_SIDE:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_LEFT_SIDE** = ``6``
  303. Neighbor on the bottom left side.
  304. .. _class_TileSet_constant_CELL_NEIGHBOR_BOTTOM_LEFT_CORNER:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_BOTTOM_LEFT_CORNER** = ``7``
  307. Neighbor in the bottom left corner.
  308. .. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_SIDE:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_LEFT_SIDE** = ``8``
  311. Neighbor on the left side.
  312. .. _class_TileSet_constant_CELL_NEIGHBOR_LEFT_CORNER:
  313. .. rst-class:: classref-enumeration-constant
  314. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_LEFT_CORNER** = ``9``
  315. Neighbor in the left corner.
  316. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_SIDE:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_LEFT_SIDE** = ``10``
  319. Neighbor on the top left side.
  320. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_LEFT_CORNER:
  321. .. rst-class:: classref-enumeration-constant
  322. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_LEFT_CORNER** = ``11``
  323. Neighbor in the top left corner.
  324. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_SIDE:
  325. .. rst-class:: classref-enumeration-constant
  326. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_SIDE** = ``12``
  327. Neighbor on the top side.
  328. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_CORNER:
  329. .. rst-class:: classref-enumeration-constant
  330. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_CORNER** = ``13``
  331. Neighbor in the top corner.
  332. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_SIDE:
  333. .. rst-class:: classref-enumeration-constant
  334. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_RIGHT_SIDE** = ``14``
  335. Neighbor on the top right side.
  336. .. _class_TileSet_constant_CELL_NEIGHBOR_TOP_RIGHT_CORNER:
  337. .. rst-class:: classref-enumeration-constant
  338. :ref:`CellNeighbor<enum_TileSet_CellNeighbor>` **CELL_NEIGHBOR_TOP_RIGHT_CORNER** = ``15``
  339. Neighbor in the top right corner.
  340. .. rst-class:: classref-item-separator
  341. ----
  342. .. _enum_TileSet_TerrainMode:
  343. .. rst-class:: classref-enumeration
  344. enum **TerrainMode**:
  345. .. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS_AND_SIDES:
  346. .. rst-class:: classref-enumeration-constant
  347. :ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_CORNERS_AND_SIDES** = ``0``
  348. Requires both corners and side to match with neighboring tiles' terrains.
  349. .. _class_TileSet_constant_TERRAIN_MODE_MATCH_CORNERS:
  350. .. rst-class:: classref-enumeration-constant
  351. :ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_CORNERS** = ``1``
  352. Requires corners to match with neighboring tiles' terrains.
  353. .. _class_TileSet_constant_TERRAIN_MODE_MATCH_SIDES:
  354. .. rst-class:: classref-enumeration-constant
  355. :ref:`TerrainMode<enum_TileSet_TerrainMode>` **TERRAIN_MODE_MATCH_SIDES** = ``2``
  356. Requires sides to match with neighboring tiles' terrains.
  357. .. rst-class:: classref-section-separator
  358. ----
  359. .. rst-class:: classref-descriptions-group
  360. Property Descriptions
  361. ---------------------
  362. .. _class_TileSet_property_tile_layout:
  363. .. rst-class:: classref-property
  364. :ref:`TileLayout<enum_TileSet_TileLayout>` **tile_layout** = ``0``
  365. .. rst-class:: classref-property-setget
  366. - void **set_tile_layout** **(** :ref:`TileLayout<enum_TileSet_TileLayout>` value **)**
  367. - :ref:`TileLayout<enum_TileSet_TileLayout>` **get_tile_layout** **(** **)**
  368. For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), changes the way tiles are indexed in the TileMap grid.
  369. .. rst-class:: classref-item-separator
  370. ----
  371. .. _class_TileSet_property_tile_offset_axis:
  372. .. rst-class:: classref-property
  373. :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **tile_offset_axis** = ``0``
  374. .. rst-class:: classref-property-setget
  375. - void **set_tile_offset_axis** **(** :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` value **)**
  376. - :ref:`TileOffsetAxis<enum_TileSet_TileOffsetAxis>` **get_tile_offset_axis** **(** **)**
  377. For all half-offset shapes (Isometric, Hexagonal and Half-Offset square), determines the offset axis.
  378. .. rst-class:: classref-item-separator
  379. ----
  380. .. _class_TileSet_property_tile_shape:
  381. .. rst-class:: classref-property
  382. :ref:`TileShape<enum_TileSet_TileShape>` **tile_shape** = ``0``
  383. .. rst-class:: classref-property-setget
  384. - void **set_tile_shape** **(** :ref:`TileShape<enum_TileSet_TileShape>` value **)**
  385. - :ref:`TileShape<enum_TileSet_TileShape>` **get_tile_shape** **(** **)**
  386. The tile shape.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_TileSet_property_tile_size:
  390. .. rst-class:: classref-property
  391. :ref:`Vector2i<class_Vector2i>` **tile_size** = ``Vector2i(16, 16)``
  392. .. rst-class:: classref-property-setget
  393. - void **set_tile_size** **(** :ref:`Vector2i<class_Vector2i>` value **)**
  394. - :ref:`Vector2i<class_Vector2i>` **get_tile_size** **(** **)**
  395. 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.
  396. .. rst-class:: classref-item-separator
  397. ----
  398. .. _class_TileSet_property_uv_clipping:
  399. .. rst-class:: classref-property
  400. :ref:`bool<class_bool>` **uv_clipping** = ``false``
  401. .. rst-class:: classref-property-setget
  402. - void **set_uv_clipping** **(** :ref:`bool<class_bool>` value **)**
  403. - :ref:`bool<class_bool>` **is_uv_clipping** **(** **)**
  404. Enables/Disable uv clipping when rendering the tiles.
  405. .. rst-class:: classref-section-separator
  406. ----
  407. .. rst-class:: classref-descriptions-group
  408. Method Descriptions
  409. -------------------
  410. .. _class_TileSet_method_add_custom_data_layer:
  411. .. rst-class:: classref-method
  412. void **add_custom_data_layer** **(** :ref:`int<class_int>` to_position=-1 **)**
  413. Adds a custom data layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  414. Custom data layers allow assigning custom properties to atlas tiles.
  415. .. rst-class:: classref-item-separator
  416. ----
  417. .. _class_TileSet_method_add_navigation_layer:
  418. .. rst-class:: classref-method
  419. void **add_navigation_layer** **(** :ref:`int<class_int>` to_position=-1 **)**
  420. Adds a navigation layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  421. Navigation layers allow assigning a navigable area to atlas tiles.
  422. .. rst-class:: classref-item-separator
  423. ----
  424. .. _class_TileSet_method_add_occlusion_layer:
  425. .. rst-class:: classref-method
  426. void **add_occlusion_layer** **(** :ref:`int<class_int>` to_position=-1 **)**
  427. Adds an occlusion layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  428. Occlusion layers allow assigning occlusion polygons to atlas tiles.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_TileSet_method_add_pattern:
  432. .. rst-class:: classref-method
  433. :ref:`int<class_int>` **add_pattern** **(** :ref:`TileMapPattern<class_TileMapPattern>` pattern, :ref:`int<class_int>` index=-1 **)**
  434. Adds a :ref:`TileMapPattern<class_TileMapPattern>` to be stored in the TileSet resource. If provided, insert it at the given ``index``.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_TileSet_method_add_physics_layer:
  438. .. rst-class:: classref-method
  439. void **add_physics_layer** **(** :ref:`int<class_int>` to_position=-1 **)**
  440. Adds a physics layer to the TileSet at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  441. Physics layers allow assigning collision polygons to atlas tiles.
  442. .. rst-class:: classref-item-separator
  443. ----
  444. .. _class_TileSet_method_add_source:
  445. .. rst-class:: classref-method
  446. :ref:`int<class_int>` **add_source** **(** :ref:`TileSetSource<class_TileSetSource>` source, :ref:`int<class_int>` atlas_source_id_override=-1 **)**
  447. Adds a :ref:`TileSetSource<class_TileSetSource>` to the TileSet. If ``atlas_source_id_override`` is not -1, also set its source ID. Otherwise, a unique identifier is automatically generated.
  448. The function returns the added source ID or -1 if the source could not be added.
  449. .. rst-class:: classref-item-separator
  450. ----
  451. .. _class_TileSet_method_add_terrain:
  452. .. rst-class:: classref-method
  453. void **add_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position=-1 **)**
  454. Adds a new terrain to the given terrain set ``terrain_set`` at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_TileSet_method_add_terrain_set:
  458. .. rst-class:: classref-method
  459. void **add_terrain_set** **(** :ref:`int<class_int>` to_position=-1 **)**
  460. Adds a new terrain set at the given position ``to_position`` in the array. If ``to_position`` is -1, adds it at the end of the array.
  461. .. rst-class:: classref-item-separator
  462. ----
  463. .. _class_TileSet_method_cleanup_invalid_tile_proxies:
  464. .. rst-class:: classref-method
  465. void **cleanup_invalid_tile_proxies** **(** **)**
  466. Clears tile proxies pointing to invalid tiles.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_TileSet_method_clear_tile_proxies:
  470. .. rst-class:: classref-method
  471. void **clear_tile_proxies** **(** **)**
  472. Clears all tile proxies.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_TileSet_method_get_alternative_level_tile_proxy:
  476. .. rst-class:: classref-method
  477. :ref:`Array<class_Array>` **get_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)**
  478. 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).
  479. If the TileSet has no proxy for the given identifiers, returns an empty Array.
  480. .. rst-class:: classref-item-separator
  481. ----
  482. .. _class_TileSet_method_get_coords_level_tile_proxy:
  483. .. rst-class:: classref-method
  484. :ref:`Array<class_Array>` **get_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)**
  485. 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).
  486. If the TileSet has no proxy for the given identifiers, returns an empty Array.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _class_TileSet_method_get_custom_data_layer_by_name:
  490. .. rst-class:: classref-method
  491. :ref:`int<class_int>` **get_custom_data_layer_by_name** **(** :ref:`String<class_String>` layer_name **)** |const|
  492. Returns the index of the custom data layer identified by the given name.
  493. .. rst-class:: classref-item-separator
  494. ----
  495. .. _class_TileSet_method_get_custom_data_layer_name:
  496. .. rst-class:: classref-method
  497. :ref:`String<class_String>` **get_custom_data_layer_name** **(** :ref:`int<class_int>` layer_index **)** |const|
  498. Returns the name of the custom data layer identified by the given index.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_TileSet_method_get_custom_data_layer_type:
  502. .. rst-class:: classref-method
  503. :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` **get_custom_data_layer_type** **(** :ref:`int<class_int>` layer_index **)** |const|
  504. Returns the type of the custom data layer identified by the given index.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _class_TileSet_method_get_custom_data_layers_count:
  508. .. rst-class:: classref-method
  509. :ref:`int<class_int>` **get_custom_data_layers_count** **(** **)** |const|
  510. Returns the custom data layers count.
  511. .. rst-class:: classref-item-separator
  512. ----
  513. .. _class_TileSet_method_get_navigation_layer_layer_value:
  514. .. rst-class:: classref-method
  515. :ref:`bool<class_bool>` **get_navigation_layer_layer_value** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number **)** |const|
  516. Returns whether or not the specified navigation layer of the TileSet navigation data layer identified by the given ``layer_index`` is enabled, given a navigation_layers ``layer_number`` between 1 and 32.
  517. .. rst-class:: classref-item-separator
  518. ----
  519. .. _class_TileSet_method_get_navigation_layer_layers:
  520. .. rst-class:: classref-method
  521. :ref:`int<class_int>` **get_navigation_layer_layers** **(** :ref:`int<class_int>` layer_index **)** |const|
  522. Returns the navigation layers (as in the Navigation server) of the given TileSet navigation layer.
  523. .. rst-class:: classref-item-separator
  524. ----
  525. .. _class_TileSet_method_get_navigation_layers_count:
  526. .. rst-class:: classref-method
  527. :ref:`int<class_int>` **get_navigation_layers_count** **(** **)** |const|
  528. Returns the navigation layers count.
  529. .. rst-class:: classref-item-separator
  530. ----
  531. .. _class_TileSet_method_get_next_source_id:
  532. .. rst-class:: classref-method
  533. :ref:`int<class_int>` **get_next_source_id** **(** **)** |const|
  534. Returns a new unused source ID. This generated ID is the same that a call to ``add_source`` would return.
  535. .. rst-class:: classref-item-separator
  536. ----
  537. .. _class_TileSet_method_get_occlusion_layer_light_mask:
  538. .. rst-class:: classref-method
  539. :ref:`int<class_int>` **get_occlusion_layer_light_mask** **(** :ref:`int<class_int>` layer_index **)** |const|
  540. Returns the light mask of the occlusion layer.
  541. .. rst-class:: classref-item-separator
  542. ----
  543. .. _class_TileSet_method_get_occlusion_layer_sdf_collision:
  544. .. rst-class:: classref-method
  545. :ref:`bool<class_bool>` **get_occlusion_layer_sdf_collision** **(** :ref:`int<class_int>` layer_index **)** |const|
  546. Returns if the occluders from this layer use ``sdf_collision``.
  547. .. rst-class:: classref-item-separator
  548. ----
  549. .. _class_TileSet_method_get_occlusion_layers_count:
  550. .. rst-class:: classref-method
  551. :ref:`int<class_int>` **get_occlusion_layers_count** **(** **)** |const|
  552. Returns the occlusion layers count.
  553. .. rst-class:: classref-item-separator
  554. ----
  555. .. _class_TileSet_method_get_pattern:
  556. .. rst-class:: classref-method
  557. :ref:`TileMapPattern<class_TileMapPattern>` **get_pattern** **(** :ref:`int<class_int>` index=-1 **)**
  558. Returns the :ref:`TileMapPattern<class_TileMapPattern>` at the given ``index``.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_TileSet_method_get_patterns_count:
  562. .. rst-class:: classref-method
  563. :ref:`int<class_int>` **get_patterns_count** **(** **)**
  564. Returns the number of :ref:`TileMapPattern<class_TileMapPattern>` this tile set handles.
  565. .. rst-class:: classref-item-separator
  566. ----
  567. .. _class_TileSet_method_get_physics_layer_collision_layer:
  568. .. rst-class:: classref-method
  569. :ref:`int<class_int>` **get_physics_layer_collision_layer** **(** :ref:`int<class_int>` layer_index **)** |const|
  570. Returns the collision layer (as in the physics server) bodies on the given TileSet's physics layer are in.
  571. .. rst-class:: classref-item-separator
  572. ----
  573. .. _class_TileSet_method_get_physics_layer_collision_mask:
  574. .. rst-class:: classref-method
  575. :ref:`int<class_int>` **get_physics_layer_collision_mask** **(** :ref:`int<class_int>` layer_index **)** |const|
  576. Returns the collision mask of bodies on the given TileSet's physics layer.
  577. .. rst-class:: classref-item-separator
  578. ----
  579. .. _class_TileSet_method_get_physics_layer_physics_material:
  580. .. rst-class:: classref-method
  581. :ref:`PhysicsMaterial<class_PhysicsMaterial>` **get_physics_layer_physics_material** **(** :ref:`int<class_int>` layer_index **)** |const|
  582. Returns the physics material of bodies on the given TileSet's physics layer.
  583. .. rst-class:: classref-item-separator
  584. ----
  585. .. _class_TileSet_method_get_physics_layers_count:
  586. .. rst-class:: classref-method
  587. :ref:`int<class_int>` **get_physics_layers_count** **(** **)** |const|
  588. Returns the physics layers count.
  589. .. rst-class:: classref-item-separator
  590. ----
  591. .. _class_TileSet_method_get_source:
  592. .. rst-class:: classref-method
  593. :ref:`TileSetSource<class_TileSetSource>` **get_source** **(** :ref:`int<class_int>` source_id **)** |const|
  594. Returns the :ref:`TileSetSource<class_TileSetSource>` with ID ``source_id``.
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_TileSet_method_get_source_count:
  598. .. rst-class:: classref-method
  599. :ref:`int<class_int>` **get_source_count** **(** **)** |const|
  600. Returns the number of :ref:`TileSetSource<class_TileSetSource>` in this TileSet.
  601. .. rst-class:: classref-item-separator
  602. ----
  603. .. _class_TileSet_method_get_source_id:
  604. .. rst-class:: classref-method
  605. :ref:`int<class_int>` **get_source_id** **(** :ref:`int<class_int>` index **)** |const|
  606. Returns the source ID for source with index ``index``.
  607. .. rst-class:: classref-item-separator
  608. ----
  609. .. _class_TileSet_method_get_source_level_tile_proxy:
  610. .. rst-class:: classref-method
  611. :ref:`int<class_int>` **get_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)**
  612. Returns the source-level proxy for the given source identifier.
  613. If the TileSet has no proxy for the given identifier, returns -1.
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_TileSet_method_get_terrain_color:
  617. .. rst-class:: classref-method
  618. :ref:`Color<class_Color>` **get_terrain_color** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const|
  619. Returns a terrain's color.
  620. .. rst-class:: classref-item-separator
  621. ----
  622. .. _class_TileSet_method_get_terrain_name:
  623. .. rst-class:: classref-method
  624. :ref:`String<class_String>` **get_terrain_name** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)** |const|
  625. Returns a terrain's name.
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_TileSet_method_get_terrain_set_mode:
  629. .. rst-class:: classref-method
  630. :ref:`TerrainMode<enum_TileSet_TerrainMode>` **get_terrain_set_mode** **(** :ref:`int<class_int>` terrain_set **)** |const|
  631. Returns a terrain set mode.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _class_TileSet_method_get_terrain_sets_count:
  635. .. rst-class:: classref-method
  636. :ref:`int<class_int>` **get_terrain_sets_count** **(** **)** |const|
  637. Returns the terrain sets count.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_TileSet_method_get_terrains_count:
  641. .. rst-class:: classref-method
  642. :ref:`int<class_int>` **get_terrains_count** **(** :ref:`int<class_int>` terrain_set **)** |const|
  643. Returns the number of terrains in the given terrain set.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_TileSet_method_has_alternative_level_tile_proxy:
  647. .. rst-class:: classref-method
  648. :ref:`bool<class_bool>` **has_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)**
  649. Returns if there is an alternative-level proxy for the given identifiers.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_TileSet_method_has_coords_level_tile_proxy:
  653. .. rst-class:: classref-method
  654. :ref:`bool<class_bool>` **has_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)**
  655. Returns if there is a coodinates-level proxy for the given identifiers.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_TileSet_method_has_source:
  659. .. rst-class:: classref-method
  660. :ref:`bool<class_bool>` **has_source** **(** :ref:`int<class_int>` source_id **)** |const|
  661. Returns if this TileSet has a source for the given source ID.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_TileSet_method_has_source_level_tile_proxy:
  665. .. rst-class:: classref-method
  666. :ref:`bool<class_bool>` **has_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)**
  667. Returns if there is a source-level proxy for the given source ID.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_TileSet_method_map_tile_proxy:
  671. .. rst-class:: classref-method
  672. :ref:`Array<class_Array>` **map_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)** |const|
  673. According to the configured proxies, maps the provided indentifiers to a new set of identifiers. The source ID, atlas coordinates ID and alternative tile ID are returned as a 3 elements Array.
  674. This function first look for matching alternative-level proxies, then coordinates-level proxies, then source-level proxies.
  675. If no proxy corresponding to provided identifiers are found, returns the same values the ones used as arguments.
  676. .. rst-class:: classref-item-separator
  677. ----
  678. .. _class_TileSet_method_move_custom_data_layer:
  679. .. rst-class:: classref-method
  680. void **move_custom_data_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)**
  681. Moves the custom data layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  682. .. rst-class:: classref-item-separator
  683. ----
  684. .. _class_TileSet_method_move_navigation_layer:
  685. .. rst-class:: classref-method
  686. void **move_navigation_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)**
  687. Moves the navigation layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  688. .. rst-class:: classref-item-separator
  689. ----
  690. .. _class_TileSet_method_move_occlusion_layer:
  691. .. rst-class:: classref-method
  692. void **move_occlusion_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)**
  693. Moves the occlusion layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  694. .. rst-class:: classref-item-separator
  695. ----
  696. .. _class_TileSet_method_move_physics_layer:
  697. .. rst-class:: classref-method
  698. void **move_physics_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` to_position **)**
  699. Moves the physics layer at index ``layer_index`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_TileSet_method_move_terrain:
  703. .. rst-class:: classref-method
  704. void **move_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`int<class_int>` to_position **)**
  705. Moves the terrain at index ``terrain_index`` for terrain set ``terrain_set`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  706. .. rst-class:: classref-item-separator
  707. ----
  708. .. _class_TileSet_method_move_terrain_set:
  709. .. rst-class:: classref-method
  710. void **move_terrain_set** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` to_position **)**
  711. Moves the terrain set at index ``terrain_set`` to the given position ``to_position`` in the array. Also updates the atlas tiles accordingly.
  712. .. rst-class:: classref-item-separator
  713. ----
  714. .. _class_TileSet_method_remove_alternative_level_tile_proxy:
  715. .. rst-class:: classref-method
  716. void **remove_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from **)**
  717. Removes an alternative-level proxy for the given identifiers.
  718. .. rst-class:: classref-item-separator
  719. ----
  720. .. _class_TileSet_method_remove_coords_level_tile_proxy:
  721. .. rst-class:: classref-method
  722. void **remove_coords_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from **)**
  723. Removes a coordinates-level proxy for the given identifiers.
  724. .. rst-class:: classref-item-separator
  725. ----
  726. .. _class_TileSet_method_remove_custom_data_layer:
  727. .. rst-class:: classref-method
  728. void **remove_custom_data_layer** **(** :ref:`int<class_int>` layer_index **)**
  729. Removes the custom data layer at index ``layer_index``. Also updates the atlas tiles accordingly.
  730. .. rst-class:: classref-item-separator
  731. ----
  732. .. _class_TileSet_method_remove_navigation_layer:
  733. .. rst-class:: classref-method
  734. void **remove_navigation_layer** **(** :ref:`int<class_int>` layer_index **)**
  735. Removes the navigation layer at index ``layer_index``. Also updates the atlas tiles accordingly.
  736. .. rst-class:: classref-item-separator
  737. ----
  738. .. _class_TileSet_method_remove_occlusion_layer:
  739. .. rst-class:: classref-method
  740. void **remove_occlusion_layer** **(** :ref:`int<class_int>` layer_index **)**
  741. Removes the occlusion layer at index ``layer_index``. Also updates the atlas tiles accordingly.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_TileSet_method_remove_pattern:
  745. .. rst-class:: classref-method
  746. void **remove_pattern** **(** :ref:`int<class_int>` index **)**
  747. Remove the :ref:`TileMapPattern<class_TileMapPattern>` at the given index.
  748. .. rst-class:: classref-item-separator
  749. ----
  750. .. _class_TileSet_method_remove_physics_layer:
  751. .. rst-class:: classref-method
  752. void **remove_physics_layer** **(** :ref:`int<class_int>` layer_index **)**
  753. Removes the physics layer at index ``layer_index``. Also updates the atlas tiles accordingly.
  754. .. rst-class:: classref-item-separator
  755. ----
  756. .. _class_TileSet_method_remove_source:
  757. .. rst-class:: classref-method
  758. void **remove_source** **(** :ref:`int<class_int>` source_id **)**
  759. Removes the source with the given source ID.
  760. .. rst-class:: classref-item-separator
  761. ----
  762. .. _class_TileSet_method_remove_source_level_tile_proxy:
  763. .. rst-class:: classref-method
  764. void **remove_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from **)**
  765. Removes a source-level tile proxy.
  766. .. rst-class:: classref-item-separator
  767. ----
  768. .. _class_TileSet_method_remove_terrain:
  769. .. rst-class:: classref-method
  770. void **remove_terrain** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index **)**
  771. Removes the terrain at index ``terrain_index`` in the given terrain set ``terrain_set``. Also updates the atlas tiles accordingly.
  772. .. rst-class:: classref-item-separator
  773. ----
  774. .. _class_TileSet_method_remove_terrain_set:
  775. .. rst-class:: classref-method
  776. void **remove_terrain_set** **(** :ref:`int<class_int>` terrain_set **)**
  777. Removes the terrain set at index ``terrain_set``. Also updates the atlas tiles accordingly.
  778. .. rst-class:: classref-item-separator
  779. ----
  780. .. _class_TileSet_method_set_alternative_level_tile_proxy:
  781. .. rst-class:: classref-method
  782. void **set_alternative_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` alternative_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to, :ref:`int<class_int>` alternative_to **)**
  783. Create an alternative-level proxy for the given identifiers. A proxy will map set of tile identifiers to another set of identifiers.
  784. This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
  785. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
  786. .. rst-class:: classref-item-separator
  787. ----
  788. .. _class_TileSet_method_set_coords_level_tile_proxy:
  789. .. rst-class:: classref-method
  790. void **set_coords_level_tile_proxy** **(** :ref:`int<class_int>` p_source_from, :ref:`Vector2i<class_Vector2i>` coords_from, :ref:`int<class_int>` source_to, :ref:`Vector2i<class_Vector2i>` coords_to **)**
  791. 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.
  792. This can be used to replace a tile in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target tile when one is available.
  793. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
  794. .. rst-class:: classref-item-separator
  795. ----
  796. .. _class_TileSet_method_set_custom_data_layer_name:
  797. .. rst-class:: classref-method
  798. void **set_custom_data_layer_name** **(** :ref:`int<class_int>` layer_index, :ref:`String<class_String>` layer_name **)**
  799. 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.
  800. .. rst-class:: classref-item-separator
  801. ----
  802. .. _class_TileSet_method_set_custom_data_layer_type:
  803. .. rst-class:: classref-method
  804. void **set_custom_data_layer_type** **(** :ref:`int<class_int>` layer_index, :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` layer_type **)**
  805. Sets the type of the custom data layer identified by the given index.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _class_TileSet_method_set_navigation_layer_layer_value:
  809. .. rst-class:: classref-method
  810. void **set_navigation_layer_layer_value** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)**
  811. Based on ``value``, enables or disables the specified navigation layer of the TileSet navigation data layer identified by the given ``layer_index``, given a navigation_layers ``layer_number`` between 1 and 32.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_TileSet_method_set_navigation_layer_layers:
  815. .. rst-class:: classref-method
  816. void **set_navigation_layer_layers** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layers **)**
  817. Sets the navigation layers (as in the navigation server) for navigation regions in the given TileSet navigation layer.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_TileSet_method_set_occlusion_layer_light_mask:
  821. .. rst-class:: classref-method
  822. void **set_occlusion_layer_light_mask** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` light_mask **)**
  823. Sets the occlusion layer (as in the rendering server) for occluders in the given TileSet occlusion layer.
  824. .. rst-class:: classref-item-separator
  825. ----
  826. .. _class_TileSet_method_set_occlusion_layer_sdf_collision:
  827. .. rst-class:: classref-method
  828. void **set_occlusion_layer_sdf_collision** **(** :ref:`int<class_int>` layer_index, :ref:`bool<class_bool>` sdf_collision **)**
  829. Enables or disables SDF collision for occluders in the given TileSet occlusion layer.
  830. .. rst-class:: classref-item-separator
  831. ----
  832. .. _class_TileSet_method_set_physics_layer_collision_layer:
  833. .. rst-class:: classref-method
  834. void **set_physics_layer_collision_layer** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` layer **)**
  835. Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
  836. .. rst-class:: classref-item-separator
  837. ----
  838. .. _class_TileSet_method_set_physics_layer_collision_mask:
  839. .. rst-class:: classref-method
  840. void **set_physics_layer_collision_mask** **(** :ref:`int<class_int>` layer_index, :ref:`int<class_int>` mask **)**
  841. Sets the physics layer (as in the physics server) for bodies in the given TileSet physics layer.
  842. .. rst-class:: classref-item-separator
  843. ----
  844. .. _class_TileSet_method_set_physics_layer_physics_material:
  845. .. rst-class:: classref-method
  846. void **set_physics_layer_physics_material** **(** :ref:`int<class_int>` layer_index, :ref:`PhysicsMaterial<class_PhysicsMaterial>` physics_material **)**
  847. Sets the physics material for bodies in the given TileSet physics layer.
  848. .. rst-class:: classref-item-separator
  849. ----
  850. .. _class_TileSet_method_set_source_id:
  851. .. rst-class:: classref-method
  852. void **set_source_id** **(** :ref:`int<class_int>` source_id, :ref:`int<class_int>` new_source_id **)**
  853. Changes a source's ID.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_TileSet_method_set_source_level_tile_proxy:
  857. .. rst-class:: classref-method
  858. void **set_source_level_tile_proxy** **(** :ref:`int<class_int>` source_from, :ref:`int<class_int>` source_to **)**
  859. 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.
  860. This can be used to replace a source in all TileMaps using this TileSet, as TileMap nodes will find and use the proxy's target source when one is available.
  861. Proxied tiles can be automatically replaced in TileMap nodes using the editor.
  862. .. rst-class:: classref-item-separator
  863. ----
  864. .. _class_TileSet_method_set_terrain_color:
  865. .. rst-class:: classref-method
  866. void **set_terrain_color** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`Color<class_Color>` color **)**
  867. Sets a terrain's color. This color is used for identifying the different terrains in the TileSet editor.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _class_TileSet_method_set_terrain_name:
  871. .. rst-class:: classref-method
  872. void **set_terrain_name** **(** :ref:`int<class_int>` terrain_set, :ref:`int<class_int>` terrain_index, :ref:`String<class_String>` name **)**
  873. Sets a terrain's name.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_TileSet_method_set_terrain_set_mode:
  877. .. rst-class:: classref-method
  878. void **set_terrain_set_mode** **(** :ref:`int<class_int>` terrain_set, :ref:`TerrainMode<enum_TileSet_TerrainMode>` mode **)**
  879. Sets a terrain mode. Each mode determines which bits of a tile shape is used to match the neighboring tiles' terrains.
  880. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  881. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  882. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  883. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  884. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  885. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`