class_tileset.rst 111 KB

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