Skip to content

Class

WithinTilemapBoundsRule

Generated GDScript class reference for GridPlacement.WithinTilemapBoundsRule.

Status
Current
Version
v6.0
Source updated
Active v6.0 guide line from Grid Placement repo
Generated on
2026-09-01

A rule that validates placement is within the boundaries of a tilemap. This rule works by checking if a tile exists at a proposed placement position on the target TileMapLayer. It ensures that a player or system cannot place objects in empty, unmapped areas of the scene. Behavior:

  • The rule passes if every indicator is positioned over a cell that has an assigned TileData object on the target map.
  • The rule fails if any indicator is over a cell that returns null for TileData, indicating that the cell is outside of the mapped region. Usage:
  • Attach this rule to a PlacementSession for context wide injection OR a ScenePlacementEntry for placeable specific rule evaluation
  • The GridTargetingState must provide a valid TileMapLayer for the rule to check against.

Source: addons/grid_placement/placement/placement_rules/template_rules/within_tilemap_bounds_rule.gd

Syntax

class WithinTilemapBoundsRule extends TileCheckRule

Members

NameKindSummary
success_messagePropertySuccess message for valid placement.
failed_messagePropertyFailure message for out-of-bounds placement.
no_indicators_messageProperty
enable_debug_diagnosticsPropertyOptional: enable extra per-indicator diagnostics during tile lookups (very verbose)
NON_CRITICAL_ISSUE_KEYWORDSFieldIssue keywords considered non-critical for bounds checking (cosmetic/setup)
setupMethod
tear_downMethod
validate_placementMethod
get_failing_indicatorsMethod