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 | |
result | Property | |
target_map | Property | |
dirs | Property | |
footprint_cells | Property | |
total_matches | Property | |
checked_cells | Property | |
neighbor | Property | |
global_pos | Property | |
world_2d | Property | |
space_state | Property | |
query | Property | |
results | Property | |
collider | Property | |
placeable_instance | Property | |
ppath_value | Property | |
ppath | Property | |
placeable | Property |
Source
addons/grid_placement/placement/placement_rules/template_rules/adjacent_to_category_rule.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs