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 TileCheckRuleMembers
| Name | Kind | Summary |
|---|---|---|
required_profile | Property | The category tag that must be matched by at least one neighboring cell. |
min_neighbors | Property | Minimum number of matching neighbor cells required. |
include_diagonal | Property | Whether to include diagonal neighbors in the search. |
error_message | Property | Descriptive error message shown when validation fails. |
get_supported_actions | Method | |
validate_placement | Method |