14#include "BTNode.generated.h"
21class UGameplayTasksComponent;
86#if USE_BEHAVIORTREE_DEBUGGER
126 uint16 GetExecutionIndex()
const;
129 uint16 GetMemoryOffset()
const;
132 uint8 GetTreeDepth()
const;
135 void MarkInjectedNode();
138 bool IsInjected()
const;
141 void ForceInstancing(
bool bEnable);
144 bool HasInstance()
const;
147 bool IsInstanced()
const;
163 AIMODULE_API virtual FString GetStaticDescription()
const;
188 virtual void SetOwner(
AActor* ActorOwner) {}
204 bOwnsGameplayTasks =
true;
205 return UAITask::NewAITask<T>(*
BTComponent.GetAIOwner(), *
this,
TEXT(
"Behavior"));
212 bOwnsGameplayTasks =
true;
217 UPROPERTY(Category=Description, EditAnywhere)
230#if USE_BEHAVIORTREE_DEBUGGER
249 uint8 bIsInstanced : 1;
253 uint8 bIsInjected : 1;
280#if USE_BEHAVIORTREE_DEBUGGER
281inline UBTNode* UBTNode::GetNextNode()
const
287inline uint16 UBTNode::GetExecutionIndex()
const
289 return ExecutionIndex;
292inline uint16 UBTNode::GetMemoryOffset()
const
297inline uint8 UBTNode::GetTreeDepth()
const
302inline void UBTNode::MarkInjectedNode()
307inline bool UBTNode::IsInjected()
const
312inline void UBTNode::ForceInstancing(
bool bEnable)
320inline bool UBTNode::HasInstance()
const
325inline bool UBTNode::IsInstanced()
const
343 if constexpr (!std::is_trivially_destructible_v<T>)
367 return (T*)(
BTInstance.GetInstanceMemory().GetData() + MemoryOffset);
373 return (
const T*)(
BTInstance.GetInstanceMemory().GetData() + MemoryOffset);
382 checkf(
sizeof(T) <= GetInstanceMemorySize(),
TEXT(
"Requesting type of %zu bytes but GetInstanceMemorySize returns %u. Make sure GetInstanceMemorySize is implemented properly in %s class hierarchy."),
sizeof(T), GetInstanceMemorySize(), *
GetFName().
ToString());
#define NULL
Definition oodle2base.h:134
#define check(expr)
Definition AssertionMacros.h:314
#define checkf(expr, format,...)
Definition AssertionMacros.h:315
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
DIRECTLINK_API Display
Definition DirectLinkLog.h:8
#define DECLARE_LOG_CATEGORY_EXTERN(CategoryName, DefaultVerbosity, CompileTimeVerbosity)
Definition LogMacros.h:361
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition AIController.h:91
Definition NameTypes.h:617
Definition ObjectSaveContext.h:244
Definition GameplayTaskOwnerInterface.h:21
Definition ISlateStyle.h:18
Definition BTCompositeNode.h:88
uint8 bCreateNodeInstance
Definition BTNode.h:259
Definition BehaviorTreeComponent.h:105
uint16 GetActiveInstanceIdx() const
Definition BehaviorTreeComponent.h:590
TArray< FBehaviorTreeInstance > InstanceStack
Definition BehaviorTreeComponent.h:305
Definition BehaviorTree.h:16
Definition BlackboardData.h:46
Definition GameplayTask.h:146
FORCEINLINE FName GetFName() const
Definition UObjectBase.h:233
Type
Definition BehaviorTreeTypes.h:217
Type
Definition BehaviorTreeTypes.h:135
@ Destroy
Definition BehaviorTreeTypes.h:136
Type
Definition BehaviorTreeTypes.h:126
@ Initialize
Definition BehaviorTreeTypes.h:127
FString ToString(uint16 Value)
Definition PathFollowingComponent.cpp:82
int32 NodeIdx
Definition BTNode.h:35
Definition BehaviorTreeTypes.h:320
UBehaviorTreeComponent & OwnerComponent
Definition BTNode.h:41
FString RuntimeDescription
Definition BTNode.h:43
Definition BehaviorTreeTypes.h:534
UBehaviorTreeComponent & OwnerComp
Definition BehaviorTreeTypes.h:536
Definition ObjectPtr.h:488
Definition Optional.h:131
Definition WeakObjectPtrTemplates.h:25