Chris' Tutorials
Docs/Grid Placement

Class

AdjacentToCategoryRule

Generated GDScript class reference for GridPlacement.AdjacentToCategoryRule.

StatusDraft
Versionv6.0
UpdatedDevelopment docs generated from GDScript source

This is unreleased documentation in active development. APIs, class names, and behavior may change before the final release.

Draft — Unreleased:This page is in active development. APIs, class names, and behavior may change before the release is finalized. Use it as a preview of what's coming — not as a stable integration target.

Rule that requires an object placement to have at least one adjacent cell containing a placed object whose [ScenePlacementEntry.profiles] include the [member required_profile]. Uses [AdjacencyEvaluator] for shared adjacency logic (converged with [AdjacencyRequiredRule] in the terrain domain). Object-domain adjacency checks the scene tree for [PlaceableInstance] components via physics point queries at neighbor cells. Example: a fence placeable tagged "fence" requires at least one adjacent cell occupied by another "fence"-tagged object.

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

Syntax

class AdjacentToCategoryRule extends TileCheckRule

Members

NameKindSummary
required_profilePropertyThe category tag that must be matched by at least one neighboring cell.
min_neighborsPropertyMinimum number of matching neighbor cells required.
include_diagonalPropertyWhether to include diagonal neighbors in the search.
error_messagePropertyDescriptive error message shown when validation fails.
get_supported_actionsMethod
validate_placementMethod
resultProperty
target_mapProperty
dirsProperty
footprint_cellsProperty
total_matchesProperty
checked_cellsProperty
neighborProperty
global_posProperty
world_2dProperty
space_stateProperty
queryProperty
resultsProperty
colliderProperty
placeable_instanceProperty
ppath_valueProperty
ppathProperty
placeableProperty

Source

addons/grid_placement/placement/placement_rules/template_rules/adjacent_to_category_rule.gd

Plugin docs root:gdscript/plugins/grid_placement_dev/docs