Skip to content

Class

AdjacencyRequiredRule

Generated GDScript class reference for GridPlacement.AdjacencyRequiredRule.

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.

Terrain rule: a painted tile must be next to a tile of a matching terrain.

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

Syntax

class AdjacencyRequiredRule extends TilePaintRule

Members

NameKindSummary
match_terrain_namePropertyTerrain the neighbors must have. Leave empty to match the terrain being painted.
require_horizontalPropertyWhen on, a matching neighbor must be to the left or right.
require_verticalPropertyWhen on, a matching neighbor must be above or below.
min_neighborsPropertyFewest matching neighbors needed. With require_horizontal or require_vertical on, only neighbors in that direction count. With both on, the tile needs a match in both directions, forming a corner.
include_diagonalPropertyWhen on, diagonal neighbors also count.
error_messagePropertyMessage shown when the rule fails.
validate_cellMethod