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 RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
action_performed | Event | Manages 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. |
success | Event | Emitted when an object is successfully placed into the game world. @deprecated Prefer [signal action_performed] for new connections. |
failed | Event | Emitted when a placement action fails. @deprecated Prefer [signal action_performed] for new connections. |
preview_changed | Event | Emitted when the build preview instance changes. |
placed_parent_changed | Event | Emitted when the parent node for placed objects changes. |
system_changed | Event | Emitted when the connected placement system changes (currently unused). |
pre_instance_added | Event | Emitted 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_paint | Event | Emitted before a terrain tile is painted. Listeners can inspect the paint data or call veto(). |
post_terrain_paint | Event | Emitted after a terrain tile is painted successfully. |
post_terrain_removed | Event | Emitted after a terrain tile is erased. Listeners (like refunders) can inspect the paint data which carries the terrain name that was removed. |
pre_terrain_demolish | Event | Emitted 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_demolish | Event | Emitted after terrain is demolished successfully (5.1.0-P). |
placed_parent | Property | The parent node where objects are placed during build mode. |
preview | Property | The current preview object in build mode, moving with the mouse until placed. |
set_manipulation_state | Method | |
cost | Property | |
get_owner | Method | |
get_editor_issues | Method | |
get_runtime_issues | Method | |
issues | Property |
Source
addons/grid_placement/systems/building/placement_state.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs