Skip to content
ct

Class

TerrainPreview

Generated GDScript class reference for GridPlacement.TerrainPreview.

Status
Draft
Version
v6.0
Updated
Development docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Ghost preview for terrain painting: shows the selected terrain's tile at the hovered cell while the placement system is in TERRAIN mode. Implemented as a one-cell TileMapLayer that mirrors the target map's TileSet and global transform, so square and isometric layouts render identically to the real paint result. The ghost look comes from [member preview_self_modulate] (default: subtle ghost blue). Add one inside the PlacementInjectorSystem's injection scope (e.g. under World). It tracks the positioner each frame while visible and repaints only when the hovered cell or selected terrain changes.

Source: addons/grid_placement/systems/building/terrain/terrain_preview.gd

Syntax

class TerrainPreview extends PlacementNode2D

Members

NameKindSummary
preview_self_modulatePropertyGhost tint applied to the preview layer (self_modulate so child nodes, if any are ever added, keep their own colors).
resolve_placement_dependenciesMethod
settingsProperty
mode_stateProperty
resolve_placement_runtimeMethod
refresh_nowMethod
request_refreshMethod
activeProperty
target_mapProperty
positionerProperty
terrain_nameProperty
preview_cellsProperty
cell_countProperty
last_cellProperty
brush_stateProperty
brush_shapeProperty
drag_startProperty
drag_activeProperty
pending_activeProperty
valid_cellsProperty
invalid_cellsProperty
entryProperty
paletteProperty
issue_mapProperty
target_modulateProperty
invalid_modulateProperty
valid_cellsProperty
invalid_cellsProperty
entryProperty
paletteProperty
issuesProperty
resolvedProperty
preview_tilesetProperty