Skip to content

Class

PlacementExplain

Generated GDScript class reference for GridPlacement.PlacementExplain.

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.

Explains one placement outcome in one place. Every surface that answers "why did this fail" renders from this function: the player action log, the console trace, and the headless trace CLI. One function means those surfaces cannot drift apart. The explanation is derived from the canonical PlacementLifecycleResult and the PlacementReport that carries it. It never changes placement state. Usage: var why := PlacementExplain.explain(host.get_last_dispatch_result()) print(why["human"]) # "Rejected: rule_validation (2 issues)" print(why["failed_rules"]) # [{rule_id = "collisions_check", issues = [...]}]

Source: addons/grid_placement/utils/placement_explain.gd

Syntax

class PlacementExplain extends RefCounted

Members

NameKindSummary
REASON_GUIDEFieldPer-reason guidance. `next_step` says what to do, `where_to_look` names the files that own the behaviour, so an agent can act on the answer without grepping the tree.
NO_DISPATCH_GUIDEFieldGuidance for host sentinels that do not represent a terminal lifecycle result. These reasons must never be reported as caller cancellations.
explainMethod
explain_lifecycleMethod
placer_evidenceMethod
stamp_occupancy_conflictMethod
instance_idProperty
rootProperty