Index · Object → Node → CanvasItem → Node2D → TileMap

TileMap

Node for 2D tile-based maps.

Class Description

Node for 2D tile-based maps. Tilemaps use a TileSet which contain a list of tiles which are used to create grid-based maps. A TileMap may have several layers, layouting tiles on top of each other.

For performance reasons, all TileMap updates are batched at the end of a frame. Notably, this means that scene tiles from a TileSetScenesCollectionSource may be initialized after their parent. This is only queued when inside the scene tree.

To force an update earlier on, call update_internals().

Note: For performance and compatibility reasons, the coordinates serialized by TileMap are limited to 16-bit signed integers, i.e. the range for X and Y coordinates is from -32768 to 32767. When saving tile data, tiles outside this range are wrapped.

Properties

var collision_animatable: bool = false

If enabled, the TileMap will see its collisions synced to the physics tick and change its collision type from static to kinematic. This is required to create TileMap-based moving platform.

Note: Enabling collision_animatable may have a small performance impact, only do it if the TileMap is moving and has colliding tiles.

var collision_visibility_mode: TileMap.VisibilityMode = 0

Show or hide the TileMap's collision shapes. If set to VISIBILITY_MODE_DEFAULT, this depends on the show collision debug settings.

var navigation_visibility_mode: TileMap.VisibilityMode = 0

Show or hide the TileMap's navigation meshes. If set to VISIBILITY_MODE_DEFAULT, this depends on the show navigation debug settings.

var rendering_quadrant_size: int = 16

The TileMap's quadrant size. A quadrant is a group of tiles to be drawn together on a single canvas item, for optimization purposes. rendering_quadrant_size defines the length of a square's side, in the map's coordinate system, that forms the quadrant. Thus, the default quadrant size groups together 16 * 16 = 256 tiles.

The quadrant size does not apply on Y-sorted layers, as tiles are grouped by Y position instead in that case.

Note: As quadrants are created according to the map's coordinate system, the quadrant's "square shape" might not look like square in the TileMap's local coordinate system.

var tile_set: TileSet

The TileSet used by this TileMap. The textures, collisions, and additional behavior of all available tiles are stored here.

Inherited from Node2D (12)
var position: Vector2 = Vector2(0, 0)
var rotation: float = 0.0
var scale: Vector2 = Vector2(1, 1)
var skew: float = 0.0
Inherited from CanvasItem (16)
var light_mask: int = 1
var modulate: Color = Color(1, 1, 1, 1)
var self_modulate: Color = Color(1, 1, 1, 1)
var top_level: bool = false
var visible: bool = true
var y_sort_enabled: bool = false
var z_as_relative: bool = true
var z_index: int = 0
Inherited from Node (14)
var owner: Node

Methods

func _tile_data_runtime_update(layer: int, coords: Vector2i, tile_data: TileData) -> void

Called with a TileData object about to be used internally by the TileMap, allowing its modification at runtime.

This method is only called if _use_tile_data_runtime_update() is implemented and returns true for the given tile coords and layer.

Warning: The tile_data object's sub-resources are the same as the one in the TileSet. Modifying them might impact the whole TileSet. Instead, make sure to duplicate those resources.

Note: If the properties of tile_data object should change over time, use notify_runtime_tile_data_update() to notify the TileMap it needs an update.

func _use_tile_data_runtime_update(layer: int, coords: Vector2i) -> bool

Should return true if the tile at coordinates coords on layer layer requires a runtime update.

Warning: Make sure this function only return true when needed. Any tile processed at runtime without a need for it will imply a significant performance penalty.

Note: If the result of this function should changed, use notify_runtime_tile_data_update() to notify the TileMap it needs an update.

func add_layer(to_position: int) -> void

Adds a layer at the given position to_position in the array. If to_position is negative, the position is counted from the end, with -1 adding the layer at the end of the array.

func clear() -> void

Clears all cells.

func clear_layer(layer: int) -> void

Clears all cells on the given layer.

If layer is negative, the layers are accessed from the last one.

func erase_cell(layer: int, coords: Vector2i) -> void

Erases the cell on layer layer at coordinates coords.

If layer is negative, the layers are accessed from the last one.

func fix_invalid_tiles() -> void

Clears cells that do not exist in the tileset.

func force_update(layer: int = -1) -> void

Forces the TileMap and the layer layer to update.

func get_cell_alternative_tile(layer: int, coords: Vector2i, use_proxies: bool = false) -> int

Returns the tile alternative ID of the cell on layer layer at coords.

If use_proxies is false, ignores the TileSet's tile proxies, returning the raw alternative identifier. See TileSet.map_tile_proxy().

If layer is negative, the layers are accessed from the last one.

func get_cell_atlas_coords(layer: int, coords: Vector2i, use_proxies: bool = false) -> Vector2i

Returns the tile atlas coordinates ID of the cell on layer layer at coordinates coords. Returns Vector2i(-1, -1) if the cell does not exist.

If use_proxies is false, ignores the TileSet's tile proxies, returning the raw atlas coordinate identifier. See TileSet.map_tile_proxy().

If layer is negative, the layers are accessed from the last one.

func get_cell_source_id(layer: int, coords: Vector2i, use_proxies: bool = false) -> int

Returns the tile source ID of the cell on layer layer at coordinates coords. Returns -1 if the cell does not exist.

If use_proxies is false, ignores the TileSet's tile proxies, returning the raw source identifier. See TileSet.map_tile_proxy().

If layer is negative, the layers are accessed from the last one.

func get_cell_tile_data(layer: int, coords: Vector2i, use_proxies: bool = false) -> TileData

Returns the TileData object associated with the given cell, or null if the cell does not exist or is not a TileSetAtlasSource.

If layer is negative, the layers are accessed from the last one.

func get_clicked_tile_power():
	var clicked_cell = tile_map.local_to_map(tile_map.get_local_mouse_position())
	var data = tile_map.get_cell_tile_data(0, clicked_cell)
	if data:
		return data.get_custom_data("power")
	else:
		return 0

If use_proxies is false, ignores the TileSet's tile proxies. See TileSet.map_tile_proxy().

func get_coords_for_body_rid(body: RID) -> Vector2i

Returns the coordinates of the tile for given physics body RID. Such RID can be retrieved from KinematicCollision2D.get_collider_rid(), when colliding with a tile.

func get_layer_for_body_rid(body: RID) -> int

Returns the tilemap layer of the tile for given physics body RID. Such RID can be retrieved from KinematicCollision2D.get_collider_rid(), when colliding with a tile.

func get_layer_modulate(layer: int) -> Color

Returns a TileMap layer's modulate.

If layer is negative, the layers are accessed from the last one.

func get_layer_name(layer: int) -> String

Returns a TileMap layer's name.

If layer is negative, the layers are accessed from the last one.

func get_layer_navigation_map(layer: int) -> RID

Returns the RID of the NavigationServer2D navigation map assigned to the specified TileMap layer layer.

By default the TileMap uses the default World2D navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer.

In order to make NavigationAgent2D switch between TileMap layer navigation maps use NavigationAgent2D.set_navigation_map() with the navigation map received from get_layer_navigation_map().

If layer is negative, the layers are accessed from the last one.

func get_layer_y_sort_origin(layer: int) -> int

Returns a TileMap layer's Y sort origin.

If layer is negative, the layers are accessed from the last one.

func get_layer_z_index(layer: int) -> int

Returns a TileMap layer's Z-index value.

If layer is negative, the layers are accessed from the last one.

func get_layers_count() -> int

Returns the number of layers in the TileMap.

func get_navigation_map(layer: int) -> RID

Returns the RID of the NavigationServer2D navigation map assigned to the specified TileMap layer layer.

func get_neighbor_cell(coords: Vector2i, neighbor: TileSet.CellNeighbor) -> Vector2i

Returns the neighboring cell to the one at coordinates coords, identified by the neighbor direction. This method takes into account the different layouts a TileMap can take.

func get_pattern(layer: int, coords_array: Vector2i[]) -> TileMapPattern

Creates a new TileMapPattern from the given layer and set of cells.

If layer is negative, the layers are accessed from the last one.

func get_surrounding_cells(coords: Vector2i) -> Vector2i[]

Returns the list of all neighbourings cells to the one at coords.

