virtualx-engine-docs/_sources/classes/class_tileset.rst.txt

1263 lines
76 KiB
Text
Raw Normal View History

2024-10-23 18:41:33 +02:00
:github_url: hide
.. DO NOT EDIT THIS FILE!!!
.. Generated automatically from Godot engine sources.
.. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
.. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/TileSet.xml.
.. _class_TileSet:
TileSet
=======
**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
Tile library for tilemaps.
.. rst-class:: classref-introduction-group
Description
-----------
A TileSet is a library of tiles for a :ref:`TileMap<class_TileMap>`. It contains a list of tiles, each consisting of a sprite and optional collision shapes.
Tiles are referenced by a unique integer ID.
.. rst-class:: classref-introduction-group
Tutorials
---------
- :doc:`Using Tilemaps <../tutorials/2d/using_tilemaps>`
- `2D Platformer Demo <https://godotengine.org/asset-library/asset/120>`__
- `2D Isometric Demo <https://godotengine.org/asset-library/asset/112>`__
- `2D Hexagonal Demo <https://godotengine.org/asset-library/asset/111>`__
- `2D Navigation Astar Demo <https://godotengine.org/asset-library/asset/519>`__
- `2D Role Playing Game Demo <https://godotengine.org/asset-library/asset/520>`__
- `2D Kinematic Character Demo <https://godotengine.org/asset-library/asset/113>`__
.. rst-class:: classref-reftable-group
Methods
-------
.. table::
:widths: auto
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`_forward_atlas_subtile_selection<class_TileSet_method__forward_atlas_subtile_selection>` **(** :ref:`int<class_int>` atlastile_id, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** |virtual| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`_forward_subtile_selection<class_TileSet_method__forward_subtile_selection>` **(** :ref:`int<class_int>` autotile_id, :ref:`int<class_int>` bitmask, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** |virtual| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`_is_tile_bound<class_TileSet_method__is_tile_bound>` **(** :ref:`int<class_int>` drawn_id, :ref:`int<class_int>` neighbor_id **)** |virtual| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_clear_bitmask_map<class_TileSet_method_autotile_clear_bitmask_map>` **(** :ref:`int<class_int>` id **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`autotile_get_bitmask<class_TileSet_method_autotile_get_bitmask>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` | :ref:`autotile_get_bitmask_mode<class_TileSet_method_autotile_get_bitmask_mode>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`FallbackMode<enum_TileSet_FallbackMode>` | :ref:`autotile_get_fallback_mode<class_TileSet_method_autotile_get_fallback_mode>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`autotile_get_icon_coordinate<class_TileSet_method_autotile_get_icon_coordinate>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`autotile_get_light_occluder<class_TileSet_method_autotile_get_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`autotile_get_navigation_polygon<class_TileSet_method_autotile_get_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`autotile_get_size<class_TileSet_method_autotile_get_size>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`autotile_get_spacing<class_TileSet_method_autotile_get_spacing>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`autotile_get_subtile_priority<class_TileSet_method_autotile_get_subtile_priority>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`autotile_get_z_index<class_TileSet_method_autotile_get_z_index>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_bitmask<class_TileSet_method_autotile_set_bitmask>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` bitmask, :ref:`int<class_int>` flag **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_bitmask_mode<class_TileSet_method_autotile_set_bitmask_mode>` **(** :ref:`int<class_int>` id, :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` mode **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_fallback_mode<class_TileSet_method_autotile_set_fallback_mode>` **(** :ref:`int<class_int>` id, :ref:`FallbackMode<enum_TileSet_FallbackMode>` mode **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_icon_coordinate<class_TileSet_method_autotile_set_icon_coordinate>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_light_occluder<class_TileSet_method_autotile_set_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_navigation_polygon<class_TileSet_method_autotile_set_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon, :ref:`Vector2<class_Vector2>` coord **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_size<class_TileSet_method_autotile_set_size>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` size **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_spacing<class_TileSet_method_autotile_set_spacing>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` spacing **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_subtile_priority<class_TileSet_method_autotile_set_subtile_priority>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` priority **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`autotile_set_z_index<class_TileSet_method_autotile_set_z_index>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` z_index **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`clear<class_TileSet_method_clear>` **(** **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`create_tile<class_TileSet_method_create_tile>` **(** :ref:`int<class_int>` id **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`find_tile_by_name<class_TileSet_method_find_tile_by_name>` **(** :ref:`String<class_String>` name **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`get_last_unused_tile_id<class_TileSet_method_get_last_unused_tile_id>` **(** **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`get_tiles_ids<class_TileSet_method_get_tiles_ids>` **(** **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`remove_tile<class_TileSet_method_remove_tile>` **(** :ref:`int<class_int>` id **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_add_shape<class_TileSet_method_tile_add_shape>` **(** :ref:`int<class_int>` id, :ref:`Shape2D<class_Shape2D>` shape, :ref:`Transform2D<class_Transform2D>` shape_transform, :ref:`bool<class_bool>` one_way=false, :ref:`Vector2<class_Vector2>` autotile_coord=Vector2( 0, 0 ) **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` | :ref:`tile_get_light_occluder<class_TileSet_method_tile_get_light_occluder>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ShaderMaterial<class_ShaderMaterial>` | :ref:`tile_get_material<class_TileSet_method_tile_get_material>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Color<class_Color>` | :ref:`tile_get_modulate<class_TileSet_method_tile_get_modulate>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`tile_get_name<class_TileSet_method_tile_get_name>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`NavigationPolygon<class_NavigationPolygon>` | :ref:`tile_get_navigation_polygon<class_TileSet_method_tile_get_navigation_polygon>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`tile_get_navigation_polygon_offset<class_TileSet_method_tile_get_navigation_polygon_offset>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Texture<class_Texture>` | :ref:`tile_get_normal_map<class_TileSet_method_tile_get_normal_map>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`tile_get_occluder_offset<class_TileSet_method_tile_get_occluder_offset>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Rect2<class_Rect2>` | :ref:`tile_get_region<class_TileSet_method_tile_get_region>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Shape2D<class_Shape2D>` | :ref:`tile_get_shape<class_TileSet_method_tile_get_shape>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`tile_get_shape_count<class_TileSet_method_tile_get_shape_count>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`tile_get_shape_offset<class_TileSet_method_tile_get_shape_offset>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`tile_get_shape_one_way<class_TileSet_method_tile_get_shape_one_way>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`tile_get_shape_one_way_margin<class_TileSet_method_tile_get_shape_one_way_margin>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Transform2D<class_Transform2D>` | :ref:`tile_get_shape_transform<class_TileSet_method_tile_get_shape_transform>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>` | :ref:`tile_get_shapes<class_TileSet_method_tile_get_shapes>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Texture<class_Texture>` | :ref:`tile_get_texture<class_TileSet_method_tile_get_texture>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector2<class_Vector2>` | :ref:`tile_get_texture_offset<class_TileSet_method_tile_get_texture_offset>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`TileMode<enum_TileSet_TileMode>` | :ref:`tile_get_tile_mode<class_TileSet_method_tile_get_tile_mode>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`int<class_int>` | :ref:`tile_get_z_index<class_TileSet_method_tile_get_z_index>` **(** :ref:`int<class_int>` id **)** |const| |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_light_occluder<class_TileSet_method_tile_set_light_occluder>` **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_material<class_TileSet_method_tile_set_material>` **(** :ref:`int<class_int>` id, :ref:`ShaderMaterial<class_ShaderMaterial>` material **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_modulate<class_TileSet_method_tile_set_modulate>` **(** :ref:`int<class_int>` id, :ref:`Color<class_Color>` color **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_name<class_TileSet_method_tile_set_name>` **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_navigation_polygon<class_TileSet_method_tile_set_navigation_polygon>` **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_navigation_polygon_offset<class_TileSet_method_tile_set_navigation_polygon_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` navigation_polygon_offset **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_normal_map<class_TileSet_method_tile_set_normal_map>` **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` normal_map **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_occluder_offset<class_TileSet_method_tile_set_occluder_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` occluder_offset **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_region<class_TileSet_method_tile_set_region>` **(** :ref:`int<class_int>` id, :ref:`Rect2<class_Rect2>` region **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shape<class_TileSet_method_tile_set_shape>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Shape2D<class_Shape2D>` shape **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shape_offset<class_TileSet_method_tile_set_shape_offset>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Vector2<class_Vector2>` shape_offset **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shape_one_way<class_TileSet_method_tile_set_shape_one_way>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`bool<class_bool>` one_way **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shape_one_way_margin<class_TileSet_method_tile_set_shape_one_way_margin>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`float<class_float>` one_way **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shape_transform<class_TileSet_method_tile_set_shape_transform>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Transform2D<class_Transform2D>` shape_transform **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_shapes<class_TileSet_method_tile_set_shapes>` **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_texture<class_TileSet_method_tile_set_texture>` **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` texture **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_texture_offset<class_TileSet_method_tile_set_texture_offset>` **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` texture_offset **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_tile_mode<class_TileSet_method_tile_set_tile_mode>` **(** :ref:`int<class_int>` id, :ref:`TileMode<enum_TileSet_TileMode>` tilemode **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`tile_set_z_index<class_TileSet_method_tile_set_z_index>` **(** :ref:`int<class_int>` id, :ref:`int<class_int>` z_index **)** |
+---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Enumerations
------------
.. _enum_TileSet_BitmaskMode:
.. rst-class:: classref-enumeration
enum **BitmaskMode**:
.. _class_TileSet_constant_BITMASK_2X2:
.. rst-class:: classref-enumeration-constant
:ref:`BitmaskMode<enum_TileSet_BitmaskMode>` **BITMASK_2X2** = ``0``
.. _class_TileSet_constant_BITMASK_3X3_MINIMAL:
.. rst-class:: classref-enumeration-constant
:ref:`BitmaskMode<enum_TileSet_BitmaskMode>` **BITMASK_3X3_MINIMAL** = ``1``
.. _class_TileSet_constant_BITMASK_3X3:
.. rst-class:: classref-enumeration-constant
:ref:`BitmaskMode<enum_TileSet_BitmaskMode>` **BITMASK_3X3** = ``2``
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_FallbackMode:
.. rst-class:: classref-enumeration
enum **FallbackMode**:
.. _class_TileSet_constant_FALLBACK_AUTO:
.. rst-class:: classref-enumeration-constant
:ref:`FallbackMode<enum_TileSet_FallbackMode>` **FALLBACK_AUTO** = ``0``
Autotiles will automatically find a best match for missing tiles if they're incomplete.
.. _class_TileSet_constant_FALLBACK_ICON:
.. rst-class:: classref-enumeration-constant
:ref:`FallbackMode<enum_TileSet_FallbackMode>` **FALLBACK_ICON** = ``1``
Autotiles will use the icon tile for missing tiles if they're incomplete.
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_AutotileBindings:
.. rst-class:: classref-enumeration
enum **AutotileBindings**:
.. _class_TileSet_constant_BIND_TOPLEFT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_TOPLEFT** = ``1``
.. _class_TileSet_constant_BIND_TOP:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_TOP** = ``2``
.. _class_TileSet_constant_BIND_TOPRIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_TOPRIGHT** = ``4``
.. _class_TileSet_constant_BIND_LEFT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_LEFT** = ``8``
.. _class_TileSet_constant_BIND_CENTER:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_CENTER** = ``16``
.. _class_TileSet_constant_BIND_RIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_RIGHT** = ``32``
.. _class_TileSet_constant_BIND_BOTTOMLEFT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_BOTTOMLEFT** = ``64``
.. _class_TileSet_constant_BIND_BOTTOM:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_BOTTOM** = ``128``
.. _class_TileSet_constant_BIND_BOTTOMRIGHT:
.. rst-class:: classref-enumeration-constant
:ref:`AutotileBindings<enum_TileSet_AutotileBindings>` **BIND_BOTTOMRIGHT** = ``256``
.. rst-class:: classref-item-separator
----
.. _enum_TileSet_TileMode:
.. rst-class:: classref-enumeration
enum **TileMode**:
.. _class_TileSet_constant_SINGLE_TILE:
.. rst-class:: classref-enumeration-constant
:ref:`TileMode<enum_TileSet_TileMode>` **SINGLE_TILE** = ``0``
.. _class_TileSet_constant_AUTO_TILE:
.. rst-class:: classref-enumeration-constant
:ref:`TileMode<enum_TileSet_TileMode>` **AUTO_TILE** = ``1``
.. _class_TileSet_constant_ATLAS_TILE:
.. rst-class:: classref-enumeration-constant
:ref:`TileMode<enum_TileSet_TileMode>` **ATLAS_TILE** = ``2``
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Method Descriptions
-------------------
.. _class_TileSet_method__forward_atlas_subtile_selection:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **_forward_atlas_subtile_selection** **(** :ref:`int<class_int>` atlastile_id, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** |virtual|
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method__forward_subtile_selection:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **_forward_subtile_selection** **(** :ref:`int<class_int>` autotile_id, :ref:`int<class_int>` bitmask, :ref:`Object<class_Object>` tilemap, :ref:`Vector2<class_Vector2>` tile_location **)** |virtual|
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method__is_tile_bound:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **_is_tile_bound** **(** :ref:`int<class_int>` drawn_id, :ref:`int<class_int>` neighbor_id **)** |virtual|
Determines when the auto-tiler should consider two different auto-tile IDs to be bound together.
\ **Note:** ``neighbor_id`` will be ``-1`` (:ref:`TileMap.INVALID_CELL<class_TileMap_constant_INVALID_CELL>`) when checking a tile against an empty neighbor tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_clear_bitmask_map:
.. rst-class:: classref-method
void **autotile_clear_bitmask_map** **(** :ref:`int<class_int>` id **)**
Clears all bitmask information of the autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_bitmask:
.. rst-class:: classref-method
:ref:`int<class_int>` **autotile_get_bitmask** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
Returns the bitmask of the subtile from an autotile given its coordinates.
The value is the sum of the values in :ref:`AutotileBindings<enum_TileSet_AutotileBindings>` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_bitmask_mode:
.. rst-class:: classref-method
:ref:`BitmaskMode<enum_TileSet_BitmaskMode>` **autotile_get_bitmask_mode** **(** :ref:`int<class_int>` id **)** |const|
Returns the :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` of the autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_fallback_mode:
.. rst-class:: classref-method
:ref:`FallbackMode<enum_TileSet_FallbackMode>` **autotile_get_fallback_mode** **(** :ref:`int<class_int>` id **)** |const|
Returns the :ref:`FallbackMode<enum_TileSet_FallbackMode>` of the autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_icon_coordinate:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **autotile_get_icon_coordinate** **(** :ref:`int<class_int>` id **)** |const|
Returns the subtile that's being used as an icon in an atlas/autotile given its coordinates.
The subtile defined as the icon will be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_light_occluder:
.. rst-class:: classref-method
:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **autotile_get_light_occluder** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |const|
Returns the light occluder of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_navigation_polygon:
.. rst-class:: classref-method
:ref:`NavigationPolygon<class_NavigationPolygon>` **autotile_get_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)** |const|
Returns the navigation polygon of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_size:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **autotile_get_size** **(** :ref:`int<class_int>` id **)** |const|
Returns the size of the subtiles in an atlas/autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_spacing:
.. rst-class:: classref-method
:ref:`int<class_int>` **autotile_get_spacing** **(** :ref:`int<class_int>` id **)** |const|
Returns the spacing between subtiles of the atlas/autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_subtile_priority:
.. rst-class:: classref-method
:ref:`int<class_int>` **autotile_get_subtile_priority** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
Returns the priority of the subtile from an autotile given its coordinates.
When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_get_z_index:
.. rst-class:: classref-method
:ref:`int<class_int>` **autotile_get_z_index** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
Returns the drawing index of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_bitmask:
.. rst-class:: classref-method
void **autotile_set_bitmask** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` bitmask, :ref:`int<class_int>` flag **)**
Sets the bitmask of the subtile from an autotile given its coordinates.
The value is the sum of the values in :ref:`AutotileBindings<enum_TileSet_AutotileBindings>` present in the subtile (e.g. a value of 5 means the bitmask has bindings in both the top left and top right).
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_bitmask_mode:
.. rst-class:: classref-method
void **autotile_set_bitmask_mode** **(** :ref:`int<class_int>` id, :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` mode **)**
Sets the :ref:`BitmaskMode<enum_TileSet_BitmaskMode>` of the autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_fallback_mode:
.. rst-class:: classref-method
void **autotile_set_fallback_mode** **(** :ref:`int<class_int>` id, :ref:`FallbackMode<enum_TileSet_FallbackMode>` mode **)**
Returns the :ref:`FallbackMode<enum_TileSet_FallbackMode>` of the autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_icon_coordinate:
.. rst-class:: classref-method
void **autotile_set_icon_coordinate** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord **)**
Sets the subtile that will be used as an icon in an atlas/autotile given its coordinates.
The subtile defined as the icon may be used as a fallback when the atlas/autotile's bitmask information is incomplete. It will also be used to represent it in the TileSet editor.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_light_occluder:
.. rst-class:: classref-method
void **autotile_set_light_occluder** **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder, :ref:`Vector2<class_Vector2>` coord **)**
Sets the light occluder of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_navigation_polygon:
.. rst-class:: classref-method
void **autotile_set_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon, :ref:`Vector2<class_Vector2>` coord **)**
Sets the navigation polygon of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_size:
.. rst-class:: classref-method
void **autotile_set_size** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` size **)**
Sets the size of the subtiles in an atlas/autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_spacing:
.. rst-class:: classref-method
void **autotile_set_spacing** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` spacing **)**
Sets the spacing between subtiles of the atlas/autotile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_subtile_priority:
.. rst-class:: classref-method
void **autotile_set_subtile_priority** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` priority **)**
Sets the priority of the subtile from an autotile given its coordinates.
When more than one subtile has the same bitmask value, one of them will be picked randomly for drawing. Its priority will define how often it will be picked.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_autotile_set_z_index:
.. rst-class:: classref-method
void **autotile_set_z_index** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` coord, :ref:`int<class_int>` z_index **)**
Sets the drawing index of the subtile from an atlas/autotile given its coordinates.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_clear:
.. rst-class:: classref-method
void **clear** **(** **)**
Clears all tiles.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_create_tile:
.. rst-class:: classref-method
void **create_tile** **(** :ref:`int<class_int>` id **)**
Creates a new tile with the given ID.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_find_tile_by_name:
.. rst-class:: classref-method
:ref:`int<class_int>` **find_tile_by_name** **(** :ref:`String<class_String>` name **)** |const|
Returns the first tile matching the given name.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_last_unused_tile_id:
.. rst-class:: classref-method
:ref:`int<class_int>` **get_last_unused_tile_id** **(** **)** |const|
Returns the ID following the last currently used ID, useful when creating a new tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_get_tiles_ids:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **get_tiles_ids** **(** **)** |const|
Returns an array of all currently used tile IDs.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_remove_tile:
.. rst-class:: classref-method
void **remove_tile** **(** :ref:`int<class_int>` id **)**
Removes the given tile ID.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_add_shape:
.. rst-class:: classref-method
void **tile_add_shape** **(** :ref:`int<class_int>` id, :ref:`Shape2D<class_Shape2D>` shape, :ref:`Transform2D<class_Transform2D>` shape_transform, :ref:`bool<class_bool>` one_way=false, :ref:`Vector2<class_Vector2>` autotile_coord=Vector2( 0, 0 ) **)**
Adds a shape to the tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_light_occluder:
.. rst-class:: classref-method
:ref:`OccluderPolygon2D<class_OccluderPolygon2D>` **tile_get_light_occluder** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's light occluder.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_material:
.. rst-class:: classref-method
:ref:`ShaderMaterial<class_ShaderMaterial>` **tile_get_material** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's material.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_modulate:
.. rst-class:: classref-method
:ref:`Color<class_Color>` **tile_get_modulate** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's modulation color.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_name:
.. rst-class:: classref-method
:ref:`String<class_String>` **tile_get_name** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's name.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_navigation_polygon:
.. rst-class:: classref-method
:ref:`NavigationPolygon<class_NavigationPolygon>` **tile_get_navigation_polygon** **(** :ref:`int<class_int>` id **)** |const|
Returns the navigation polygon of the tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_navigation_polygon_offset:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **tile_get_navigation_polygon_offset** **(** :ref:`int<class_int>` id **)** |const|
Returns the offset of the tile's navigation polygon.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_normal_map:
.. rst-class:: classref-method
:ref:`Texture<class_Texture>` **tile_get_normal_map** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's normal map texture.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_occluder_offset:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **tile_get_occluder_offset** **(** :ref:`int<class_int>` id **)** |const|
Returns the offset of the tile's light occluder.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_region:
.. rst-class:: classref-method
:ref:`Rect2<class_Rect2>` **tile_get_region** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile sub-region in the texture.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape:
.. rst-class:: classref-method
:ref:`Shape2D<class_Shape2D>` **tile_get_shape** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const|
Returns a tile's given shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape_count:
.. rst-class:: classref-method
:ref:`int<class_int>` **tile_get_shape_count** **(** :ref:`int<class_int>` id **)** |const|
Returns the number of shapes assigned to a tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape_offset:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **tile_get_shape_offset** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const|
Returns the offset of a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape_one_way:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **tile_get_shape_one_way** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const|
Returns the one-way collision value of a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape_one_way_margin:
.. rst-class:: classref-method
:ref:`float<class_float>` **tile_get_shape_one_way_margin** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const|
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shape_transform:
.. rst-class:: classref-method
:ref:`Transform2D<class_Transform2D>` **tile_get_shape_transform** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id **)** |const|
Returns the :ref:`Transform2D<class_Transform2D>` of a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_shapes:
.. rst-class:: classref-method
:ref:`Array<class_Array>` **tile_get_shapes** **(** :ref:`int<class_int>` id **)** |const|
Returns an array of dictionaries describing the tile's shapes.
\ **Dictionary structure in the array returned by this method:**\
::
{
"autotile_coord": Vector2,
"one_way": bool,
"one_way_margin": int,
"shape": CollisionShape2D,
"shape_transform": Transform2D,
}
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_texture:
.. rst-class:: classref-method
:ref:`Texture<class_Texture>` **tile_get_texture** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's texture.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_texture_offset:
.. rst-class:: classref-method
:ref:`Vector2<class_Vector2>` **tile_get_texture_offset** **(** :ref:`int<class_int>` id **)** |const|
Returns the texture offset of the tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_tile_mode:
.. rst-class:: classref-method
:ref:`TileMode<enum_TileSet_TileMode>` **tile_get_tile_mode** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's :ref:`TileMode<enum_TileSet_TileMode>`.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_get_z_index:
.. rst-class:: classref-method
:ref:`int<class_int>` **tile_get_z_index** **(** :ref:`int<class_int>` id **)** |const|
Returns the tile's Z index (drawing layer).
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_light_occluder:
.. rst-class:: classref-method
void **tile_set_light_occluder** **(** :ref:`int<class_int>` id, :ref:`OccluderPolygon2D<class_OccluderPolygon2D>` light_occluder **)**
Sets a light occluder for the tile.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_material:
.. rst-class:: classref-method
void **tile_set_material** **(** :ref:`int<class_int>` id, :ref:`ShaderMaterial<class_ShaderMaterial>` material **)**
Sets the tile's material.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_modulate:
.. rst-class:: classref-method
void **tile_set_modulate** **(** :ref:`int<class_int>` id, :ref:`Color<class_Color>` color **)**
Sets the tile's modulation color.
\ **Note:** Modulation is performed by setting the tile's vertex color. To access this in a shader, use ``COLOR`` rather than ``MODULATE`` (which instead accesses the :ref:`TileMap<class_TileMap>`'s :ref:`CanvasItem.modulate<class_CanvasItem_property_modulate>` property).
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_name:
.. rst-class:: classref-method
void **tile_set_name** **(** :ref:`int<class_int>` id, :ref:`String<class_String>` name **)**
Sets the tile's name.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_navigation_polygon:
.. rst-class:: classref-method
void **tile_set_navigation_polygon** **(** :ref:`int<class_int>` id, :ref:`NavigationPolygon<class_NavigationPolygon>` navigation_polygon **)**
Sets the tile's navigation polygon.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_navigation_polygon_offset:
.. rst-class:: classref-method
void **tile_set_navigation_polygon_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` navigation_polygon_offset **)**
Sets an offset for the tile's navigation polygon.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_normal_map:
.. rst-class:: classref-method
void **tile_set_normal_map** **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` normal_map **)**
Sets the tile's normal map texture.
\ **Note:** Godot expects the normal map to use X+, Y-, and Z+ coordinates. See `this page <http://wiki.polycount.com/wiki/Normal_Map_Technical_Details#Common_Swizzle_Coordinates>`__ for a comparison of normal map coordinates expected by popular engines.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_occluder_offset:
.. rst-class:: classref-method
void **tile_set_occluder_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` occluder_offset **)**
Sets an offset for the tile's light occluder.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_region:
.. rst-class:: classref-method
void **tile_set_region** **(** :ref:`int<class_int>` id, :ref:`Rect2<class_Rect2>` region **)**
Sets the tile's sub-region in the texture. This is common in texture atlases.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shape:
.. rst-class:: classref-method
void **tile_set_shape** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Shape2D<class_Shape2D>` shape **)**
Sets a shape for the tile, enabling collision.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shape_offset:
.. rst-class:: classref-method
void **tile_set_shape_offset** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Vector2<class_Vector2>` shape_offset **)**
Sets the offset of a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shape_one_way:
.. rst-class:: classref-method
void **tile_set_shape_one_way** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`bool<class_bool>` one_way **)**
Enables one-way collision on a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shape_one_way_margin:
.. rst-class:: classref-method
void **tile_set_shape_one_way_margin** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`float<class_float>` one_way **)**
.. container:: contribute
There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shape_transform:
.. rst-class:: classref-method
void **tile_set_shape_transform** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` shape_id, :ref:`Transform2D<class_Transform2D>` shape_transform **)**
Sets a :ref:`Transform2D<class_Transform2D>` on a tile's shape.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_shapes:
.. rst-class:: classref-method
void **tile_set_shapes** **(** :ref:`int<class_int>` id, :ref:`Array<class_Array>` shapes **)**
Sets an array of shapes for the tile, enabling collision.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_texture:
.. rst-class:: classref-method
void **tile_set_texture** **(** :ref:`int<class_int>` id, :ref:`Texture<class_Texture>` texture **)**
Sets the tile's texture.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_texture_offset:
.. rst-class:: classref-method
void **tile_set_texture_offset** **(** :ref:`int<class_int>` id, :ref:`Vector2<class_Vector2>` texture_offset **)**
Sets the tile's texture offset.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_tile_mode:
.. rst-class:: classref-method
void **tile_set_tile_mode** **(** :ref:`int<class_int>` id, :ref:`TileMode<enum_TileSet_TileMode>` tilemode **)**
Sets the tile's :ref:`TileMode<enum_TileSet_TileMode>`.
.. rst-class:: classref-item-separator
----
.. _class_TileSet_method_tile_set_z_index:
.. rst-class:: classref-method
void **tile_set_z_index** **(** :ref:`int<class_int>` id, :ref:`int<class_int>` z_index **)**
Sets the tile's drawing index.
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`