Skip to content

Class

TilePlacementEntry

Generated GDScript class reference for GridPlacement.TilePlacementEntry.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

Placement entry for terrain/tile painting into a [TileMapLayer]. Associates a terrain name with optional placement rules and UI metadata. This is the canonical name replacing the internal-only [code]TilePlacementEntry[/code] (which was never released — no consumer migration needed). Usage: var entry := TilePlacementEntry.new() entry.terrain_name = "dungeon_floor" entry.icon = preload("res://art/icon.png")

Source: addons/grid_placement/placement/terrain/terrain_entry.gd

Syntax

class TilePlacementEntry extends PlacementEntry

Members

NameKindSummary
terrain_namePropertyInherits [member PlacementEntry.placement_rules] typed as [Array][PlacementRule]. [TilePaintRule]s stored here are valid [PlacementRule]s; use [code]rule is TilePaintRule[/code] or [code]rule as TilePaintRule[/code] to access tile-specific methods. The terrain name that must match [method TileSet.get_terrain_name]. This is the single source of truth for terrain identification.
target_layer_namePropertyOptional TileMapLayer node name this terrain paints onto (e.g. &"Fences"). When set, the host routes paints/demolishes for this terrain to the layer with this name in [member GridTargetingState.maps] instead of the default [member GridTargetingState.target_map], so feature terrains like fences or walls never destroy the ground beneath them. Empty = paint on the default target map (back-compat for ground terrains).
demolishablePropertyEnables DEMOLISH mode to erase this terrain entirely. Keep false for normal ground terrains like grass/snow; set true for removable terrain features such as fence tiles.
build_costPropertyOptional BuildCost refunded on terrain demolish.
get_display_nameMethod
is_validMethod
get_color_from_tilesetMethod