Headless programmatic entry point for placement lifecycle commands. A backend (e.g. an external game's simulation host) calls [method 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 [member PlacementSession.placement_coordinate_mode] and dimension. Correlation context is passed through opaquely. Commit targets per mode: [codeblock] 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 [/codeblock] [member 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 [constant PlacementLifecycleResult.REASON_INVALID_DEFINITION] and a discriminating [code]pose_error[/code] diagnostic BEFORE any occupancy, transform, or lifecycle state is touched. [codeblock] 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) [/codeblock] 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 RefCountedMembers
| Name | Kind | Summary |
|---|---|---|
execute | Method | |
report | Property | |
lifecycle | Property |