public readonly record struct AgentDebugRecordWhat an agent decided, and why, in the one shape all three planners fill.
Remarks
One record for three planners, because doc 37 § D2 made the agent one shape. The debug overlay, the editor's panels and a headless test's log are three views over this and not three implementations — which is what makes "an agent misbehaving in a headless test is diagnosed from the recorded log alone" a criterion rather than an aspiration.
Deliberately flat and value-typed: it goes in a ring buffer, it is compared in tests, and it must be cheap enough that recording is a decision about noise rather than about cost.
Fields and properties (9)
public Entity EntityThe agent.
public long TickWhen.
public AiPlanner PlannerWhich planner decided.
public Symbol ActionWhat it is doing — the task, the utility action, the plan's current step.
public ActionStatus StatusHow that action is getting on.
public int IndexWhere the decision sits: a tree node's execution index, the chosen action's index in a utility set, or the step's position in a plan.
public int CountWhat it was chosen from: the composite's child count, the number of candidates scored, or the plan's length.
public Symbol ReasonWhy, named: the decorator that decided, the consideration that dominated, or the condition still unmet.
public float ScoreThe number behind the reason: one or zero for a decorator, the utility score, the plan's cost.
Methods (2)
public AgentDebugRecord(Entity Entity, long Tick, AiPlanner Planner, Symbol Action, ActionStatus Status, int Index, int Count, Symbol Reason, float Score)What an agent decided, and why, in the one shape all three planners fill.
public override string ToString()Returns the fully qualified type name of this instance.
Used by (11)
- AgentDebugRecorderVixen.Ai
- AgentDebugRecorderTestsVixen.Ai.Tests
- AiDiagnosisVixen.Ai
- AiSystemTreeTestsVixen.Ai.Tests
- BehaviorTreeCompositeTestsVixen.Ai.Tests
- BehaviorTreeTaskTestsVixen.Ai.Tests
- GoapAgentTestsVixen.Ai.Tests
- VillageSampleTestsVixen.Ai.Nodes.Tests
- AgentDebugModelVixen.Editor.Ai
- AgentDebugModelTestsVixen.Editor.AssetEditors.Tests
- AgentDebuggerViewVixen.Editor.AssetEditors