public sealed class BehaviorTreeViewA behaviour tree, open for editing: the canvas, the blackboard, and what is selected.
Remarks
The mandatory editor of doc 37 § Part 5, in four columns: the tree drawn top-down with its decorators stacked above each node and its services below, an execution-index badge on every header, the blackboard's key list, and the selected thing's settings generated from its declaration with the compiler's complaints under them.
⚠ The canvas is NodeCanvas and the model is not NodeGraphModel. doc 37 § D19 works through the framework's four rules: a tree passes two of them and fails two more that a shader graph has never needed — a composite's children are ordered where Edges is an unordered list, and a decorator attaches where the model has no notion of an attachment. Adding both to the framework was refused because a framework that grows a feature for one consumer grows a feature every consumer's tests have to consider. So the document projects onto the canvas and every edit goes back through the model.
⚠ Selecting a decorator shades what it can interrupt. That is the payoff for taking Unity's scope rule over Unreal's: an observer reaches the siblings under its own parent composite and no further, which makes the region a subtree — and a subtree is a thing that can be drawn. A rule you can draw is a rule an author can predict.
Fields and properties (13)
protected override string TagNameThe element name this type answers to when a caller does not choose one.
protected override bool AcceptsFocusWhether the focus can rest on this kind of control at all.
public NodeCanvas CanvasThe tree.
public UiElement SideThe column beside it.
public UiElement KeysThe blackboard's key list.
public UiElement InspectorThe selected thing's settings.
public UiElement AttachmentsThe attachment strip for the selected node.
public UiElement DiagnosticsWhat the last compile said.
public Button BuildThe button that compiles the tree.
public Button ArrangeThe button that lays it out.
public BehaviorSearchPopup SearchThe search-to-create popup, filtered by what may go where.
public BehaviorNodeContent? SelectedThe node that is selected, or null.
public BehaviorAttachmentContent? SelectedAttachmentThe attachment that is selected, or null.
Methods (8)
protected override void OnCreated()Builds whatever this element is made of, once, as it joins a document.
public void Show(BehaviorTreeDocument value)Shows a document.
public void Select(BehaviorNodeContent? node, BehaviorAttachmentContent? attachment = null, BehaviorAttachmentSlot slot = Decorator)Selects a node, and shades what a selected decorator could interrupt.
public void Follow(AgentDebugModel? value)Follows a running agent, tinting the canvas by what it is doing.
public int RefreshLive()Re-tints the canvas from whatever agent is being followed.
public BehaviorTreeTemplate? Compile()Compiles the tree and lists what it said.
public void Refresh()Rebuilds every panel from the document.
public void OpenSearch(BehaviorSlot slot, float x, float y)Opens the search popup for what may go in a slot.
Used by (2)
- BehaviorTreeEditorFactoryVixen.Editor.AssetEditors
- LiveTreeCanvasTestsVixen.Editor.AssetEditors.Tests