-
Notifications
You must be signed in to change notification settings - Fork 29
Home
José Rey Méndez edited this page Aug 20, 2018
·
9 revisions
Welcome to the AIGraphs documentation! This project is based on the open source project xNode.
AIGraphs is intended to be a visual node editor for AI tools, the first available tools will be Behavior Trees and Finite State Machines. Any AI graph can be run from a game object by just adding the AIGraphRunner
component.
- The blackboard is a dictionary used to contain data relevant to identify and execute a single AI runner. Each AIGraphRunner component creates it's own blackboard to contain information.
- Add blackboard variables to be on your AIGraphs by adding some of the blackboard variable nodes implemented (See here). Set the name of the nodes to the intended blackboard key.
- Implement your own blackboard variable nodes by inheriting from the generic
BlackboardVariableNode
. - Modify the blackboard on runtime from your components by using the methods
SetInBlackboard
andUnsetInBlackboard
found in theAIGraphRunner
component.
- Create new behavior trees using the context menu asset creation
BT/BehaviorTree
open it and start editing.- The minimum requirement for a Behavior tree to work is to have either a composite or decorator node set as root. Select your root node by using the context menu on a node and using the "Set as Root" option.
- You can create your own tasks and checks by inheriting from
BTTaskNode
. and overriding theInternalRun
method. This method should return one of the defined states inBTGraphResult
: Success, Failure or Running.- Success and Failure will somehow advance the execution from the behavior tree.
- Running will normally stop the behavior tree execution and continue from the same point on the next execution.
- See examples
DebugVariable
,IsNullCheck
.
- Implement your own composites by inheriting from
BTCompositeNode
. - Implement your own decorators by inheriting from
BTDecoratorNode
. - Use your blackboard variables from tasks, checks and other types of nodes by using input ports and using the utility function
GetBlackboardValue
inherited fromBTNode
.