func get_used_cells(layer: int) -> Vector2i[]

Returns a Vector2i array with the positions of all cells containing a tile in the given layer. A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is Vector2(-1, -1) and its alternative identifier is -1.

If layer is negative, the layers are accessed from the last one.

func get_used_cells_by_id(layer: int, source_id: int = -1, atlas_coords: Vector2i = Vector2i(-1, -1), alternative_tile: int = -1) -> Vector2i[]

Returns a Vector2i array with the positions of all cells containing a tile in the given layer. Tiles may be filtered according to their source (source_id), their atlas coordinates (atlas_coords) or alternative id (alternative_tile).

If a parameter has its value set to the default one, this parameter is not used to filter a cell. Thus, if all parameters have their respective default value, this method returns the same result as get_used_cells().

A cell is considered empty if its source identifier equals -1, its atlas coordinates identifiers is Vector2(-1, -1) and its alternative identifier is -1.

If layer is negative, the layers are accessed from the last one.

func get_used_rect() -> Rect2i

Returns a rectangle enclosing the used (non-empty) tiles of the map, including all layers.

func is_cell_flipped_h(layer: int, coords: Vector2i, use_proxies: bool = false) -> bool

Returns true if the cell on layer layer at coordinates coords is flipped horizontally. The result is valid only for atlas sources.

func is_cell_flipped_v(layer: int, coords: Vector2i, use_proxies: bool = false) -> bool

Returns true if the cell on layer layer at coordinates coords is flipped vertically. The result is valid only for atlas sources.

func is_cell_transposed(layer: int, coords: Vector2i, use_proxies: bool = false) -> bool

Returns true if the cell on layer layer at coordinates coords is transposed. The result is valid only for atlas sources.

func is_layer_enabled(layer: int) -> bool

Returns if a layer is enabled.

If layer is negative, the layers are accessed from the last one.

func is_layer_navigation_enabled(layer: int) -> bool

Returns if a layer's built-in navigation regions generation is enabled.

func is_layer_y_sort_enabled(layer: int) -> bool

Returns if a layer Y-sorts its tiles.

If layer is negative, the layers are accessed from the last one.

func local_to_map(local_position: Vector2) -> Vector2i

Returns the map coordinates of the cell containing the given local_position. If local_position is in global coordinates, consider using Node2D.to_local() before passing it to this method. See also map_to_local().

func map_pattern(position_in_tilemap: Vector2i, coords_in_pattern: Vector2i, pattern: TileMapPattern) -> Vector2i

Returns for the given coordinate coords_in_pattern in a TileMapPattern the corresponding cell coordinates if the pattern was pasted at the position_in_tilemap coordinates (see set_pattern()). This mapping is required as in half-offset tile shapes, the mapping might not work by calculating position_in_tile_map + coords_in_pattern.

func map_to_local(map_position: Vector2i) -> Vector2

Returns the centered position of a cell in the TileMap's local coordinate space. To convert the returned value into global coordinates, use Node2D.to_global(). See also local_to_map().

Note: This may not correspond to the visual position of the tile, i.e. it ignores the TileData.texture_origin property of individual tiles.

func move_layer(layer: int, to_position: int) -> void

Moves the layer at index layer to the given position to_position in the array.

func notify_runtime_tile_data_update(layer: int = -1) -> void

Notifies the TileMap node that calls to _use_tile_data_runtime_update() or _tile_data_runtime_update() will lead to different results. This will thus trigger a TileMap update.

If layer is provided, only notifies changes for the given layer. Providing the layer argument (when applicable) is usually preferred for performance reasons.

Warning: Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of calls to this function to avoid unnecessary update.

Note: This does not trigger a direct update of the TileMap, the update will be done at the end of the frame as usual (unless you call update_internals()).

func remove_layer(layer: int) -> void

Removes the layer at index layer.

func set_cell(layer: int, coords: Vector2i, source_id: int = -1, atlas_coords: Vector2i = Vector2i(-1, -1), alternative_tile: int = 0) -> void

Sets the tile identifiers for the cell on layer layer at coordinates coords. Each tile of the TileSet is identified using three parts:

- The source identifier source_id identifies a TileSetSource identifier. See TileSet.set_source_id(),

