RuleResult
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.
Declaration
Summary
Results from placement rule validation.
RuleResult encapsulates the outcome of evaluating a placement rule, storing validation issues, success state, and contextual information for debugging and logging. The class supports both incremental construction (for building issues during validation) and complete construction (for finished results). Success is determined by the absence of validation issues.
Ported from: godot/addons/grid_building/systems/placement/validators/placement_rules/rule_result.gd
Metadata
Namespace: GridPlacement.Core.Validation
Source File: cs/Core/Validation/RuleResult.cs
Assembly: GridPlacement.Core
Type: class
Constructors
RuleResult
Creates a basic rule result for incremental building during validation. Use this when you need to build up issues gradually during rule evaluation.
Parameters
| Name | Description |
|---|---|
rule | The placement rule being tested. Cannot be null. |
Properties
Rule
The rule that was tested.
IssueCount
Returns the count of issues.
Methods
Build
Factory for creating a finished rule result. Creates an immutable result with all validation data complete.
Parameters
| Name | Description |
|---|---|
rule | The rule that was tested |
issues | Issues found during validation |
AddIssue
Adds a single validation issue to the result.
Parameters
| Name | Description |
|---|---|
issue | A descriptive validation issue. Should not be empty. |
AddIssues
Adds multiple validation issues to the result.
Parameters
| Name | Description |
|---|---|
issues | Array of descriptive validation issues. |
IsSuccessful
Returns whether the rule validation was successful. A rule is considered successful if no validation issues were found.
IsEmpty
Backward compatibility shim expected by legacy validation code which called is_empty on RuleResult.
GetIssues
Returns a copy of all issues.