目次
やあ
メモだよ
環境
・UE4.25.0
実装
BT_T_Hoge.h
// Copyright(C)write by pto8913. 2020. All Rights Reserved. #pragma once #include "CoreMinimal.h" #include "BehaviorTree/Tasks/BTTask_BlackboardBase.h" #include "BT_T_FaceToTarget.generated.h" UCLASS() class Huga_API UBT_T_Hoge : public UBT_T_Base { GENERATED_BODY() public: UBT_T_Hoge(); virtual EBTNodeResult::Type ExecuteTask( UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory ) override; virtual void TickTask( UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds ) override; };
BT_T_Hoge.cpp
// Copyright(C)write by pto8913. 2020. All Rights Reserved. #include "BT_T_Hoge.h" #include "BehaviorTree/BTTaskNode.h" #include "BehaviorTree/BehaviorTreeComponent.h" #include "BehaviorTree/BlackboardComponent.h" #include "BehaviorTree/Blackboard/BlackboardKeyAllTypes.h" UBT_T_Hoge::UBT_T_Hoge() { bNotifyTick = true; } EBTNodeResult::Type UBT_T_Hoge::ExecuteTask( UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory ) { return EBTNodeResult::InProgress; } void UBT_T_Hoge::TickTask( UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds ) { Super::TickTask(OwnerComp, NodeMemory, DeltaSeconds); /* なにかの処理 */ }