Validation System¶
The GOAP Hub includes a built-in validation system that catches configuration errors before you enter Play mode. Click the Validate button in the toolbar to run a full check.
Severity Levels¶
| Level | Meaning |
|---|---|
| Error | The brain will not work correctly. Must be fixed before Play mode. |
| Warning | The brain will work but may produce unexpected behavior. Should be investigated. |
| Info | Suggestions for best practices. Optional to address. |
The toolbar shows a count badge for each severity level after validation runs.
What Gets Validated¶
Key and Manifest Checks¶
- Unwired slots — A sensor output or strategy setting references a slot that has no corresponding key in the Key Manifest.
- Type mismatches — A slot expects a
Vector3but the wired key is aBool. - Duplicate key names — Two keys share the same display name (confusing in the Inspector).
- Unused keys — Keys defined in the brain that are not referenced by any sensor, strategy, belief, or post-process.
Sensor Checks¶
- Missing output mappings — A sensor declares outputs that aren't mapped to blackboard keys.
- Invalid configuration — Sensor settings like LayerMask, range, or tags that are empty or misconfigured.
State Checks¶
- Empty states — A behavioral state with no actions or no goals.
- No valid goals — A state where no goal has priority > 0 or passes validity conditions under normal circumstances.
- Missing strategies — An action that has no strategy assigned (appears as "Missing Script" in the Inspector).
Belief Checks¶
- Unregistered beliefs — A belief referenced in preconditions or effects that isn't registered in the state's belief list.
- Belief count — Total unique beliefs across all states approaching or exceeding the 128-belief limit (
TagMask128).
Transition Checks¶
- Broken references — A transition's source or target state no longer exists.
- Missing condition — A transition with no belief condition assigned (will never fire).
- Unreachable states — States with no incoming transitions and that are not the default state.
Temporal Key Checks¶
- Spatial memory mismatch — Keys configured for temporal memory but
Brain.UsesSpatialMemoryisfalse. - Missing validity keys — A memory stream without a corresponding ValidityKey configured.
Reading Validation Results¶
After clicking Validate, results appear in the GOAP Hub's console area. Each result shows:
- Severity icon — Error (red), Warning (yellow), or Info (blue)
- Message — A description of the issue
- Location — Which state, action, goal, or sensor is affected
- Quick Fix — Some issues offer a one-click fix button
Quick Fixes¶
Some validation results include a quick fix action. Examples:
- Enable spatial memory — Automatically sets
Brain.UsesSpatialMemory = truewhen temporal keys are detected. - Wire slot to key — Opens the Key Manifest with the unwired slot highlighted.
- Add missing belief — Registers an unregistered belief in the current state.
When to Validate¶
Tip
Make it a habit to click Validate before entering Play mode. Most runtime errors (agent stands still, plan failures, missing components) can be caught at edit time by the validation system.
Validation is especially important after:
- Adding or removing actions, goals, or beliefs
- Changing sensor output configurations
- Modifying the Key Manifest
- Restructuring states or transitions
- Importing an updated version of the framework
What's Next¶
- Runtime Debugging — Debug agents live during Play mode.
- Brain Designer — The graph views where you build your brain.
- Troubleshooting — Common runtime issues and how to fix them.