13#include "ValueOrBBKey.generated.h"
16class FValueOrBBKeyDetails;
66 if (
const UBlackboardComponent* Blackboard =
BehaviorComp.GetBlackboardComponent())
90 virtual bool IsCompatibleType(
const UBlackboardKeyType* KeyType)
const {
return false; };
91 virtual FString ToString()
const {
return FString(); }
101 template <
typename T>
106 return ToStringKeyName();
110 return FString::Format(
TEXT(
"{0}"), { DefaultValue });
116 UPROPERTY(EditAnywhere, BlueprintReadOnly, Category =
"Value")
131 AIMODULE_API bool GetValue(
const UBlackboardComponent& Blackboard)
const;
132 AIMODULE_API bool GetValue(
const UBlackboardComponent* Blackboard)
const;
140 FString
ToString()
const {
return ToStringInternal(DefaultValue); }
142 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
143 operator
bool()
const {
return DefaultValue; }
146 UPROPERTY(EditAnywhere, Category =
"Value")
163 template <
typename T>
182 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
183 operator
UClass*()
const {
return DefaultValue; }
188 UPROPERTY(EditAnywhere, Category =
"Value")
191 UPROPERTY(EditDefaultsOnly, Category = "
Value", meta = (AllowAbstract = "1"))
208 template <
typename T>
227 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
228 operator
uint8()
const {
return DefaultValue; }
233 UPROPERTY(EditAnywhere, Category =
"Value")
241 FString NativeEnumTypeName =
TEXT("");
253 AIMODULE_API float GetValue(
const UBlackboardComponent& Blackboard)
const;
254 AIMODULE_API float GetValue(
const UBlackboardComponent* Blackboard)
const;
265 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
266 operator
float()
const {
return DefaultValue; }
269 UPROPERTY(EditAnywhere, Category =
"Value")
290 FString
ToString()
const {
return ToStringInternal(DefaultValue); }
292 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
293 operator
int32()
const {
return DefaultValue; }
296 UPROPERTY(EditAnywhere, Category =
"Value")
320 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
321 operator
FName()
const {
return DefaultValue; }
324 UPROPERTY(EditAnywhere, Category =
"Value")
337 AIMODULE_API FString GetValue(
const UBlackboardComponent& Blackboard)
const;
338 AIMODULE_API FString GetValue(
const UBlackboardComponent* Blackboard)
const;
346 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
347 operator FString()
const {
return DefaultValue; }
349 FString
ToString()
const {
return ToStringInternal(DefaultValue); }
352 UPROPERTY(EditAnywhere, Category =
"Value")
353 FString DefaultValue;
360 friend class FValueOrBBKeyDetails_Object;
368 template <
typename T>
387 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
388 operator
UObject*()
const {
return DefaultValue; }
393 UPROPERTY(EditAnywhere, Category =
"Value")
396 UPROPERTY(EditDefaultsOnly, Category = "
Value", meta = (AllowAbstract = "1"))
420 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
424 UPROPERTY(EditAnywhere, Category =
"Value")
448 UE_DEPRECATED_FORGAME(5.5,
"Implicit conversion will be removed next version. Call GetValue instead")
449 operator
FVector()
const {
return DefaultValue; }
452 UPROPERTY(EditAnywhere, Category =
"Value")
462 template <
typename T>
465 DefaultValue.InitializeAs<T>(
Value);
475 template <
typename T>
492 friend class FValueOrBBKeyDetails_Struct;
497#if WITH_EDITORONLY_DATA
#define check(expr)
Definition AssertionMacros.h:314
#define UE_DEPRECATED_FORGAME
Definition CoreMiscDefines.h:377
FString GetNameSafe(const FField *InField)
Definition Field.h:1230
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
const bool
Definition NetworkReplayStreaming.h:178
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define USTRUCT(...)
Definition ObjectMacros.h:746
UClass * StaticClass()
Definition ReflectedTypeAccessors.h:13
USkinnedMeshComponent float
Definition SkinnedMeshComponent.h:60
UE_INTRINSIC_CAST UE_REWRITE constexpr std::remove_reference_t< T > && MoveTemp(T &&Obj) noexcept
Definition UnrealTemplate.h:520
Definition NameTypes.h:617
Definition StructuredArchiveSlots.h:52
Definition SubclassOf.h:30
Definition BehaviorTreeComponent.h:105
Definition BlackboardData.h:46
Definition BlackboardKeyType.h:24
Definition BlackboardKey.h:8
TOptional< typename T::FDataType > TryGetBlackboardKeyValue(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey)
Definition ValueOrBBKey.h:37
FConstStructView TryGetBlackboardKeyStruct(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey, const UScriptStruct *TargetStruct)
Definition ValueOrBBKey.cpp:24
constexpr FKey InvalidKey
Definition BlackboardKey.h:33
FConstStructView GetStructValue(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey, const FConstStructView &DefaultValue)
Definition ValueOrBBKey.cpp:48
T::FDataType GetValue(const UBlackboardComponent &Blackboard, const FName &Name, FBlackboard::FKey &InOutCachedKey, const typename T::FDataType &DefaultValue)
Definition ValueOrBBKey.h:51
@ false
Definition radaudio_common.h:23
Definition BlackboardKey.h:18
Definition StructView.h:217
Definition InstancedStruct.h:32
Definition InputCoreTypes.h:50
Definition PropertyTag.h:38
Definition ValueOrBBKey.h:124
FString ToString() const
Definition ValueOrBBKey.h:140
Definition ValueOrBBKey.h:152
TSubclassOf< T > GetValue(const UBehaviorTreeComponent &BehaviorComp) const
Definition ValueOrBBKey.h:164
Definition ValueOrBBKey.h:197
T GetValue(const UBehaviorTreeComponent &BehaviorComp) const
Definition ValueOrBBKey.h:209
Definition ValueOrBBKey.h:246
Definition ValueOrBBKey.h:275
FString ToString() const
Definition ValueOrBBKey.h:290
Definition ValueOrBBKey.h:302
Definition ValueOrBBKey.h:358
T * GetValue(const UBehaviorTreeComponent &BehaviorComp) const
Definition ValueOrBBKey.h:369
Definition ValueOrBBKey.h:402
Definition ValueOrBBKey.h:330
FString ToString() const
Definition ValueOrBBKey.h:349
Definition ValueOrBBKey.h:458
FValueOrBBKey_Struct(const T &Value)
Definition ValueOrBBKey.h:463
FValueOrBBKey_Struct()=default
const T & GetValue(const UBehaviorTreeComponent &BehaviorComp) const
Definition ValueOrBBKey.h:476
Definition ValueOrBBKey.h:430
Definition ValueOrBBKey.h:83
void SetKey(FName NewKey)
Definition ValueOrBBKey.h:96
const FName & GetKey() const
Definition ValueOrBBKey.h:95
FString ToStringInternal(const T &DefaultValue) const
Definition ValueOrBBKey.h:102
Definition ObjectPtr.h:488
Definition Optional.h:131
constexpr OptionalType & GetValue()
Definition Optional.h:443
Definition StructOpsTypeTraits.h:11
@ WithStructuredSerializeFromMismatchedTag
Definition StructOpsTypeTraits.h:29
Definition StructOpsTypeTraits.h:46