Marks one tile under the placement preview as valid or invalid. Indicators are created from the scene in PlacementTemplates.rule_check_indicator, one per covered tile. Set the shape cast's ShapeCast2D.target_position to Vector2(0, 0) so the indicator lines up with its tile. Isometric games: use a ConvexPolygonShape2D with diamond points, not a skewed RectangleShape2D. A skewed rectangle distorts when the preview is rotated; a polygon rotates cleanly.
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 | Signal | Emitted when valid changes. |
LogLevel | Field | |
validity_sprite | Property | Sprite that shows the valid or invalid look. |
show_indicators | Property | Whether the indicator is visible. |
valid_settings | Property | Look of the indicator when the tile is valid. A default is used when empty, but you should assign one. |
invalid_settings | Property | Look of the indicator when the tile is invalid. A default is used when empty, but you should assign one. |
rules | Property | Rules checked for this tile; all must pass. Set automatically during placement. Exported only for inspecting in the editor. |
current_display_settings | Property | |
valid | Property | Whether the tile passed every rule in the last check. |
resolve_placement_dependencies | Method | |
get_rules | Method | |
add_rule | Method | |
get_tile_position | Method | |
clear | Method | |
validate_rules | Method | |
validate_runtime | Method | |
trace_runtime_if_enabled | Method | |
get_runtime_issues | Method | |
get_editor_issues | Method | |
update_validity_state | Method | |
force_validity_evaluation | Method | |
force_validity_evaluation_with_sync | Method |