Skip to content

Class

TerrainPreview

Generated GDScript class reference for GridPlacement.TerrainPreview.

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

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
resolve_placement_runtimeMethod
refresh_nowMethod
request_refreshMethod