Skip to content

Class

PlacementTelemetry

Generated GDScript class reference for GridPlacement.PlacementTelemetry.

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.

Read-only telemetry surface for placement/manipulation state. Centralizes "how do I read placement state for a test assertion?" into one place so tests and diagnostics do not reach into private fields or re-derive map math. Each reader returns an immutable snapshot struct; tests assert against the snapshot fields. The readers are null-safe: pass whatever you have (session and/or host) and the snapshot fields default to "empty" values when the underlying state is missing — so a test can distinguish "no manipulation active" from "rotation is zero" by checking ManipulationSnapshot.is_active. Usage: var snap := PlacementTelemetry.read_manipulation(session) assert_int(snap.cardinal).is_equal(PlacementGridRotationUtils.CardinalDirection.EAST) var action := PlacementTelemetry.read_placement_action(session) assert_bool(action.last_report_success).is_true() Regressions in placement state used to slip through because tests could not easily observe it. This class closes that gap.

Source: addons/grid_placement/telemetry/placement_telemetry.gd

Syntax

class PlacementTelemetry extends RefCounted

Members

NameKindSummary
DETAIL_NAMESFieldDetail controls evidence production independently from PlacementLogger severity. SUMMARY is the default useful terminal signal; TRACE remains opt-in.
levelProperty
allowsMethod
set_from_debug_settingsMethod
set_levelMethod
MAX_RECORDSField
policyProperty
recordMethod
record_previewMethod
record_decisionMethod
normalizedProperty
signatureProperty
recordedProperty
record_dispatchMethod
preview_countMethod
dropped_countMethod
evicted_countMethod
statsMethod
recordsMethod
latestMethod
latest_jsonMethod
clearMethod
snapshot_previewMethod
evidenceProperty
snapshotProperty
snapshot_decisionMethod
snapshotProperty
snapshot_dispatchMethod
is_activePropertySnapshot of the active manipulation transform (rotation, flip, target). Read via read_manipulation(). True when a ManipulationParent is wired and a target is under manipulation.
rotation_degreesPropertyLogical rotation in degrees (sprite-swap aware). 0.0 when inactive.
cardinalPropertyNearest cardinal facing derived from rotation_degrees.
flipped_horizontallyPropertyHorizontal mirror state (negative scale.x).
flipped_verticallyPropertyVertical mirror state (negative scale.y).
active_targetPropertyThe root node being manipulated, or null.
to_dictionaryMethod
modePropertySnapshot of placement/build state for the current selection + last action. Read via read_placement_action(). Current placement mode (OFF/INFO/MOVE/DEMOLISH/PLACE).
has_entryPropertyTrue when a scene_entry is selected for building.
selected_entry_idPropertyThe selected scene_entry's id, or an empty StringName.
has_terrainPropertyTrue when a terrain is selected for painting.
selected_terrain_namePropertyThe selected terrain's name, or an empty StringName.
has_previewPropertyTrue when a placement preview instance currently exists.
last_dispatchPropertyThe last host dispatch result, or null when no action has dispatched. This is the canonical "what just happened" surface — same object the host tests assert against via GridPlacementHost.get_last_dispatch_result().
last_action_successPropertyConvenience: True when last_dispatch exists and reports success.
last_action_issuesPropertyConvenience: issues from last_dispatch, empty when no dispatch.
to_dictionaryMethod
modePropertySnapshot of targeting/positioner state (current cell, map, manual targeting). Read via read_targeting(). Current placement mode.
positioner_cellPropertyThe 2D cell under the positioner, or Vector2i.ZERO when unresolved.
positioner_cell_3dPropertyThe 3D cell under the positioner, or Vector3i.ZERO when unresolved.
has_target_mapPropertyTrue when a 2D target map is wired.
target_map_namePropertyName of the layer the next terrain paint lands on. Routing is sticky (TerrainLayerRouting falls back to the current map), so "painted somewhere else" is the common surprise: the name here is the answer, without a scan of every TileMapLayer in the scene.
has_target_map_3dPropertyTrue when a 3D target map is wired. Lets tests distinguish "3D unwired" from "wired but resolving ZERO" without touching state.
has_positioner_3dPropertyTrue when the session has a live 3D positioner.
pick_evidence_3d_requestedPropertyTrue when this call requested detailed 3D pick evidence.
has_pick_evidence_3dPropertyTrue when a requested cached 3D pick snapshot was captured.
pick_evidence_3dPropertyCached 3D pick evidence from GridPositioner3D; no second ray is cast.
target_3dPropertyThe 3D node the targeting state points at, or null.
has_live_pick_ray_3dPropertyTrue after the 3D positioner publishes an actual mouse ray.
last_click_missed_3dPropertyTrue when the latest 3D click explicitly missed the grid.
is_manual_targetingPropertyTrue while a build preview / move copy is driving manual targeting.
targetPropertyThe node the targeting state points at right now (hover target, preview, or move copy). Read it here instead of reaching into the session's state.
cast_providedPropertyTrue when a shape cast was passed to read_targeting(); without one the hover fields below stay at their defaults and cannot be read as "nothing seen".
cast_enabledPropertyTrue while the hover cast itself is enabled.
cast_has_shapePropertyTrue when the passed cast carries a shape to query with. A shapeless cast reports zero collisions forever, which reads exactly like empty ground unless it is named.
cast_cache_populatedPropertyTrue when the hover cast's own collision cache holds a read. False means the hover fields came from a live query of a cast that has not run its physics update yet: off the physics thread that cast resolves nothing, so "sees nothing" is not the same claim.
cast_positionPropertyWhere the hover cast actually is — the positioner drives it every physics frame, so a position assigned by a caller does not stick.
hover_collision_countPropertyHow many colliders the hover cast's last update reported.
hover_colliderPropertyThe first collider the hover cast reported, or null.
brush_shapePropertyBrush shape the next paint or drag will use, as the host reports it. -1 when no host was passed, so "unread" never looks like SINGLE.
hover_blockerMethod
to_dictionaryMethod
read_manipulationMethod
read_placement_actionMethod
read_targetingMethod
snapProperty
targetingProperty
positioner_3dProperty
cached_castProperty
cached_collidersProperty