|
@@ -10,6 +10,7 @@
|
|
|
#include "EzAbilityComponent.h"
|
|
|
#include "EzAbilityEditorData.h"
|
|
|
#include "EzAblityTestTypes.h"
|
|
|
+#include "GameplayTagsManager.h"
|
|
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(EzAbilityTest)
|
|
|
|
|
@@ -29,6 +30,42 @@ namespace UE::EzAbility::Tests
|
|
|
EditorData->Schema = NewObject<UEzAbilityTestSchema>();
|
|
|
return *Ability;
|
|
|
}
|
|
|
+
|
|
|
+ FEzAbilityPropertyPathBinding MakeBinding(const FGuid& SourceID, const FString& Source, const FGuid& TargetID, const FString& Target)
|
|
|
+ {
|
|
|
+ FEzAbilityPropertyPath SourcePath;
|
|
|
+ SourcePath.FromString(Source);
|
|
|
+ SourcePath.SetStructID(SourceID);
|
|
|
+
|
|
|
+ FEzAbilityPropertyPath TargetPath;
|
|
|
+ TargetPath.FromString(Target);
|
|
|
+ TargetPath.SetStructID(TargetID);
|
|
|
+
|
|
|
+ return FEzAbilityPropertyPathBinding(SourcePath, TargetPath);
|
|
|
+ }
|
|
|
+
|
|
|
+ // Helper struct to define some test tags
|
|
|
+ struct FNativeGameplayTags : public FGameplayTagNativeAdder
|
|
|
+ {
|
|
|
+ virtual ~FNativeGameplayTags() {}
|
|
|
+
|
|
|
+ FGameplayTag TestTag;
|
|
|
+ FGameplayTag TestTag2;
|
|
|
+
|
|
|
+ virtual void AddTags() override
|
|
|
+ {
|
|
|
+ UGameplayTagsManager& Manager = UGameplayTagsManager::Get();
|
|
|
+ TestTag = Manager.AddNativeGameplayTag(TEXT("Test.StateTree.Tag"));
|
|
|
+ TestTag2 = Manager.AddNativeGameplayTag(TEXT("Test.StateTree.Tag2"));
|
|
|
+ }
|
|
|
+
|
|
|
+ FORCEINLINE static const FNativeGameplayTags& Get()
|
|
|
+ {
|
|
|
+ return StaticInstance;
|
|
|
+ }
|
|
|
+ static FNativeGameplayTags StaticInstance;
|
|
|
+ };
|
|
|
+ FNativeGameplayTags FNativeGameplayTags::StaticInstance;
|
|
|
}
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|