Chris' Tutorials
Docs/Grid Placement

Class

PlacementState

Generated GDScript class reference for GridPlacement.PlacementState.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

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

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Source: addons/grid_placement/systems/building/placement_state.gd

Syntax

class PlacementState extends RefCounted

Members

NameKindSummary
action_performedEventManages communication between the placement system and connected objects during gameplay. Emits signals for placement actions, previews, and state changes to coordinate placement. Validates readiness when the tile map is set, requiring all properties to be assigned in the same frame. Emitted when a placement action is performed (success or failure). Consolidated signal replacing [signal success] and [signal failed] for new consumers. Compat shim: [signal success] and [signal failed] are still emitted for 5.1.0.
successEventEmitted when an object is successfully placed into the game world. @deprecated Prefer [signal action_performed] for new connections.
failedEventEmitted when a placement action fails. @deprecated Prefer [signal action_performed] for new connections.
preview_changedEventEmitted when the build preview instance changes.
placed_parent_changedEventEmitted when the parent node for placed objects changes.
system_changedEventEmitted when the connected placement system changes (currently unused).
pre_instance_addedEventEmitted after the scene is instantiated but before it is added to the scene tree. Allows external code to configure the instance (set properties, attach scripts, etc.) before _ready() runs.
pre_terrain_paintEventEmitted before a terrain tile is painted. Listeners can inspect the paint data or call veto().
post_terrain_paintEventEmitted after a terrain tile is painted successfully.
post_terrain_removedEventEmitted after a terrain tile is erased. Listeners (like refunders) can inspect the paint data which carries the terrain name that was removed.
pre_terrain_demolishEventEmitted before terrain is demolished (5.1.0-P). Listeners can inspect the [TerrainDemolishData] or call [method TerrainDemolishData.veto] to cancel. This is the terrain analogue of [signal ManipulationState.pre_demolish].
post_terrain_demolishEventEmitted after terrain is demolished successfully (5.1.0-P).
placed_parentPropertyThe parent node where objects are placed during build mode.
previewPropertyThe current preview object in build mode, moving with the mouse until placed.
set_manipulation_stateMethod
costProperty
get_ownerMethod
get_editor_issuesMethod
get_runtime_issuesMethod
issuesProperty

Source

addons/grid_placement/systems/building/placement_state.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs