Skip to content

Class

PlacementSession

Generated GDScript class reference for GridPlacement.PlacementSession.

Status
Current
Version
v6.3.0
Source updated
2026-10-29
Generated on
2026-10-29

6.3. These pages document the 6.3 release, where placeable is now entry (what changed) and PlacementOwner is deprecated (migration). Still on 6.2? Your version's guides ship inside the plugin itself, under addons/grid_placement/guides/; the 6.2 URLs on this site now redirect to this series.

One player's placement setup: configuration, catalog, and current state. Create one per player and register it with the GridPlacementHost. For split-screen, give each player their own session on the same host. var session := PlacementSession.new() session.grid_placement_bundle = preload("res://bundle.tres") var host := GridPlacementHost.new() host.configure(session) host.bind_scene_consumers(scene_root, session) # Additional players join the same host through register_session.

Source: addons/grid_placement/resources/placement_session.gd

Syntax

class PlacementSession extends Resource

Members

NameKindSummary
grid_placement_bundlePropertyThe Grid Placement configuration this session uses.
catalogPropertyThe objects and terrains this player can place. Session-owned: the bundle carries no catalog, so an unset catalog means this session can place nothing.
settingsPropertyOverride only. Game-wide config belongs in the bundle; use these only for per-player tweaks (e.g. split-screen input). Leave null to inherit from grid_placement_bundle.settings.
actionsPropertyOverride only. Input actions for this session only, such as a second player's controls. Leave null to inherit from grid_placement_bundle.actions.
statesPropertyShared states for plugin systems.
contextsPropertyContext for resolving references to current objects.
terrain_selectedSignalEmitted when selected_terrain_name changes. The host uses it to switch to terrain painting when a terrain is picked.
entry_selectedSignalEmitted when selected_entry changes.
coordinate_mode_changedSignalEmitted when placement_coordinate_mode changes.
placement_coordinate_modePropertyCoordinate mode for placement targeting. GRID (default) snaps to cell centers; SMOOTH uses exact world positions. Session-scoped, explicit — no heuristic auto-detection. Changing this clears any active preview and resets targeting state so grid and smooth state never bleed.
selected_terrain_namePropertyRuntime terrain selection for this session (NOT serialized — transient per-player state). The terrain palette UI writes the user's pick here; GridPlacementHost reads it from the device-resolved active session when dispatching PLACE_SINGLE_TERRAIN / terrain-brush paint. Empty means no terrain is selected and terrain dispatch is a no-op. Keeping it on the session (the one object both the UI and the host already hold) is what lets split-screen sessions each carry their own selection.
selected_terrain_entryPropertyOptional catalog metadata for the selected terrain. These transient fields keep terrain rule/cost validation session-owned without requiring the compatibility building system to mirror UI state.
selected_terrain_paletteProperty
selected_entryPropertyRuntime scene_entry selection for this session (NOT serialized — transient per-player state). The scene_entry UI writes the user's pick here; GridPlacementHost reads it from the device-resolved active session when dispatching PLACE_SINGLE_OBJECT / object-drag intents. Null means no scene_entry is selected and object dispatch is a no-op. Symmetric to selected_terrain_name — this is the object-mode counterpart that fixes the terrain/object cross-leak where a smithy pick drove fence placement.
loggerPropertyReturns this session's logger. Lazily initializes the shared production logger from this session's debug settings when no logger was injected.
get_contextsMethod
get_statesMethod
get_loggerMethod
get_mode_stateMethod
get_targeting_stateMethod
get_building_stateMethod
get_manipulation_stateMethod
get_placement_rulesMethod
set_placer_rootMethod
get_placer_rootMethod
placer_requirementMethod
get_placer_requiring_ruleMethod
get_active_placer_rulesMethod
fork_for_playerMethod
bind_positioner_placer_rootMethod
get_runtime_issuesMethod
get_settingsMethod
get_actionsMethod
get_templatesMethod
get_visual_settingsMethod
get_manipulation_settingsMethod
get_debug_settingsMethod
get_runtime_checksMethod
get_indicator_contextMethod
set_statesMethod