Holds shared placement/build state and emits signals for object actions, terrain actions, preview changes, and the parent that receives placed objects.
Source: addons/grid_placement/systems/building/placement_state.gd
Syntax
class PlacementState extends RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
action_performed | Signal | Emitted when a placement action is performed (success or failure). Read success/failure from PlacementActionData.report. |
terrain_fill_pending | Signal | A flood-fill region is previewed and awaits a second confirm; no paint occurred. |
preview_changed | Signal | Emitted when the build preview instance changes. |
placed_parent_changed | Signal | Emitted when the parent node for placed objects changes. |
pre_instance_added | Signal | 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 | Signal | Emitted before a terrain tile is painted. Listeners can inspect the paint data or call veto(). |
post_terrain_paint | Signal | Emitted after a terrain tile is painted successfully. |
post_terrain_removed | Signal | 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 | Signal | Emitted before terrain is demolished (5.1.0-P). Listeners can inspect the TerrainDemolishData or call TerrainDemolishData.veto() to cancel. This is the terrain analogue of ManipulationState.pre_demolish. |
post_terrain_demolish | Signal | 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 | |
notify_terrain_demolish | Method | |
get_owner | Method | |
get_runtime_issues | Method |