Skip to content

Class

PlacementRuntime

Generated GDScript class reference for GridPlacement.PlacementRuntime.

Status
Current
Version
v6.2.1
Source updated
2026-09-24
Generated on
2026-10-22

Headless programmatic entry point for placement lifecycle commands. A backend (e.g. an external game's simulation host) calls execute() with a PlacementCommand and receives a HostDispatchResult whose inner PlacementReport carries one canonical, terminalized PlacementLifecycleResult. This path does NOT require an active UI session, a positioner node, or any preview — it drives the host-owned services directly so backend placement is deterministic and testable. The runtime resolves the session from the command or from the host's active/default session, then dispatches strictly on that session's PlacementSession.placement_coordinate_mode and dimension. Correlation context is passed through opaquely. Commit targets per mode: lane target command pose (radians) supported GRID increments 2D SMOOTH Vector2 rotation about +Z any finite value 2D GRID Vector2i rotation about +Z multiples of the session's ManipulationSettings. rotate_increment_degrees 3D SMOOTH Vector3 yaw about +Y any finite value 3D GRID Vector3i yaw about +Y multiples of 90 degrees PlacementCommand.rotation is AUTHORITATIVE: it alone determines validation, the committed rotation, the rectangular footprint geometry, and the lifecycle geometry on every lane. The live UI preview pose is never inherited by a command. A non-finite angle, or a GRID angle the lane cannot represent, is rejected with PlacementLifecycleResult.REASON_INVALID_DEFINITION and a discriminating pose_error diagnostic BEFORE any occupancy, transform, or lifecycle state is touched. 2D GRID Vector2i cell; runs the session's GRID rule pipeline, which seats on the session's GridPositioner2D and target map (scene required, no input or UI) 3D GRID Vector3i cell; positioner-free (ObjectPlacementService3D) A target of the wrong type, or a mode whose service is not configured, fails closed with a typed rejection; a command is never re-routed to the other coordinate mode.

Source: addons/grid_placement/placement/placement_runtime.gd

Syntax

class PlacementRuntime extends RefCounted

Members

NameKindSummary
executeMethod
reportProperty
lifecycleProperty