Skip to content

Class

GridPlacementHost

Generated GDScript class reference for GridPlacement.GridPlacementHost.

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.

Runs Grid Placement: handles input, switches modes, and does the placing, moving, and demolishing. Add one to your scene and assign grid_placement_bundle. Each player has a PlacementSession; for split-screen, register one session per player with the same host.

Source: addons/grid_placement/systems/host/grid_placement_host.gd

Syntax

class GridPlacementHost extends Node

Members

NameKindSummary
grid_placement_bundlePropertyGrid Placement configuration for the whole game.
sessionPropertyOptional session this host configures itself from at _ready(). Assign it to skip the controller-side bootstrap; leave it empty when a controller owns session lifetime (split-screen, save/load, runtime-created sessions).
auto_configurePropertyWhen true, _ready() composes the services from session and binds the scene's consumers. Off by default: a controller that configures the host itself must not compose services twice.
auto_create_3d_feedbackPropertyWhen true (default), the host creates the 3D placement feedback nodes (indicator manager, target highlight, indicator layer) itself in 3D mode. Set false to instance them manually for custom wiring.
auto_create_2d_feedbackPropertyWhen true (default), the host creates the 2D placement feedback node (indicator manager) itself in 2D mode. Set false to instance it manually.
object_placement_settings_3dPropertySettings for the 3D object service that auto_configure builds. Null falls back to the defaults. A service bound by the scene wins over it.
HostLifecycleEmitterFieldLifecycle-result emission, attempt-id minting, and telemetry recording (see host_lifecycle_emitter.gd). Extracted to keep this hotspot under its line ceiling; owns the bus, the allocator, and the diagnostic recorder, so the public methods below stay thin delegates.
get_lifecycle_busMethod
get_diagnostic_recordsMethod
record_preview_diagnosticMethod
record_decision_diagnosticMethod
get_latest_diagnostics_jsonMethod
clear_diagnosticsMethod
refresh_diagnostic_detailMethod
DEFAULT_MAX_BRUSH_CELLSField
find_host_fromMethod
register_sessionMethod
unregister_sessionMethod
get_session_for_controllerMethod
bind_scene_consumersMethod
watch_scene_consumersMethod
HostSceneConsumerBinderFieldScene-consumer binding collaborator (bind/watch bookkeeping + typed dispatch).
HostSessionRetireFieldSession retirement collaborator (cancel live gestures, layer stash, programmatic exit), extracted to keep this hotspot under its line ceiling. Owns state + behavior + lifecycle; the two public API methods below stay thin delegates.
get_active_sessionsMethod
get_session_registry_countMethod
configureMethod
collect_startup_diagnosticsMethod
report_startup_diagnosticsMethod
get_smooth_coordinatorMethod
HostBrushShapePolicyFieldBrush shape rules: which shape a session may use, and how scene_entry and terrain selection move it (see host_brush_shape_policy.gd).
HostSurfacePreview2DField2D surface-preview collaborator (shared stacking-socket ledger + the per-frame seat), extracted to keep this hotspot under its line ceiling.
get_surface_registry_2dMethod
is_readyMethod
get_runtime_issuesMethod
get_sessionMethod
get_settingsMethod
get_actionsMethod
get_templatesMethod
get_runtime_checksMethod
get_input_handlerMethod
get_last_dispatch_resultMethod
record_ui_consumed_gestureMethod
record_external_dispatch_resultMethod
dispatch_smooth_placementMethod
get_smooth_occupancy_registry_2dMethod
get_smooth_occupancy_registry_3dMethod
get_placement_world_registry_3dMethod
get_placement_world_registryMethod
get_lifecycle_allocatorMethod
get_placement_world_idMethod
get_placement_session_idMethod
snapshot_lifecycleMethod
restore_lifecycleMethod
set_object_placement_service_3dMethod
get_object_placement_service_3dMethod
get_indicator_manager_3dMethod
get_target_highlight_3dMethod
get_indicator_layer_3dMethod
get_indicator_manager_2dMethod
get_object_placement_service_3d_for_sessionMethod
get_smooth_placement_service_3dMethod
get_smooth_placement_service_2dMethod
get_place_machineMethod
cancel_all_dragsMethod
enter_terrain_modeMethod
sync_brush_shape_to_terrainMethod
targetingProperty
owns_sessionMethod
select_entry_for_sessionMethod
machineProperty
object_serviceProperty
deselect_entry_for_sessionMethod
deselect_entryMethod
exit_placement_for_sessionMethod
select_terrain_for_sessionMethod
enter_place_router_for_sessionMethod
set_brush_shape_for_sessionMethod
get_brush_shape_for_sessionMethod
get_brush_state_for_sessionMethod
is_painting_terrain_for_sessionMethod
get_terrain_service_for_sessionMethod
get_terrain_preview_cells_for_sessionMethod
positionerProperty
stateProperty
current_cellProperty
max_cellsProperty
tile_shapeProperty
estimateProperty
set_brush_shapeMethod
get_terrain_serviceMethod
get_manipulation_serviceMethod
get_grid_targeting_serviceMethod
get_brush_coordinatorMethod
get_refund_serviceMethod
get_drag_serviceMethod
get_object_placement_serviceMethod
HostTerrainPaint3DField3D terrain paint stroke: held-drag painting and the 3D terrain intent dispatch. See host_terrain_paint_3d.gd for the stroke state they share.
HostTerrainDispatchFieldTerrain intent routing (2D brush, single-cell place and demolish). The 3D drag intents reach _terrain_paint_3d. See host_terrain_dispatch.gd.
statesProperty
modeProperty
HostIntentRouterFieldIntent-to-handler routing (see host_intent_router.gd). Extracted to keep this hotspot under its line ceiling; the host stays the input facade and wires one closure per intent, so the router owns the mapping and nothing else. Exactly one _unhandled_input entry point stays here.
HostEyedropperDispatchFieldEyedropper collaborator. Created on first use so the host stays the single input facade and the pipette costs nothing until it is pressed.
HostObjectShapeCommitFieldCommits an object LINE/rectangle drag (see host_object_shape_commit.gd).
HostObjectSpanCommit3DField3D object span commit (LINE / RECTANGLE drag released on the GRID). See host_object_span_commit_3d.gd.
is_3dProperty
issueProperty
reportProperty
reportProperty
sessionProperty
reportProperty
active_sessionProperty
attempt_idProperty
allocatorProperty
lifecycleProperty
get_positioner_cellMethod
get_positioner_cell_3dMethod
get_terrain_target_cell_3dMethod
HostObjectPlacementDispatchFieldObject-placement dispatch (see host_object_placement_dispatch.gd): preconditions, coordinate-mode routing, and the attempt-id lifetime around the build. Extracted to keep this hotspot under its line ceiling. The collaborator holds no session state and reaches no host private: every dependency below is passed in as a closure.
resultProperty
rebuild_smooth_occupancy_from_sceneMethod
is_lenient_ground_moveMethod
move_carry_ground_heightMethod
begin_move_ground_carryMethod
move_drop_preview_validMethod
HostMoveCarryPolicyField3D move ground-carry policy (leniency, carry height, drop preview, grounding).
HostDispatchFailureAnnouncerField
HostManipulationDispatchField
wants_off_modeMethod