public sealed class AgentDebugModelWhat the editor's agent debugger shows: one agent's state, its recent decisions, and what is visibly wrong with it.
Remarks
Doc 37 § P7's "editor panels over the same records", and the same records is the whole of it. This holds an AiAgentSnapshot and a list of AgentDebugRecords, which are the two things the runtime overlay draws — so the panel is a richer view over one implementation rather than a second one that will disagree with it in six months.
⚠ Two ways in and one way out. Refresh photographs an AiSystem in this process; Show takes a snapshot that arrived over a wire. After that the panel cannot tell, which is what makes debugging a dedicated server the same tool as debugging play mode rather than a second one written later and worse.
⚠ No Control anywhere in here. It is the model, so the interesting behaviour — which agent is selected, what the log says, whether a breakpoint is set — is asserted by tests that stand up no window, the same bargain BehaviorTreeModel makes.
Fields and properties (13)
public AiAgentSnapshot SnapshotThe agent being shown.
public AgentDebugOrigin OriginWhere that picture came from.
public IReadOnlyList<Entity> AgentsEvery agent the last Refresh found, in schedule order.
public Entity SelectedWhich one is selected.
public IReadOnlyList<AgentDebugRecord> LogWhat the selected agent has decided lately, oldest first.
public IReadOnlyList<AiFinding> FindingsWhat AiDiagnosis makes of the whole log.
public AiBreakpoints BreakpointsThe node breakpoints, shared with whatever is running the agents.
public AiDiagnosisSettings ThresholdsWhat counts as bad enough to report.
public bool HaltedWhether the selected agent is stopped at a breakpoint.
public BehaviorTreeInstance? InstanceThe selected agent's running tree, when it is running one.
public IReadOnlyList<int> ActivePathThe path from the root to the active node, root first, by execution index.
public GoapPlan? PlanThe selected agent's plan, when it is planning over a domain.
public ReadOnlySpan<int> WorldKeysThe selected agent's world keys, projected as the search would read them.
Methods (6)
public bool Refresh(AiSystem system, World world, GameTime time = default(GameTime))Re-reads a running system.
public void Show(AiAgentSnapshot snapshot)Shows a picture that arrived from somewhere else.
public IEnumerable<AiDebugRow> Section(AiDebugSection section)The rows of one section, which is what one table in the panel draws.
public IEnumerable<AiFinding> SelectedFindings()What the panel says is wrong with the agent it is showing.
public bool ToggleBreakpoint(Symbol tree, int node)Sets or clears a breakpoint on a node of a tree.
public bool Resume(AiSystem system, World world)Lets the selected agent go, if a breakpoint stopped it.
Used by (9)
- AgentDebugModelTestsVixen.Editor.AssetEditors.Tests
- AgentDebuggerViewVixen.Editor.AssetEditors
- AgentDebuggerViewTestsVixen.Editor.AssetEditors.Tests
- BehaviorTreeViewVixen.Editor.AssetEditors
- GoapDomainViewVixen.Editor.AssetEditors
- LiveTreeCanvasTestsVixen.Editor.AssetEditors.Tests
- LiveUtilityTestsVixen.Editor.AssetEditors.Tests
- OpenAssetTestsVixen.Editor.AssetEditors.Tests
- UtilitySetViewVixen.Editor.AssetEditors