- The atlas coordinates identifier atlas_coords identifies a tile coordinates in the atlas (if the source is a TileSetAtlasSource). For TileSetScenesCollectionSource it should always be Vector2i(0, 0)),

- The alternative tile identifier alternative_tile identifies a tile alternative in the atlas (if the source is a TileSetAtlasSource), and the scene for a TileSetScenesCollectionSource.

If source_id is set to -1, atlas_coords to Vector2i(-1, -1) or alternative_tile to -1, the cell will be erased. An erased cell gets all its identifiers automatically set to their respective invalid values, namely -1, Vector2i(-1, -1) and -1.

If layer is negative, the layers are accessed from the last one.

func set_cells_terrain_connect(layer: int, cells: Vector2i[], terrain_set: int, terrain: int, ignore_empty_terrains: bool = true) -> void

Update all the cells in the cells coordinates array so that they use the given terrain for the given terrain_set. If an updated cell has the same terrain as one of its neighboring cells, this function tries to join the two. This function might update neighboring tiles if needed to create correct terrain transitions.

If ignore_empty_terrains is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.

If layer is negative, the layers are accessed from the last one.

Note: To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

func set_cells_terrain_path(layer: int, path: Vector2i[], terrain_set: int, terrain: int, ignore_empty_terrains: bool = true) -> void

Update all the cells in the path coordinates array so that they use the given terrain for the given terrain_set. The function will also connect two successive cell in the path with the same terrain. This function might update neighboring tiles if needed to create correct terrain transitions.

If ignore_empty_terrains is true, empty terrains will be ignored when trying to find the best fitting tile for the given terrain constraints.

If layer is negative, the layers are accessed from the last one.

Note: To work correctly, this method requires the TileMap's TileSet to have terrains set up with all required terrain combinations. Otherwise, it may produce unexpected results.

func set_layer_enabled(layer: int, enabled: bool) -> void

Enables or disables the layer layer. A disabled layer is not processed at all (no rendering, no physics, etc.).

If layer is negative, the layers are accessed from the last one.

func set_layer_modulate(layer: int, modulate: Color) -> void

Sets a layer's color. It will be multiplied by tile's color and TileMap's modulate.

If layer is negative, the layers are accessed from the last one.

func set_layer_name(layer: int, name: String) -> void

Sets a layer's name. This is mostly useful in the editor.

If layer is negative, the layers are accessed from the last one.

func set_layer_navigation_enabled(layer: int, enabled: bool) -> void

Enables or disables a layer's built-in navigation regions generation. Disable this if you need to bake navigation regions from a TileMap using a NavigationRegion2D node.

func set_layer_navigation_map(layer: int, map: RID) -> void

Assigns map as a NavigationServer2D navigation map for the specified TileMap layer layer.

By default the TileMap uses the default World2D navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer.

In order to make NavigationAgent2D switch between TileMap layer navigation maps use NavigationAgent2D.set_navigation_map() with the navigation map received from get_layer_navigation_map().

If layer is negative, the layers are accessed from the last one.

func set_layer_y_sort_enabled(layer: int, y_sort_enabled: bool) -> void

Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted.

Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behavior.

If layer is negative, the layers are accessed from the last one.

func set_layer_y_sort_origin(layer: int, y_sort_origin: int) -> void

Sets a layer's Y-sort origin value. This Y-sort origin value is added to each tile's Y-sort origin value.

This allows, for example, to fake a different height level on each layer. This can be useful for top-down view games.

If layer is negative, the layers are accessed from the last one.

func set_layer_z_index(layer: int, z_index: int) -> void

Sets a layers Z-index value. This Z-index is added to each tile's Z-index value.

If layer is negative, the layers are accessed from the last one.

func set_navigation_map(layer: int, map: RID) -> void

Assigns map as a NavigationServer2D navigation map for the specified TileMap layer layer.

func set_pattern(layer: int, position: Vector2i, pattern: TileMapPattern) -> void

Paste the given TileMapPattern at the given position and layer in the tile map.

If layer is negative, the layers are accessed from the last one.

func update_internals() -> void

Triggers a direct update of the TileMap. Usually, calling this function is not needed, as TileMap node updates automatically when one of its properties or cells is modified.

