Vixen
c7401864
csharp
public sealed class GoapDomainView

A GOAP domain: the tables that are authored, and the graph that is not.

Read the guide page for this →

Remarks

doc 37 § Part 5's GOAP editor. Goals, actions and world keys are tables; conditions and effects are rows on an action. The graph beside them is derived and read-only, and it has no command stack — which NodeGraphView already supports, since "no stack means read-only".

⚠ This is where "the node editor is mandatory" gets an honest answer. crashkonijn ships a GraphViewer rather than a graph editor, and that is right: the edges are computed from which effects satisfy which conditions, so drawing them by hand would be authoring the same fact twice and the two copies would disagree the first time somebody edited a condition.

Fields and properties (8)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public NodeCanvas Canvas

    The derived graph. ⚠ Read-only, and deliberately without a command stack.

  • public UiElement Goals

    The goals.

  • public UiElement Actions

    The actions.

  • public UiElement Keys

    The world keys.

  • public UiElement Diagnostics

    What the last compile said.

  • public Button Build

    The button that compiles the domain and rebuilds the graph.

Methods (6)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public void Show(GoapDomainDocument value)

    Shows a document.

  • public void Follow(AgentDebugModel? value, GoapPlanner? planner = null)

    Follows a running agent, so the graph shows its plan and its world.

  • public GoapDomain? Compile(GoapPlan? plan = null)

    Compiles the domain, lists what it said and redraws the derived graph.

  • public void Refresh()

    Rebuilds the three tables from the document.

  • public static string Describe(GoapConditionContent condition)

    One condition, as a person reads it.

Used by (2)

  • GoapDomainEditorFactoryVixen.Editor.AssetEditors
  • GoapGraphProjectionTestsVixen.Editor.AssetEditors.Tests