Vixen
caa30e12
csharp
public sealed class GoapPlan

A sequence of actions, of which only the head is committed.

Read the guide page for this →

Remarks

⚠ The tail is advisory and doc 37 § D11 is explicit about it. An agent that follows a sequence walks into a door that closed after the plan was made; one that re-plans every frame is a search per agent per frame. So the tail is kept — it is what the debugger draws and what a designer reads — and every step re-checks the next action's conditions before starting it rather than trusting the plan that produced it.

Fields and properties (8)

  • public Symbol Goal

    Which goal it was made for.

  • public int GoalIndex

    Which goal it was made for, by index.

  • public PlanFailure Failure

    Why there is no plan, or None.

  • public float Cost

    What the whole chain costs.

  • public int Expanded

    How many nodes the search expanded to find it.

  • public int Count

    How many steps it has.

  • public ReadOnlySpan<int> Steps

    The steps, in the order they run. The head is [0].

  • public int Head

    The action to run now, or -1.

Methods (3)

  • public void Clear()

    Forgets everything.

  • public bool Advance()

    Drops the head, which is what finishing a step does.

  • public void Copy(GoapPlan other)

    Copies another plan over this one.

Used by (16)

  • AiSnapshotsVixen.Ai
  • AiSystemVixen.Ai
  • GoapBudgetTestsVixen.Ai.Tests
  • GoapCostTestsVixen.Ai.Tests
  • GoapMemoryVixen.Ai
  • GoapPearTestsVixen.Ai.Tests
  • GoapPlanQueueVixen.Ai
  • GoapPlannerVixen.Ai
  • GoapReplanTestsVixen.Ai.Tests
  • GoapThroughputTestsVixen.Ai.Tests
  • SlotVixen.Ai
  • AgentDebugModelVixen.Editor.Ai
  • GoapDomainViewVixen.Editor.AssetEditors
  • GoapGraphProjectionVixen.Editor.Ai
  • GoapGraphProjectionTestsVixen.Editor.AssetEditors.Tests
  • LiveGoapTestsVixen.Editor.AssetEditors.Tests