engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Protected 成员函数 | Protected 属性 | 所有成员列表
UBTDecorator_BlueprintBase类 参考

Base class for blueprint based decorator nodes. 更多...

#include <BTDecorator_BlueprintBase.h>

+ 类 UBTDecorator_BlueprintBase 继承关系图:

Public 成员函数

virtual bool CalculateRawConditionValue (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory) const override final
 calculates raw, core value of decorator's condition. 更多...
 
bool GetShouldAbort (UBehaviorTreeComponent &OwnerComp) const
 return if this decorator should abort in current circumstances
 
void InitializeProperties ()
 initialize data about blueprint defined properties
 
EBlackboardNotificationResult OnBlackboardKeyValueChange (const UBlackboardComponent &Blackboard, FBlackboard::FKey ChangedKeyID)
 notify about changes in blackboard
 
virtual void PostInitProperties () override
 setup node name
 
virtual void PostLoad () override
 Do any object-specific cleanup required immediately after loading an object. 更多...
 

Protected 成员函数

bool IsDecoratorExecutionActive () const
 check if decorator is part of currently active branch
 
bool IsDecoratorObserverActive () const
 check if decorator's observer is currently active
 
virtual void OnBecomeRelevant (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory) override
 called when auxiliary node becomes active this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnCeaseRelevant (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory) override
 called when auxiliary node becomes inactive this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnNodeActivation (FBehaviorTreeSearchData &SearchData) override
 called when underlying node is activated this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnNodeDeactivation (FBehaviorTreeSearchData &SearchData, EBTNodeResult::Type NodeResult) override
 called when underlying node has finished this function should be considered as const (don't modify state of object) if node is not instanced!
 
bool PerformConditionCheck (AActor *OwnerActor)
 called when testing if underlying node can be executed, must call FinishConditionCheck @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
bool PerformConditionCheckAI (AAIController *OwnerController, APawn *ControlledPawn)
 Alternative AI version of ReceiveConditionCheck 更多...
 
void ReceiveExecutionFinish (AActor *OwnerActor, enum EBTNodeResult::Type NodeResult)
 called when execution of underlying node is finished @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
void ReceiveExecutionFinishAI (AAIController *OwnerController, APawn *ControlledPawn, enum EBTNodeResult::Type NodeResult)
 Alternative AI version of ReceiveExecutionFinish 更多...
 
void ReceiveExecutionStart (AActor *OwnerActor)
 called on execution of underlying node @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
void ReceiveExecutionStartAI (AAIController *OwnerController, APawn *ControlledPawn)
 Alternative AI version of ReceiveExecutionStart 更多...
 
void ReceiveObserverActivated (AActor *OwnerActor)
 called when observer is activated (flow controller) @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
void ReceiveObserverActivatedAI (AAIController *OwnerController, APawn *ControlledPawn)
 Alternative AI version of ReceiveObserverActivated 更多...
 
void ReceiveObserverDeactivated (AActor *OwnerActor)
 called when observer is deactivated (flow controller) @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
void ReceiveObserverDeactivatedAI (AAIController *OwnerController, APawn *ControlledPawn)
 Alternative AI version of ReceiveObserverDeactivated 更多...
 
void ReceiveTick (AActor *OwnerActor, float DeltaSeconds)
 tick function @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise
 
void ReceiveTickAI (AAIController *OwnerController, APawn *ControlledPawn, float DeltaSeconds)
 Alternative AI version of ReceiveTick 更多...
 
virtual void TickNode (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory, float DeltaSeconds) override
 tick function this function should be considered as const (don't modify state of object) if node is not instanced!
 
- Protected 成员函数 继承自 UBTDecorator
virtual bool CalculateRawConditionValue (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory) const
 calculates raw, core value of decorator's condition. 更多...
 
void ConditionalFlowAbort (UBehaviorTreeComponent &OwnerComp, EBTDecoratorAbortRequest RequestMode) const
 more "flow aware" version of calling RequestExecution(this) on owning behavior tree component should be used in external events that may change result of CalculateRawConditionValue
 
virtual void OnNodeActivation (FBehaviorTreeSearchData &SearchData)
 called when underlying node is activated this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnNodeDeactivation (FBehaviorTreeSearchData &SearchData, EBTNodeResult::Type NodeResult)
 called when underlying node has finished this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnNodeProcessed (FBehaviorTreeSearchData &SearchData, EBTNodeResult::Type &NodeResult)
 called when underlying node was processed (deactivated or failed to activate) this function should be considered as const (don't modify state of object) if node is not instanced!
 
- Protected 成员函数 继承自 UBTAuxiliaryNode
float GetNextTickRemainingTime (uint8 *NodeMemory) const
 gets remaining time for next tick
 
virtual void OnBecomeRelevant (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory)
 called when auxiliary node becomes active this function should be considered as const (don't modify state of object) if node is not instanced!
 
virtual void OnCeaseRelevant (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory)
 called when auxiliary node becomes inactive this function should be considered as const (don't modify state of object) if node is not instanced!
 
void SetNextTickTime (uint8 *NodeMemory, float RemainingTime) const
 sets next tick time
 
virtual void TickNode (UBehaviorTreeComponent &OwnerComp, uint8 *NodeMemory, float DeltaSeconds)
 tick function this function should be considered as const (don't modify state of object) if node is not instanced!
 

Protected 属性

AActor * ActorOwner
 Cached AIController owner of BehaviorTreeComponent.
 
AAIController * AIOwner
 Cached AIController owner of BehaviorTreeComponent.
 
uint32 bCheckConditionOnlyBlackBoardChanges: 1
 Applies only if Decorator has any FBlackboardKeySelector property and if decorator is set to abort BT flow. 更多...
 
uint32 bIsObservingBB: 1
 gets set to true if decorator declared BB keys it can potentially observe
 
uint32 bShowPropertyDetails: 1
 show detailed information about properties
 
TArray< FName > ObservedKeyNames
 blackboard key names that should be observed
 
uint32 PerformConditionCheckImplementations: 2
 set if ReceiveConditionCheck is implemented by blueprint
 
TArray< FProperty * > PropertyData
 properties with runtime values, stored only in class default object
 
uint32 ReceiveExecutionFinishImplementations: 2
 set if ReceiveExecutionFinish is implemented by blueprint
 
uint32 ReceiveExecutionStartImplementations: 2
 set if ReceiveExecutionStart is implemented by blueprint
 
uint32 ReceiveObserverActivatedImplementations: 2
 set if ReceiveObserverActivated is implemented by blueprint
 
uint32 ReceiveObserverDeactivatedImplementations: 2
 set if ReceiveObserverDeactivated is implemented by blueprint
 
uint32 ReceiveTickImplementations: 2
 set if ReceiveTick is implemented by blueprint
 
- Protected 属性 继承自 UBTDecorator
uint32 bAllowAbortChildNodes: 1
 if set, FlowAbortMode can be set to Self and Both
 
uint32 bAllowAbortLowerPri: 1
 if set, FlowAbortMode can be set to LowerPriority and Both
 
uint32 bAllowAbortNone: 1
 if set, FlowAbortMode can be set to None
 
uint32 bNotifyActivation: 1
 if set, OnNodeActivation will be used
 
uint32 bNotifyDeactivation: 1
 if set, OnNodeDeactivation will be used
 
uint32 bNotifyProcessed: 1
 if set, OnNodeProcessed will be used
 
uint32 bShowInverseConditionDesc: 1
 if set, static description will include default description of inversed condition
 
TEnumAsByte< EBTFlowAbortMode::Type > FlowAbortMode
 flow controller settings
 
- Protected 属性 继承自 UBTAuxiliaryNode
uint8 bNotifyBecomeRelevant:1
 if set, OnBecomeRelevant will be used
 
uint8 bNotifyCeaseRelevant:1
 if set, OnCeaseRelevant will be used
 
uint8 bNotifyTick: 1
 if set, OnTick will be used
 
uint8 bTickIntervals: 1
 if set, conditional tick will use remaining time form node's memory
 
uint8 ChildIndex
 child index in parent node
 

详细描述

Base class for blueprint based decorator nodes.

Do NOT use it for creating native c++ classes!

Unlike task and services, decorator have two execution chains: ExecutionStart-ExecutionFinish and ObserverActivated-ObserverDeactivated which makes automatic latent action cleanup impossible. Keep in mind, that you HAVE TO verify is given chain is still active after resuming from any latent action (like Delay, Timelines, etc).

Helper functions:

成员函数说明

◆ CalculateRawConditionValue()

virtual bool UBTDecorator_BlueprintBase::CalculateRawConditionValue ( UBehaviorTreeComponent &  OwnerComp,
uint8 *  NodeMemory 
) const
finaloverridevirtual

calculates raw, core value of decorator's condition.

Should not include calling IsInversed

重载 UBTDecorator .

◆ PerformConditionCheckAI()

bool UBTDecorator_BlueprintBase::PerformConditionCheckAI ( AAIController *  OwnerController,
APawn *  ControlledPawn 
)
protected

Alternative AI version of ReceiveConditionCheck

参见
ReceiveConditionCheck for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

◆ PostLoad()

virtual void UBTDecorator_BlueprintBase::PostLoad ( )
overridevirtual

Do any object-specific cleanup required immediately after loading an object.

This is not called for newly-created objects, and by default will always execute on the game thread.

重载 UObject .

◆ ReceiveExecutionFinishAI()

void UBTDecorator_BlueprintBase::ReceiveExecutionFinishAI ( AAIController *  OwnerController,
APawn *  ControlledPawn,
enum EBTNodeResult::Type  NodeResult 
)
protected

Alternative AI version of ReceiveExecutionFinish

参见
ReceiveExecutionFinish for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

◆ ReceiveExecutionStartAI()

void UBTDecorator_BlueprintBase::ReceiveExecutionStartAI ( AAIController *  OwnerController,
APawn *  ControlledPawn 
)
protected

Alternative AI version of ReceiveExecutionStart

参见
ReceiveExecutionStart for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

◆ ReceiveObserverActivatedAI()

void UBTDecorator_BlueprintBase::ReceiveObserverActivatedAI ( AAIController *  OwnerController,
APawn *  ControlledPawn 
)
protected

Alternative AI version of ReceiveObserverActivated

参见
ReceiveObserverActivated for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

◆ ReceiveObserverDeactivatedAI()

void UBTDecorator_BlueprintBase::ReceiveObserverDeactivatedAI ( AAIController *  OwnerController,
APawn *  ControlledPawn 
)
protected

Alternative AI version of ReceiveObserverDeactivated

参见
ReceiveObserverDeactivated for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

◆ ReceiveTickAI()

void UBTDecorator_BlueprintBase::ReceiveTickAI ( AAIController *  OwnerController,
APawn *  ControlledPawn,
float  DeltaSeconds 
)
protected

Alternative AI version of ReceiveTick

参见
ReceiveTick for more details @Note that if both generic and AI event versions are implemented only the more suitable one will be called, meaning the AI version if called for AI, generic one otherwise

类成员变量说明

◆ bCheckConditionOnlyBlackBoardChanges

uint32 UBTDecorator_BlueprintBase::bCheckConditionOnlyBlackBoardChanges
protected

Applies only if Decorator has any FBlackboardKeySelector property and if decorator is set to abort BT flow.

Is set to true ReceiveConditionCheck will be called only on changes to observed BB keys. If false or no BB keys observed ReceiveConditionCheck will be called every tick


该类的文档由以下文件生成: