Use this guide when the plugin is installed but you want to verify that the project, host, session, level, and rules are wired correctly.
Version note: This guide is for Grid Placement 6.0.0.
1. Project-Level Checks
After enabling the plugin:
- Go to Project → Project Settings → Plugins and enable Grid Placement.
- Run Project → Tools → Grid Placement / Setup Default Input Actions.
- Check the Output panel for confirmation.
- Restart or reload the project.
- Open Project Settings → Input Map and confirm the placement actions exist.
If input does nothing, check this section before debugging placement code.
2. Host Runtime Checks
GridPlacementHost is the main runtime coordinator. After your level context and owner have entered the scene, check:
@onready var host: GridPlacementHost = $GridPlacementHost
func _ready() -> void:
if not host.is_ready():
push_warning("GridPlacementHost is not ready")
for issue in host.get_runtime_issues():
push_warning(issue)
host.get_runtime_issues() returns human-readable setup problems, such as missing session state, missing service group, or missing target map.
Common blocking issues:
- No
PlacementSessionconfigured or registered. PlacementLevelContext.target_mapis not assigned.PlacementLevelContext.objects_parentis not assigned.PlacementOwner.owner_rootis not assigned.GridPositioner2Ddid not register into the active targeting state.- Required service settings are missing from the active bundle/settings.
3. Injector Validation
If you use PlacementInjectorSystem, remember that runtime validation is only meaningful after level/player nodes have been injected.
func _ready() -> void:
await get_tree().process_frame
injector.run_validation()
The injector does not invent missing nodes. It can wire existing nodes that implement resolve_placement_dependencies(...), but you still need to add and configure PlacementLevelContext, PlacementOwner, and any UI/preview nodes your scene uses.
4. Rule Validation Classes
Grid Placement has two different validation concerns:
| Concern | Main types | Meaning |
|---|---|---|
| Configuration/readiness | PlacementConfigurationValidator, get_runtime_issues() methods |
Developer setup problems. |
| Placement validity | PlacementRule, TileCheckRule, PlacementValidator, PlacementValidationPipeline |
Whether the current placement action is allowed. |
Do not mix these up:
- Missing
target_mapis a configuration/readiness issue. - Placing a building on a blocked tile is a placement-validity issue.
5. Placement Result Types
PlacementValidationResult
| Member | Type | Description |
|---|---|---|
is_successful() |
bool |
True if no issues were found. |
get_all_issues() |
Array[String] |
Flattened list of issue messages. |
cell_issues |
Dictionary |
Map of Vector2i cell to issue lists. |
ValidationResults
| Member | Type | Description |
|---|---|---|
is_successful() |
bool |
True if no blocking issues were found. |
get_errors() |
Array[String] |
Critical configuration/setup errors. |
get_issues() |
Array[String] |
Placement rule failures. |
PlacementReport
For user-facing placement attempts, the most useful type is usually PlacementReport from PlacementActionData.report.
func _on_action_performed(data: PlacementActionData) -> void:
if data == null or data.report == null:
return
if not data.report.is_successful():
for issue in data.report.get_issues():
print(issue)
Tips
- Keep configuration validation fast; it may run during startup or scene setup.
- Differentiate between invalid configuration and invalid placement.
- Show
PlacementReport.get_issues()in UI instead of re-implementing rule checks. - Use
PlacementValidationResultwhen you need cell-level granularity for multi-cell terrain or brush workflows. - Save important runtime resources as external
.tresfiles for web/export reliability. See Web Export Guide.
Related Guides
Source
docs/v6-0/guides/validation.md
Plugin docs root:gdscript/plugins/grid_placement_dev/docs