However, for performance reasons, those updates are batched and delayed to the end of the frame. Calling this function will force the TileMap to update right away instead.

Warning: Updating the TileMap is computationally expensive and may impact performance. Try to limit the number of updates and how many tiles they impact.

Inherited from Node2D (11)
func apply_scale(ratio: Vector2) -> void
func get_angle_to(point: Vector2) -> float
func global_translate(offset: Vector2) -> void
func look_at(point: Vector2) -> void
func move_local_x(delta: float, scaled: bool = false) -> void
func move_local_y(delta: float, scaled: bool = false) -> void
func rotate(radians: float) -> void
func to_global(local_point: Vector2) -> Vector2
func to_local(global_point: Vector2) -> Vector2
func translate(offset: Vector2) -> void
Inherited from CanvasItem (62)
func _draw() -> void
func draw_animation_slice(animation_length: float, slice_begin: float, slice_end: float, offset: float = 0.0) -> void
func draw_arc(center: Vector2, radius: float, start_angle: float, end_angle: float, point_count: int, color: Color, width: float = -1.0, antialiased: bool = false) -> void
func draw_char(font: Font, pos: Vector2, char: String, font_size: int = 16, modulate: Color = Color(1, 1, 1, 1), oversampling: float = 0.0) -> void
func draw_char_outline(font: Font, pos: Vector2, char: String, font_size: int = 16, size: int = -1, modulate: Color = Color(1, 1, 1, 1), oversampling: float = 0.0) -> void
func draw_circle(position: Vector2, radius: float, color: Color, filled: bool = true, width: float = -1.0, antialiased: bool = false) -> void
func draw_colored_polygon(points: PackedVector2Array, color: Color, uvs: PackedVector2Array = PackedVector2Array(), texture: Texture2D = null) -> void
func draw_dashed_line(from: Vector2, to: Vector2, color: Color, width: float = -1.0, dash: float = 2.0, aligned: bool = true, antialiased: bool = false) -> void
func draw_ellipse(position: Vector2, major: float, minor: float, color: Color, filled: bool = true, width: float = -1.0, antialiased: bool = false) -> void
func draw_ellipse_arc(center: Vector2, major: float, minor: float, start_angle: float, end_angle: float, point_count: int, color: Color, width: float = -1.0, antialiased: bool = false) -> void
func draw_end_animation() -> void
func draw_lcd_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = Color(1, 1, 1, 1)) -> void
func draw_line(from: Vector2, to: Vector2, color: Color, width: float = -1.0, antialiased: bool = false) -> void
func draw_mesh(mesh: Mesh, texture: Texture2D, transform: Transform2D = Transform2D(1, 0, 0, 1, 0, 0), modulate: Color = Color(1, 1, 1, 1)) -> void
func draw_msdf_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = Color(1, 1, 1, 1), outline: float = 0.0, pixel_range: float = 4.0, scale: float = 1.0) -> void
func draw_multiline(points: PackedVector2Array, color: Color, width: float = -1.0, antialiased: bool = false) -> void
func draw_multiline_colors(points: PackedVector2Array, colors: PackedColorArray, width: float = -1.0, antialiased: bool = false) -> void
func draw_multiline_string(font: Font, pos: Vector2, text: String, alignment: HorizontalAlignment = 0, width: float = -1, font_size: int = 16, max_lines: int = -1, modulate: Color = Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0, oversampling: float = 0.0) -> void
func draw_multiline_string_outline(font: Font, pos: Vector2, text: String, alignment: HorizontalAlignment = 0, width: float = -1, font_size: int = 16, max_lines: int = -1, size: int = 1, modulate: Color = Color(1, 1, 1, 1), brk_flags: TextServer.LineBreakFlag = 3, justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0, oversampling: float = 0.0) -> void
func draw_multimesh(multimesh: MultiMesh, texture: Texture2D) -> void
func draw_polygon(points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array = PackedVector2Array(), texture: Texture2D = null) -> void
func draw_polyline(points: PackedVector2Array, color: Color, width: float = -1.0, antialiased: bool = false) -> void
func draw_polyline_colors(points: PackedVector2Array, colors: PackedColorArray, width: float = -1.0, antialiased: bool = false) -> void
func draw_primitive(points: PackedVector2Array, colors: PackedColorArray, uvs: PackedVector2Array, texture: Texture2D = null) -> void
func draw_rect(rect: Rect2, color: Color, filled: bool = true, width: float = -1.0, antialiased: bool = false) -> void
func draw_set_transform(position: Vector2, rotation: float = 0.0, scale: Vector2 = Vector2(1, 1)) -> void
func draw_string(font: Font, pos: Vector2, text: String, alignment: HorizontalAlignment = 0, width: float = -1, font_size: int = 16, modulate: Color = Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0, oversampling: float = 0.0) -> void
func draw_string_outline(font: Font, pos: Vector2, text: String, alignment: HorizontalAlignment = 0, width: float = -1, font_size: int = 16, size: int = 1, modulate: Color = Color(1, 1, 1, 1), justification_flags: TextServer.JustificationFlag = 3, direction: TextServer.Direction = 0, orientation: TextServer.Orientation = 0, oversampling: float = 0.0) -> void
func draw_style_box(style_box: StyleBox, rect: Rect2) -> void
func draw_texture(texture: Texture2D, position: Vector2, modulate: Color = Color(1, 1, 1, 1)) -> void
func draw_texture_rect(texture: Texture2D, rect: Rect2, tile: bool, modulate: Color = Color(1, 1, 1, 1), transpose: bool = false) -> void
func draw_texture_rect_region(texture: Texture2D, rect: Rect2, src_rect: Rect2, modulate: Color = Color(1, 1, 1, 1), transpose: bool = false, clip_uv: bool = true) -> void
func force_update_transform() -> void
func get_canvas() -> RID
func hide() -> void
func make_canvas_position_local(viewport_point: Vector2) -> Vector2
func move_to_front() -> void
func queue_redraw() -> void
func set_notify_local_transform(enable: bool) -> void
func set_notify_transform(enable: bool) -> void
func set_visibility_layer_bit(layer: int, enabled: bool) -> void
func show() -> void
Inherited from Node (106)
func _enter_tree() -> void
func _exit_tree() -> void
func _input(event: InputEvent) -> void
func _physics_process(delta: float) -> void
func _process(delta: float) -> void
func _ready() -> void
func _shortcut_input(event: InputEvent) -> void
func _unhandled_input(event: InputEvent) -> void
func _unhandled_key_input(event: InputEvent) -> void
func add_child(node: Node, force_readable_name: bool = false, internal: Node.InternalMode = 0) -> void
func add_sibling(sibling: Node, force_readable_name: bool = false) -> void
func add_to_group(group: StringName, persistent: bool = false) -> void
func atr(message: String, context: StringName = "") -> String
func atr_n(message: String, plural_message: StringName, n: int, context: StringName = "") -> String
func can_process() -> bool
func duplicate(flags: int = 15) -> Node
func find_child(pattern: String, recursive: bool = true, owned: bool = true) -> Node
func find_children(pattern: String, type: String = "", recursive: bool = true, owned: bool = true) -> Node[]
func find_parent(pattern: String) -> Node
func get_child(idx: int, include_internal: bool = false) -> Node
func get_child_count(include_internal: bool = false) -> int
func get_children(include_internal: bool = false) -> Node[]
func get_groups() -> StringName[]
func get_index(include_internal: bool = false) -> int
func get_node(path: NodePath) -> Node
func get_orphan_node_ids() -> int[]
func get_parent() -> Node
func get_path() -> NodePath
func get_path_to(node: Node, use_unique_path: bool = false) -> NodePath
func get_window() -> Window
func has_node(path: NodePath) -> bool
func is_ancestor_of(node: Node) -> bool
func is_greater_than(node: Node) -> bool
func is_in_group(group: StringName) -> bool
func move_child(child_node: Node, to_index: int) -> void
func notify_deferred_thread_group(what: int) -> void
func notify_thread_safe(what: int) -> void
func print_orphan_nodes() -> void
func print_tree() -> void
func print_tree_pretty() -> void
func propagate_call(method: StringName, args: Array = [], parent_first: bool = false) -> void
func propagate_notification(what: int) -> void
func queue_free() -> void
func remove_child(node: Node) -> void
func remove_from_group(group: StringName) -> void
func reparent(new_parent: Node, keep_global_transform: bool = true) -> void
func replace_by(node: Node, keep_groups: bool = false) -> void
func request_ready() -> void
func rpc(method: StringName) -> Error
func rpc_config(method: StringName, config: Variant) -> void
func rpc_id(peer_id: int, method: StringName) -> Error
func set_deferred_thread_group(property: StringName, value: Variant) -> void
func set_display_folded(fold: bool) -> void
func set_editable_instance(node: Node, is_editable: bool) -> void
func set_multiplayer_authority(id: int, recursive: bool = true) -> void
func set_physics_process(enable: bool) -> void
func set_physics_process_internal(enable: bool) -> void
func set_process(enable: bool) -> void
func set_process_input(enable: bool) -> void
func set_process_internal(enable: bool) -> void
func set_process_shortcut_input(enable: bool) -> void
func set_process_unhandled_input(enable: bool) -> void
func set_scene_instance_load_placeholder(load_placeholder: bool) -> void
func set_thread_safe(property: StringName, value: Variant) -> void
Inherited from Object (62)
func _get(property: StringName) -> Variant
func _get_property_list() -> Dictionary[]
func _init() -> void
func _iter_get(iter: Variant) -> Variant
func _iter_init(iter: Array) -> bool
func _iter_next(iter: Array) -> bool
func _notification(what: int) -> void
func _set(property: StringName, value: Variant) -> bool
func _to_string() -> String
func _validate_property(property: Dictionary) -> void
func add_user_signal(signal: String, arguments: Array = []) -> void
func call(method: StringName) -> Variant
func callv(method: StringName, arg_array: Array) -> Variant
func cancel_free() -> void
func connect(signal: StringName, callable: Callable, flags: int = 0) -> Error
func disconnect(signal: StringName, callable: Callable) -> void
func emit_signal(signal: StringName) -> Error
func free() -> void
func get(property: StringName) -> Variant
func get_class() -> String
func get_incoming_connections() -> Dictionary[]
func get_indexed(property_path: NodePath) -> Variant
func get_meta(name: StringName, default: Variant = null) -> Variant
func get_meta_list() -> StringName[]
func get_method_list() -> Dictionary[]
func get_property_list() -> Dictionary[]
func get_signal_connection_list(signal: StringName) -> Dictionary[]
func get_signal_list() -> Dictionary[]
func has_meta(name: StringName) -> bool
func has_method(method: StringName) -> bool
func has_signal(signal: StringName) -> bool
func is_class(class: StringName) -> bool
func is_connected(signal: StringName, callable: Callable) -> bool
func notification(what: int, reversed: bool = false) -> void
func remove_meta(name: StringName) -> void
func remove_user_signal(signal: StringName) -> void
func set(property: StringName, value: Variant) -> void
func set_block_signals(enable: bool) -> void
func set_deferred(property: StringName, value: Variant) -> void
func set_indexed(property_path: NodePath, value: Variant) -> void
func set_message_translation(enable: bool) -> void
func set_meta(name: StringName, value: Variant) -> void
func set_script(script: Variant) -> void
func set_translation_domain(domain: StringName) -> void
func to_string() -> String
func tr(message: StringName, context: StringName = &"") -> String
func tr_n(message: StringName, plural_message: StringName, n: int, context: StringName = &"") -> String

Signals

signal changed()

Emitted when the TileSet of this TileMap changes.

Inherited from CanvasItem (4)
signal draw()
signal hidden()
Inherited from Node (11)
signal child_entered_tree(node: Node)
signal child_exiting_tree(node: Node)
signal ready()
signal renamed()
signal replacing_by(node: Node)
signal tree_entered()
signal tree_exited()
signal tree_exiting()
Inherited from Object (2)

Enums & Constants

enum VisibilityMode
VISIBILITY_MODE_DEFAULT = 0

Use the debug settings to determine visibility.

VISIBILITY_MODE_FORCE_HIDE = 2

Always hide.

VISIBILITY_MODE_FORCE_SHOW = 1

Always show.