Vixen
caa30e12
csharp
public sealed class AgentDebugRecorder

A ring of the last few decisions, off by default.

Read the guide page for this →

Remarks

⚠ Off by default, and not because of the cost. Doc 37 § D17 makes AI the authority's alone — nothing about a tree, a board or a plan crosses the wire — and the one channel that must, for the editor to debug a running dedicated server, is gated behind the same switch doc 13's remote inspector uses and is never in a shipping server build. A recorder that was on by default would be that channel's data, sitting in memory, waiting for somebody to add the transport.

The ring is allocated when it is turned on and never again, so recording costs a store and an index bump. It is a ring rather than a list because the interesting frames are the last ones before the thing went wrong, and a list that grew for an hour is a memory leak with a diagnostic label on it.

Fields and properties (3)

  • public bool Enabled

    Whether anything is being recorded.

  • public int Capacity

    How many records to keep.

  • public int Count

    How many records are held.

Methods (4)

  • public void Record(in AgentDebugRecord record)

    Adds a record, if recording is on.

  • public int CopyTo(Span<AgentDebugRecord> destination)

    Copies what has been recorded, oldest first.

  • public bool TryGetLatest(Entity entity, out AgentDebugRecord record)

    The most recent record for an agent.

  • public void Clear()

    Forgets everything recorded so far.

Used by (16)

  • AgentContextVixen.Ai
  • AgentDebugRecorderTestsVixen.Ai.Tests
  • AiDiagnosisVixen.Ai
  • AiDiagnosisExitCriteriaTestsVixen.Ai.Tests
  • AiSystemVixen.Ai
  • AiSystemTestsVixen.Ai.Tests
  • AiSystemTreeTestsVixen.Ai.Tests
  • BehaviorTreeCompositeTestsVixen.Ai.Tests
  • BehaviorTreeInstanceVixen.Ai
  • BehaviorTreeTaskTestsVixen.Ai.Tests
  • GoapAgentTestsVixen.Ai.Tests
  • LogTaskVixen.Ai
  • TreeHarnessVixen.Ai.Tests
  • VillageSampleTestsVixen.Ai.Nodes.Tests
  • AgentFixtureVixen.Editor.AssetEditors.Tests
  • LiveAgentVixen.Editor.AssetEditors.Tests