Vixen
c7401864
csharp
public sealed class AiAgentSnapshot

One agent's state, at one instant, in the one shape all three planners fill.

Read the guide page for this →

Remarks

The overlay draws this, the editor panel tabulates it, and the remote channel writes it. Doc 37 § D20 asks for one debug surface rather than three, and the way to get one is to have the three planners agree on a shape before anything looks at them — otherwise "one surface" means one class with three branches in every method.

⚠ Strings, and taken on the owning thread. It is a picture rather than a view: it holds no World, no Blackboard and no template, so it can be handed to a panel that redraws next frame, put in a list to compare against, or written to a socket, without any of those touching live data. That costs a formatting pass per agent per capture, which is why nothing captures unless something asked.

Reused rather than allocated: Clear keeps the lists, so a panel polling one agent every frame allocates the strings and nothing else.

Fields and properties (11)

  • public Entity Entity

    Which agent.

  • public long Tick

    When, on the system's own tick count.

  • public AiPlanner Planner

    Which planner decided.

  • public Symbol Asset

    What it is running: the tree, the set, or the domain.

  • public Symbol Action

    What it is doing — the task, the utility action, the plan's current step.

  • public ActionStatus Status

    How that is getting on.

  • public string Reason

    Why, in a sentence: the goal, the failure, the dominating consideration.

  • public Vector3 Position

    Where the agent is, when whoever took the snapshot knew.

  • public bool Located

    Whether Position means anything.

  • public IReadOnlyList<AiDebugRow> Rows

    Everything there is to show, in the order a viewer draws it.

  • public int Count

    How many rows there are.

Methods (5)

  • public void Add(in AiDebugRow row)

    Adds a row.

  • public int CountOf(AiDebugSection section)

    How many rows belong to one section.

  • public IEnumerable<AiDebugRow> Section(AiDebugSection section)

    The rows of one section, in order.

  • public void Clear()

    Forgets everything, keeping the room it was in.

  • public override string ToString()

    The whole picture as text, which is what a headless failure prints.

Used by (11)

  • AiDebugChannelVixen.Ai
  • AiDebugChannelTestsVixen.Ai.Tests
  • AiGameplayDebuggerVixen.Ai.Diagnostics
  • AiSnapshotTestsVixen.Ai.Tests
  • AiSnapshotsVixen.Ai
  • PerceptionSnapshotsVixen.Ai.Perception
  • VillageSampleTestsVixen.Ai.Nodes.Tests
  • AgentDebugModelVixen.Editor.Ai
  • AgentDebugModelTestsVixen.Editor.AssetEditors.Tests
  • AgentDebuggerViewVixen.Editor.AssetEditors
  • UtilitySetViewVixen.Editor.AssetEditors