EvolvingBehavior  0.2.0
 
Loading...
Searching...
No Matches

The abstract base class of genes representing Composite nodes, which contain other nodes. More...

#include <BTCompositeNodeGene.h>

Inheritance diagram for UBTCompositeNodeGene:
UBTNodeGene UBTMappedCompositeGene

Public Member Functions

void AddChild (UBTChildContainerGene *child)
 
int32 RemoveChild (UBTChildContainerGene *child)
 
int32 InsertChild (UBTChildContainerGene *child, int32 idx)
 
int GetNumChildren () const
 
UBTChildContainerGeneGetChild (int idx) const
 
int32 RemoveService (UBTServiceGene *service)
 
int32 InsertService (UBTServiceGene *service, int32 idx)
 
int32 AddService (UBTServiceGene *service)
 
int GetNumServices () const
 
UBTServiceGeneGetService (int idx) const
 
virtual UBTNodeGeneDuplicate (UObject *outer) override
 
virtual void SetServiceInjector (UServiceInjector *serviceInjector) override
 
virtual void SetServiceInjector (UServiceInjector *serviceInjector)
 

Public Attributes

virtual UBTCompositeNode * BuildPhenotype (UObject *outer) PURE_VIRTUAL(UBTCompositeNodeGene
 
virtual UBTCompositeNodeGeneDuplicateComposite (UObject *outer) PURE_VIRTUAL(UBTCompositeNodeGene
 
- Public Attributes inherited from UBTNodeGene
virtual FString ToString () PURE_VIRTUAL(UBTNodeGene
 
virtual UBTNodeGeneDuplicate (UObject *outer) PURE_VIRTUAL(UBTNodeGene
 

Protected Attributes

TArray< UBTChildContainerGene * > children
 
TArray< UBTServiceGene * > services
 
- Protected Attributes inherited from UBTNodeGene
UServiceInjectorServiceInjector
 

Detailed Description

The abstract base class of genes representing Composite nodes, which contain other nodes.

Author
npc
Date
12/01/17

The Composite node has one or more children, which are represented as UBTChildContainerGene objects. Each of these objects contains either another composite node, which has additional children, or a task node, which is a leaf and performs an action. The composite node's 'type' defines how those children are executed.

There is currently only one subclass:

BTMappedTaskGene: These are objects which map to templates for creating an Unreal Engine task node. Defaults are automatically set, and the only set up required is to add default nodes to the "NodeMapper" in the editor, or make sure the nodes you want are in there. We recommend using only mapped nodes until you are comfortable with the tool.

NOTE: There is no 'generated' version of a composite node because they do not contain any internal variables which can be mutated, rather they just provide a high level structure for the execution of their children.

Member Function Documentation

◆ SetServiceInjector()

void UBTCompositeNodeGene::SetServiceInjector ( UServiceInjector serviceInjector)
overridevirtual

Reimplemented from UBTNodeGene.


The documentation for this class was generated from the following files:
  • Source/EvolvingBehavior/Public/Representation/BTCompositeNodeGene.h
  • Source/EvolvingBehavior/Private/Representation/BTCompositeNodeGene.cpp