Tile indicator showing placement validity based on rules and collisions. Displays visual feedback for tile validity during building preview by running all assigned TileCheckRules and updating its visuals accordingly. Used by IndicatorManager and PlacementValidator as part of the validation pipeline. [br][br] Usage: It is recommended to set the TargetPosition to Vector2(0,0) so that the indicator's position aligns with the tile being evaluated. [br][br] [b]IMPORTANT FOR ISOMETRIC GAMES:[/b] This ShapeCast2D should use [ConvexPolygonShape2D] with explicit diamond points, NOT [RectangleShape2D] with skew transformation. When the parent [ManipulationParent] rotates (e.g., 90° during manipulation), skewed rectangles create visual distortion due to compound transforms (skew + rotation). Polygon shapes rotate uniformly without perspective changes. [br][br] For detailed explanation and examples, see: [code]docs/v5-0-0/guides/isometric_implementation.mdx[/code][br][br] See [code]project-architecture.md[/code] for system architecture and building flow documentation.
Source: addons/grid_placement/placement/rule_check_indicator/rule_check_indicator_2d.gd
Syntax
class RuleCheckIndicator2D extends res://addons/grid_placement/base/placement_cached_shape_cast_2d.gdMembers
| Name | Kind | Summary |
|---|---|---|
valid_changed | Event | Emitted when validity status changes. |
LogLevel | Field | |
validity_sprite | Property | Sprite showing tile validity status. |
show_indicators | Property | Whether to show the indicator visual sprites for players or not. |
valid_settings | Property | Default display settings for when the rule check indicator is marked valid. [br] If unset, will default at runtime. However you should define a valid IndicatorVisualSettings for production games |
invalid_settings | Property | Default display settings for when the rule check indicator is marked invalid. [br] If unset, will default at runtime. However you should define a valid IndicatorVisualSettings for production games |
rules | Property | The rules to validate for whether this tile is valid for placement or not All rules must validate true to be valid. Otherwise, failed status will be shown For production, you do not set them in the template. You load them through the PlacementContainer. The @export option is only provided here for debug testing purposes in editor. |
current_display_settings | Property | |
valid | Property | Whether the rules were validated for the area under the rule check indicator in the last test |
shape_size | Property | |
resolve_placement_dependencies | Method | |
get_rules | Method | |
add_rule | Method | |
get_tile_position | Method | |
map_local_pos | Property | |
map_tile | Property | |
clear | Method | |
validate_rules | Method | |
failing_checker | Property | |
settings | Property | |
settings | Property | |
texture_name | Property | |
is_valid | Property | |
selected_rule | Property | |
selected_priority | Property | |
shape_bounds | Property | |
tile_size | Property | |
collision_min_radius | Property | |
collision_scale | Property | |
connection_min_width | Property | |
connection_scale | Property | |
collision_point_radius | Property | |
connection_line_width | Property | |
contact | Property | |
local_contact_point | Property | |
connection_color | Property | |
collision_color | Property | |
outline_color | Property | |
marker_radius | Property | |
text_offset | Property | |
get_debug_info | Method | |
validate_runtime | Method | |
issues | Property | |
issues | Property | |
trace_runtime_if_enabled | Method | |
get_runtime_issues | Method | |
issues | Property | |
get_editor_issues | Method | |
issues | Property | |
settings | Property | |
update_validity_state | Method | |
force_validity_evaluation | Method | |
force_validity_evaluation_with_sync | Method | |
frame_signal | Property | |
settings | Property | |
val | Property | |
settings | Property | |
val | Property |
Source
addons/grid_placement/placement/rule_check_indicator/rule_check_indicator_2d.gd
Plugin docs root:gdscript/plugins/grid_placement_dev/docs