Skip to content

Class

TerrainPalette

Generated GDScript class reference for GridPlacement.TerrainPalette.

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

Filters which terrains from a TileSet are exposed for painting. A lean whitelist: holds TilePlacementEntry resources that combine terrain names and optional icon into a single data structure. The TileSet remains the single source of truth for terrain IDs, colors, peering, and existence. Names are resolved against a TileMapLayer's TileSet at paint-time. Usage: var palette := TerrainPalette.new() palette.display_name = "Dungeon Pack" palette.entries = [ TilePlacementEntry.new(terrain_name="dungeon_floor", icon=preload("res://art/icon.png")), TilePlacementEntry.new(terrain_name="stone_wall") ]

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

Syntax

class TerrainPalette extends Resource

Members

NameKindSummary
display_namePropertyDisplay name shown in the palette selector (e.g. "Dungeon Pack").
iconPropertyOptional icon for the palette folder in a multi-palette UI.
placement_rulesPropertyList of rules to validate for all terrains in this palette.
ignore_base_rulesPropertyIf true, base rules from PlacementSettings are ignored for this palette.
entriesPropertyTerrain entries to expose for painting. Each entry carries both a terrain name and optional icon. Each name must match [method TileSet.get_terrain_name] on the target TileSet.
get_editor_issuesMethod
get_entriesMethod