diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..53b9c9c5
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,24 @@
+[submodule "UHL"]
+ path = UHL
+ url = https://github.com/Ciberusps/UHL.git
+[submodule "UHLAI"]
+ path = UHLAI
+ url = https://github.com/Ciberusps/UHLAI.git
+[submodule "UHLCharacter"]
+ path = UHLCharacter
+ url = https://github.com/Ciberusps/UHLCharacter.git
+[submodule "UHLCommonMaps"]
+ path = UHLCommonMaps
+ url = https://github.com/Ciberusps/UHLCommonMaps.git
+[submodule "UHLDebugSystem"]
+ path = UHLDebugSystem
+ url = https://github.com/Ciberusps/UHLDebugSystem.git
+[submodule "UHLGAS"]
+ path = UHLGAS
+ url = https://github.com/Ciberusps/UHLGAS.git
+[submodule "UHLStateTree"]
+ path = UHLStateTree
+ url = https://github.com/Ciberusps/UHLStateTree.git
+[submodule "UHLBehaviorTree"]
+ path = UHLBehaviorTree
+ url = https://github.com/Ciberusps/UHLBehaviorTree.git
diff --git a/Config/DefaultUnrealHelperLibrary.ini b/Config/DefaultUnrealHelperLibrary.ini
deleted file mode 100644
index 1a1f1e2b..00000000
--- a/Config/DefaultUnrealHelperLibrary.ini
+++ /dev/null
@@ -1,209 +0,0 @@
-[CoreRedirects]
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPLibrary",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_RotateTo",NewName="/Script/UnrealHelperLibrary.BTT_TurnTo")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToSettings",NewName="/Script/UnrealHelperLibrary.TurnSettings")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnSettings.TurnToRanges",NewName="/Script/UnrealHelperLibrary.TurnSettings.TurnRangesGroups")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToRanges",NewName="/Script/UnrealHelperLibrary.TurnRanges")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToRange",NewName="/Script/UnrealHelperLibrary.TurnRange")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnRanges.Ranges",NewName="/Script/UnrealHelperLibrary.TurnRanges.TurnRanges")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnSettings.TurnRanges",NewName="/Script/UnrealHelperLibrary.TurnSettings.TurnRangesGroups")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnSettings.TurnGroups",NewName="/Script/UnrealHelperLibrary.TurnSettings.TurnRangesGroups")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToAnimationsDataAsset.TurnToSettings",NewName="/Script/UnrealHelperLibrary.TurnSettingsDataAsset.TurnSettings")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToAnimationsDataAsset.TurnToSettings",NewName="/Script/UnrealHelperLibrary.TurnSettingsDataAsset.TurnSettings")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToAnimationsDataAsset.SetupPreset_90_180",NewName="/Script/UnrealHelperLibrary.TurnSettingsDataAsset.SetupPreset_Recommended_90_180")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_TurnTo.SetupPreset_90_180",NewName="/Script/UnrealHelperLibrary.BTT_TurnTo.SetupPreset_Recommended_90_180")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_TurnTo.SetupPreset_Recommended_90_180",NewName="/Script/UnrealHelperLibrary.BTT_TurnTo.SetupPreset_Default_90_180")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BInputComponent",NewName="/Script/UnrealHelperLibrary.UHLInputComponent")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.BInputAction",NewName="/Script/UnrealHelperLibrary.UHLInputAction")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.BInputActionAbilities",NewName="/Script/UnrealHelperLibrary.UHLInputActionAbilities")
-+EnumRedirects=(OldName="/Script/UnrealHelperLibrary.EBAbilityActivationPolicy",NewName="/Script/UnrealHelperLibrary.EUHLAbilityActivationPolicy")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.TurnToAnimationsDataAsset",NewName="/Script/UnrealHelperLibrary.TurnSettingsDataAsset")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetHighestPoint",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetHighestPointInBox")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetPointAtRelativeAngleBetweenActors",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetPointAtAngleRelativeToOtherActor")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetPointAtRelativeDirectionBetweenActors",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetPointAtDirectionRelativeToOtherActor")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.OtherActorInAngle",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.IsOtherActorInAngle")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.OtherCharacterInRange",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.IsOtherCharacterInRange")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLGameplayAbility.CacheInputActivationRequiredTags",NewName="/Script/UnrealHelperLibrary.UHLGameplayAbility.AddingToCacheInputRequiredTags")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLGameplayAbility.CacheInputActivationBlockedTags",NewName="/Script/UnrealHelperLibrary.UHLGameplayAbility.AddingToCacheInputBlockedTags")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategory.Tag",NewName="/Script/UnrealHelperLibrary.UHLDebugCategory.Tags")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHL_DDC_AbilitySystem_Attributes",NewName="/Script/UnrealHelperLibrary.DCC_AbilitySystem_Attributes")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DebugCategoryCheckboxWidget",NewName="/Script/UnrealHelperLibrary.DebugCategoryButtonWidget")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategory.bForceDeactivateOnGameStart",NewName="/Script/UnrealHelperLibrary.UHLDebugCategory.bForceComponentsDeactivateOnEnd")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategory.bForceDeactivateOnEnd",NewName="/Script/UnrealHelperLibrary.UHLDebugCategory.bForceComponentsDeactivateOnEnd")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings.GameplayTagTableList",NewName="/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings.DebugCategoriesGameplayTagsTableList")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings.bExcludeUHLDebugCategories",NewName="/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings.bExcludeDefaultUHLDebugCategories")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategory.ByDefaultEnabledIn",NewName="/Script/UnrealHelperLibrary.UHLDebugCategory.ByDefaultEnabledInBuildTypes")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.InitialActiveAbilities",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.ActiveAbilitiesOnStart")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.GiveAbilitiesOnStart",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.Abilities")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.GiveAttributeSetsOnStart",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.AttributeSets")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.InitialGameplayAttributes",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.InitialAttributes")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.bUseUHLAbilitySystemConfig",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.bUseAbilitySystemConfig")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.UHLAbilitySystemConfig",NewName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent.AbilitySystemConfig")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_UnrealHelperLibrary",NewName="/Script/UnrealHelperLibrary.ANS_UHL_Base")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.EnemyTickManagerSubsystem",NewName="/Script/UnrealHelperLibrary.EnemyTickOptimizerSubsystem")
-
-; Split on modules BEGIN
-; UHLCharacter
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLBaseCharacter",NewName="/Script/UHLCharacter.UHLBaseCharacter")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLBaseCharacterWithASC",NewName="/Script/UHLCharacter.UHLBaseCharacterWithASC")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLPlayerController",NewName="/Script/UHLCharacter.UHLPlayerController")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLCharacter",NewName="/Script/UHLCharacter.UHLCharacter")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLBaseCharacterAttributeSet",NewName="/Script/UHLCharacter.UHLBaseCharacterAttributeSet")
-
-; UHLDebug
-; TODO протестить было /Script/UnrealHelperLibrary/UHLDebugSubsystemSettings почему-то
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings",NewName="/Script/UHLDebugSystem.UHLDebugSystemSettings")
-;+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugSubsystem",NewName="/Script/UHLDebug.UHLDebugSubsystem")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugSubsystem",NewName="/Script/UHLDebugSystem.UHLDebugSystemSubsystem")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategory",NewName="/Script/UHLDebugSystem.UHLDebugCategory")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategoryComponent",NewName="/Script/UHLDebugSystem.UHLDebugCategoryComponent")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AA_WaitDebugCategoryChange",NewName="/Script/UHLDebugSystem.AA_WaitDebugCategoryChange")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DCC_AbilitySystem_Abilities",NewName="/Script/UHLDebugSystem.DCC_AbilitySystem_Abilities")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DCC_AbilitySystem_Attributes",NewName="/Script/UHLDebugSystem.DCC_AbilitySystem_Attributes")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DCC_AbilitySystem_Effects",NewName="/Script/UHLDebugSystem.DCC_AbilitySystem_Effects")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DCC_Collisions",NewName="/Script/UHLDebugSystem.DCC_Collisions")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.DCC_InputSystem_EnhancedInput",NewName="/Script/UHLDebugSystem.DCC_InputSystem_EnhancedInput")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugCategoriesListWidget",NewName="/Script/UHLDebugSystem.UHLDebugCategoriesListWidget")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLDebugWidget",NewName="/Script/UHLDebug.UHLDebugWidget")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.IsUHLDebugCategoryEnabled",NewName="/Script/UHLDebugSystem.UHLDebugBlueprintLibrary.IsUHLDebugCategoryEnabled")
-+PropertyRedirects=(OldName="/Script/UHLDebugSystem.UHLDebugCategory.ShortName",NewName="/Script/UHLDebugSystem.UHLDebugCategory.Name")
-
-; UHLAI
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAIPerceptionComponent",NewName="/Script/UHLAI.UHLAIPerceptionComponent")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTC_RandomSelector",NewName="/Script/UHLAI.BTC_RandomSelector")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnRange",NewName="/Script/UHLAI.TurnRange")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnRanges",NewName="/Script/UHLAI.TurnRanges")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.TurnSettings",NewName="/Script/UHLAI.TurnSettings")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.TurnSettingsDataAsset",NewName="/Script/UHLAI.TurnSettingsDataAsset")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLActorSettings",NewName="/Script/UHLAI.UHLAIActorSettings")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_Base",NewName="/Script/UHLAI.BTD_Base")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_CheckGASGameplayTagsOnActor",NewName="/Script/UHLAI.BTD_CheckGASGameplayTagsOnActor")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_InAngle",NewName="/Script/UHLAI.BTD_InAngle")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.AngleRange",NewName="/Script/UHLAI.AngleRange")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_InRange",NewName="/Script/UHLAI.BTD_InRange")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_LoopRandomCount",NewName="/Script/UHLAI.BTD_LoopRandomCount")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_RandomChance",NewName="/Script/UHLAI.BTD_RandomChance")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTD_TimeLimitRandom",NewName="/Script/UHLAI.BTD_TimeLimitRandom")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTS_GameplayFocus",NewName="/Script/UHLAI.BTS_GameplayFocus")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_ClearFocus",NewName="/Script/UHLAI.BTT_ClearFocus")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_DebugPrintBBValue",NewName="/Script/UHLAI.BTT_DebugPrintBBValue")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_DebugPrintString",NewName="/Script/UHLAI.BTT_DebugPrintString")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_FireGameplayEvent",NewName="/Script/UHLAI.BTT_FireGameplayEvent")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_InvokeGameplayAbility",NewName="/Script/UHLAI.BTT_InvokeGameplayAbility")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_PlayAnimMontage",NewName="/Script/UHLAI.BTT_PlayAnimMontage")
-+EnumRedirects=(OldName="/Script/UnrealHelperLibrary.ETaskNodeEndPolicy",NewName="/Script/UHLAI.ETaskNodeEndPolicy")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_SetBBValue",NewName="/Script/UHLAI.BTT_SetBBValue")
-+EnumRedirects=(OldName="/Script/UnrealHelperLibrary.ESetBBValue_MathOperations",NewName="/Script/UHLAI.EUHL_MathOperations")
-
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.BTT_TurnTo",NewName="/Script/UHLAI.BTT_TurnTo")
-
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.ValueOrBBKey_GameplayTag",NewName="/Script/UHLAI.UHLValueOrBBKey_GameplayTag")
-
-
-; UHL GAS
-;+EnumRedirects=(OldName="/Script/UnrealHelperLibrary.",NewName="/Script/UHLGAS.")
-;+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.",NewName="/Script/UHLGAS.")
-;+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.",NewName="/Script/UHLGAS.")
-;+StructRedirects=(OldName="/Script/UnrealHelperLibrary.",NewName="/Script/UHLGAS.")
-;+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.")
-
-+EnumRedirects=(OldName="/Script/UnrealHelperLibrary.EUHLAbilityActivationPolicy",NewName="/Script/UHLGAS.EUHLAbilityActivationPolicy")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLGameplayAbility",NewName="/Script/UHLGAS.UHLGameplayAbility")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AN_FireGameplayEvent",NewName="/Script/UHLGAS.AN_FireGameplayEvent")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_ActivateAbility",NewName="/Script/UHLGAS.ANS_ActivateAbility")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_CatchToAbilityInputCache",NewName="/Script/UHLGAS.ANS_CatchToAbilityInputCache")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_CheckAbilityInputCache",NewName="/Script/UHLGAS.ANS_CheckAbilityInputCache")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_GlobalTimeDilation",NewName="/Script/UHLGAS.ANS_UHLGAS_GlobalTimeDilation")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAttributeSet",NewName="/Script/UHLGAS.UHLAttributeSet")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemInterface",NewName="/Script/UHLGAS.UHLAbilitySystemInterface")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AbilityInputCachePayload",NewName="/Script/UHLGAS.AbilityInputCachePayload")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AbilityInputCache",NewName="/Script/UHLGAS.AbilityInputCache")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLInputComponent",NewName="/Script/UHLGAS.UHLInputComponent")
-
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.UHLInputAction",NewName="/Script/UHLGAS.UHLInputAction")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.UHLInputActionAbilities",NewName="/Script/UHLGAS.UHLInputActionAbilities")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLInputConfig",NewName="/Script/UHLGAS.UHLInputConfig")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AA_WaitAbilityActivate",NewName="/Script/UHLGAS.AA_WaitAbilityActivate")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.AA_WaitAbilityActivate.WaitForAbilityActivate",NewName="/Script/UHLGAS.AA_WaitAbilityActivate.WaitForAbilityActivate")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.AA_WaitAbilityActivate.WaitAbilityActivate",NewName="/Script/UHLGAS.AA_WaitAbilityActivate.WaitForAbilityActivate")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AT_InterpolateToPosition",NewName="/Script/UHLGAS.AT_InterpolateToPosition")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.AT_InterpolateToPosition.InterpolateToPosition",NewName="/Script/UHLGAS.AT_InterpolateToPosition.InterpolateToPosition")
-
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.FUHLAbilitySet_GameplayAbility",NewName="/Script/UHLGAS.FUHLAbilitySet_GameplayAbility")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.FUHLAbilitySet_GameplayEffect",NewName="/Script/UHLGAS.FUHLAbilitySet_GameplayEffect")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.FUHLAbilitySet_AttributeSet",NewName="/Script/UHLGAS.FUHLAbilitySet_AttributeSet")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.FUHLAbilitySet_GrantedHandles",NewName="/Script/UHLGAS.FUHLAbilitySet_GrantedHandles")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySet",NewName="/Script/UHLGAS.UHLAbilitySet")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemComponent",NewName="/Script/UHLGAS.UHLAbilitySystemComponent")
-
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.FUHLAbilitySystemSettings",NewName="/Script/UHLGAS.FUHLAbilitySystemSettings")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.UHLAbilitySystemConfig",NewName="/Script/UHLGAS.UHLAbilitySystemConfig")
-
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLSettings.AbilitySystemConfigDefaults",NewName="/Script/UHLGAS.UHLGASSettings.AbilitySystemConfigDefaults")
-+PropertyRedirects=(OldName="/Script/UnrealHelperLibrary.UHLSettings.bUseAbilitySystemConfigDefaultsInASC",NewName="/Script/UHLGAS.UHLGASSettings.bUseAbilitySystemConfigDefaultsInASC")
-
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.GetUHLAbilitySystemComponent",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.GetUHLAbilitySystemComponent")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.CreateGenericGASGameplayEffectSpec",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.CreateGenericGASGameplayEffectSpec")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.UpdateStateGameplayTags",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.UpdateStateGameplayTags")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.IsAbilityActiveByTag",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.IsAbilityActiveByTag")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.TryActivateAbilityWithTag",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.TryActivateAbilityWithTag")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.TryCancelAbilityWithTag",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.TryCancelAbilityWithTag")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.ToggleAbilityWithTag",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.ToggleAbilityWithTag")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.TryCancelAbilitiesWithTags",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.TryCancelAbilitiesWithTags")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.FireGameplayEvent",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.FireGameplayEvent")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.FindTagByString",NewName="/Script/UHLGAS.UHLGASBlueprintLibrary.FindTagByString")
-
-; UHLEditor
-+ClassRedirects=(OldName="/Script/UnrealHelperEditor.UHESettings",NewName="/Script/UHLEditor.UHLEditorSettings")
-+ClassRedirects=(OldName="/Script/UnrealHelperEditor.UHEBlueprintThumbnailRenderer",NewName="/Script/UHLEditor.UHLEditorBlueprintThumbnailRenderer")
-+StructRedirects=(OldName="/Script/UnrealHelperEditor.UHECustomClassIconDescription",NewName="/Script/UHLEditor.UHLEditorCustomClassIconDescription")
-+StructRedirects=(OldName="/Script/UnrealHelperLibrary.UHECustomClassIcon",NewName="/Script/UHLEditor.UHLEditorCustomClassIconDescription")
-+StructRedirects=(OldName="/Script/UnrealHelperEditor.UnrealHelperEditorCommands",NewName="/Script/UHLEditor.UHLEditorCommands")
-+StructRedirects=(OldName="/Script/UnrealHelperEditor.UnrealHelperEditorStyle",NewName="/Script/UHLEditor.UHLEditorStyle")
-
-+ClassRedirects=(OldName="/Script/UnrealHelperEditor.EUW_UHL_Utils",NewName="/Script/UHLEditor.EUW_UHL_Utils")
-+ClassRedirects=(OldName="/Script/UnrealHelperEditor.UHECustomThumbnail",NewName="/Script/UHLEditor.UHLEditorCustomThumbnail")
-+ClassRedirects=(OldName="/Script/UHLEditor.UHLBlueprintThumbnailRenderer",NewName="/Script/UHLEditor.UHLEditorBlueprintThumbnailRenderer")
-+EnumRedirects=(OldName="/Script/UHLAI.ESetBBValue_MathOperations",NewName="/Script/UHLAI.EUHL_MathOperations")
-
-+EnumRedirects=(OldName="/Script/UHLAI.EBBValueType",NewName="/Script/UHLAI.EBlackboardValueType")
-+StructRedirects=(OldName="/Script/UHLAI.MathOperation",NewName="/Script/UHLAI.OperationOnBBValue")
-+StructRedirects=(OldName="/Script/UHLAI.BBKeyOperation",NewName="/Script/UHLAI.OperationOnBBValue")
-
-+PropertyRedirects=(OldName="/Script/CommonMaps.CommonMapCategory.AutoSearchMapsInFolder",NewName="/Script/CommonMaps.CommonMapCategory.SearchFolder")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.AN_AttachWithUniqueId",NewName="/Script/UnrealHelperLibrary.AN_AttachActorWithUniqueId")
-+FunctionRedirects=(OldName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.IsOtherCharacterInRange",NewName="/Script/UnrealHelperLibrary.UnrealHelperLibraryBPL.InRangeToOtherCharacter")
-+StructRedirects=(OldName="/Script/UHLAI.ValueOrBBKey_GameplayTag",NewName="/Script/UHLAI.UHLValueOrBBKey_GameplayTag")
-+PropertyRedirects=(OldName="/Script/UHLGAS.UHLGameplayAbility.AddingToCacheInputRequiredTags",NewName="/Script/UHLGAS.UHLGameplayAbility.AddToCacheRequiredTags")
-+PropertyRedirects=(OldName="/Script/UHLGAS.UHLGameplayAbility.AddingToCacheInputBlockedTags",NewName="/Script/UHLGAS.UHLGameplayAbility.AddToCacheBlockedTags")
-+ClassRedirects=(OldName="/Script/UnrealHelperLibrary.ANS_SpawnAndSwitchCamera",NewName="/Script/UnrealHelperLibrary.ANS_SpawnAndSwitchPlayerCamera")
-+ClassRedirects=(OldName="/Script/UHLGAS.ANS_GlobalTimeDilation",NewName="/Script/UHLGAS.ANS_UHLGAS_GlobalTimeDilation")
-+ClassRedirects=(OldName="/Script/UHLGAS.AA_WaitAbilityActivate",NewName="/Script/UHLGAS.AA_UHLGAS_WaitAbilityActivate")
\ No newline at end of file
diff --git a/Config/FilterPlugin.ini b/Config/FilterPlugin.ini
deleted file mode 100644
index 9c78e117..00000000
--- a/Config/FilterPlugin.ini
+++ /dev/null
@@ -1,11 +0,0 @@
-[FilterPlugin]
-; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
-; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
-;
-; Examples:
-; /README.txt
-; /Extras/...
-; /Binaries/ThirdParty/*.dll
-
-/README.md
-/Config/...
\ No newline at end of file
diff --git a/Config/Tags/UnrealHeaderLibraryTags.ini b/Config/Tags/UnrealHeaderLibraryTags.ini
deleted file mode 100644
index d1a4237b..00000000
--- a/Config/Tags/UnrealHeaderLibraryTags.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[/Script/GameplayTags.GameplayTagsList]
-GameplayTagList=(Tag="UHL.Debug.InvokeGameplayAbility_Test1",DevComment="")
-GameplayTagList=(Tag="UHL.Debug.InvokeGameplayAbility_Test2",DevComment="")
diff --git a/Content/AI/BB_UHL_Base.uasset b/Content/AI/BB_UHL_Base.uasset
deleted file mode 100644
index 12b2cc33..00000000
Binary files a/Content/AI/BB_UHL_Base.uasset and /dev/null differ
diff --git a/Content/AI/BP_UHL_TestBlueprint.uasset b/Content/AI/BP_UHL_TestBlueprint.uasset
deleted file mode 100644
index 46f9472d..00000000
Binary files a/Content/AI/BP_UHL_TestBlueprint.uasset and /dev/null differ
diff --git a/Content/AI/BT_UHL_AI_Nodes.uasset b/Content/AI/BT_UHL_AI_Nodes.uasset
deleted file mode 100644
index 6e4339d6..00000000
Binary files a/Content/AI/BT_UHL_AI_Nodes.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_CheckGASGameplayTagsOnActor.uasset b/Content/AI/BehaviorTrees/BT_UHL_CheckGASGameplayTagsOnActor.uasset
deleted file mode 100644
index d9f2c818..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_CheckGASGameplayTagsOnActor.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus.uasset b/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus.uasset
deleted file mode 100644
index d4d43bae..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus_Comparison.uasset b/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus_Comparison.uasset
deleted file mode 100644
index 781e1d82..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus_Comparison.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InAngle.uasset b/Content/AI/BehaviorTrees/BT_UHL_InAngle.uasset
deleted file mode 100644
index 604e7880..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InAngle.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance.uasset b/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance.uasset
deleted file mode 100644
index cb954562..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset b/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset
deleted file mode 100644
index a8f2b089..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InAngle_Vector.uasset b/Content/AI/BehaviorTrees/BT_UHL_InAngle_Vector.uasset
deleted file mode 100644
index 71688978..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InAngle_Vector.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InRange.uasset b/Content/AI/BehaviorTrees/BT_UHL_InRange.uasset
deleted file mode 100644
index 47681679..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InRange.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule.uasset b/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule.uasset
deleted file mode 100644
index 4b3e5289..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule_Moving.uasset b/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule_Moving.uasset
deleted file mode 100644
index 1c57e525..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule_Moving.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InRange_Vector.uasset b/Content/AI/BehaviorTrees/BT_UHL_InRange_Vector.uasset
deleted file mode 100644
index 1b09142a..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InRange_Vector.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility.uasset b/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility.uasset
deleted file mode 100644
index d61801af..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility_StressTest.uasset b/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility_StressTest.uasset
deleted file mode 100644
index c97e36e0..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility_StressTest.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage.uasset b/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage.uasset
deleted file mode 100644
index 08f1d91f..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage_StressTest.uasset b/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage_StressTest.uasset
deleted file mode 100644
index 3fd38574..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage_StressTest.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_RandomChance.uasset b/Content/AI/BehaviorTrees/BT_UHL_RandomChance.uasset
deleted file mode 100644
index 49b2dd39..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_RandomChance.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_RandomChance_Scalable.uasset b/Content/AI/BehaviorTrees/BT_UHL_RandomChance_Scalable.uasset
deleted file mode 100644
index a0716c32..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_RandomChance_Scalable.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_RandomLoop.uasset b/Content/AI/BehaviorTrees/BT_UHL_RandomLoop.uasset
deleted file mode 100644
index bc174390..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_RandomLoop.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_RandomSelector.uasset b/Content/AI/BehaviorTrees/BT_UHL_RandomSelector.uasset
deleted file mode 100644
index adccc3b4..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_RandomSelector.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_RandomTimelimit.uasset b/Content/AI/BehaviorTrees/BT_UHL_RandomTimelimit.uasset
deleted file mode 100644
index 340ef69a..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_RandomTimelimit.uasset and /dev/null differ
diff --git a/Content/AI/BehaviorTrees/BT_UHL_SetBBValue.uasset b/Content/AI/BehaviorTrees/BT_UHL_SetBBValue.uasset
deleted file mode 100644
index 77c6c904..00000000
Binary files a/Content/AI/BehaviorTrees/BT_UHL_SetBBValue.uasset and /dev/null differ
diff --git a/Content/AI/Tasks/BTT_TeleportToStartPoint.uasset b/Content/AI/Tasks/BTT_TeleportToStartPoint.uasset
deleted file mode 100644
index 6afafada..00000000
Binary files a/Content/AI/Tasks/BTT_TeleportToStartPoint.uasset and /dev/null differ
diff --git a/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test1.uasset b/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test1.uasset
deleted file mode 100644
index 75b1cbf3..00000000
Binary files a/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test1.uasset and /dev/null differ
diff --git a/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test2.uasset b/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test2.uasset
deleted file mode 100644
index a98bc0e1..00000000
Binary files a/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test2.uasset and /dev/null differ
diff --git a/Content/BP_UHL_BlueprintNode.uasset b/Content/BP_UHL_BlueprintNode.uasset
deleted file mode 100644
index e1bb2e10..00000000
Binary files a/Content/BP_UHL_BlueprintNode.uasset and /dev/null differ
diff --git a/Content/Characters/Base/Animations/AM_TH_BS_Attack_1.uasset b/Content/Characters/Base/Animations/AM_TH_BS_Attack_1.uasset
deleted file mode 100644
index 0e3c73e0..00000000
Binary files a/Content/Characters/Base/Animations/AM_TH_BS_Attack_1.uasset and /dev/null differ
diff --git a/Content/Characters/Base/Animations/AM_TH_BS_Attack_2.uasset b/Content/Characters/Base/Animations/AM_TH_BS_Attack_2.uasset
deleted file mode 100644
index 47964071..00000000
Binary files a/Content/Characters/Base/Animations/AM_TH_BS_Attack_2.uasset and /dev/null differ
diff --git a/Content/Characters/Base/Animations/AS_TH_BS_Attack_1.uasset b/Content/Characters/Base/Animations/AS_TH_BS_Attack_1.uasset
deleted file mode 100644
index 95bc0abc..00000000
Binary files a/Content/Characters/Base/Animations/AS_TH_BS_Attack_1.uasset and /dev/null differ
diff --git a/Content/Characters/Base/Animations/AS_TH_BS_Attack_2.uasset b/Content/Characters/Base/Animations/AS_TH_BS_Attack_2.uasset
deleted file mode 100644
index eb487417..00000000
Binary files a/Content/Characters/Base/Animations/AS_TH_BS_Attack_2.uasset and /dev/null differ
diff --git a/Content/Characters/Base/BP_UHL_BaseCharacter.uasset b/Content/Characters/Base/BP_UHL_BaseCharacter.uasset
deleted file mode 100644
index c42aba44..00000000
Binary files a/Content/Characters/Base/BP_UHL_BaseCharacter.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/ABP_UHL_Enemy.uasset b/Content/Characters/Enemy/ABP_UHL_Enemy.uasset
deleted file mode 100644
index 8ea1b7a8..00000000
Binary files a/Content/Characters/Enemy/ABP_UHL_Enemy.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/BP_UHL_Enemy.uasset b/Content/Characters/Enemy/BP_UHL_Enemy.uasset
deleted file mode 100644
index 06335fba..00000000
Binary files a/Content/Characters/Enemy/BP_UHL_Enemy.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/BP_UHL_Enemy_BlueprintsOnly.uasset b/Content/Characters/Enemy/BP_UHL_Enemy_BlueprintsOnly.uasset
deleted file mode 100644
index bc26890f..00000000
Binary files a/Content/Characters/Enemy/BP_UHL_Enemy_BlueprintsOnly.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/BP_UHL_Enemy_GameplayFocus.uasset b/Content/Characters/Enemy/BP_UHL_Enemy_GameplayFocus.uasset
deleted file mode 100644
index 1c4c8411..00000000
Binary files a/Content/Characters/Enemy/BP_UHL_Enemy_GameplayFocus.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/BP_UHL_Enemy_InAngle.uasset b/Content/Characters/Enemy/BP_UHL_Enemy_InAngle.uasset
deleted file mode 100644
index 0415749e..00000000
Binary files a/Content/Characters/Enemy/BP_UHL_Enemy_InAngle.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/BP_UHL_Enemy_Sight_360.uasset b/Content/Characters/Enemy/BP_UHL_Enemy_Sight_360.uasset
deleted file mode 100644
index 9fa69fa9..00000000
Binary files a/Content/Characters/Enemy/BP_UHL_Enemy_Sight_360.uasset and /dev/null differ
diff --git a/Content/Characters/Enemy/M_GameplayFocus.uasset b/Content/Characters/Enemy/M_GameplayFocus.uasset
deleted file mode 100644
index 23d48ed2..00000000
Binary files a/Content/Characters/Enemy/M_GameplayFocus.uasset and /dev/null differ
diff --git a/Content/Characters/Player/AbilitySet_DefaultCharacter.uasset b/Content/Characters/Player/AbilitySet_DefaultCharacter.uasset
deleted file mode 100644
index 3cb3250d..00000000
Binary files a/Content/Characters/Player/AbilitySet_DefaultCharacter.uasset and /dev/null differ
diff --git a/Content/Characters/Player/AbilitySet_Test.uasset b/Content/Characters/Player/AbilitySet_Test.uasset
deleted file mode 100644
index 75716576..00000000
Binary files a/Content/Characters/Player/AbilitySet_Test.uasset and /dev/null differ
diff --git a/Content/Characters/Player/AbilitySet_UHL_DefaultCharacter.uasset b/Content/Characters/Player/AbilitySet_UHL_DefaultCharacter.uasset
deleted file mode 100644
index 41245ca9..00000000
Binary files a/Content/Characters/Player/AbilitySet_UHL_DefaultCharacter.uasset and /dev/null differ
diff --git a/Content/Characters/Player/BP_UHL_Player.uasset b/Content/Characters/Player/BP_UHL_Player.uasset
deleted file mode 100644
index 2bff9152..00000000
Binary files a/Content/Characters/Player/BP_UHL_Player.uasset and /dev/null differ
diff --git a/Content/Characters/Player/DA_AbilitySet.uasset b/Content/Characters/Player/DA_AbilitySet.uasset
deleted file mode 100644
index 9fa9158b..00000000
Binary files a/Content/Characters/Player/DA_AbilitySet.uasset and /dev/null differ
diff --git a/Content/Characters/Player/DA_AbilitySystem_UHL_Player.uasset b/Content/Characters/Player/DA_AbilitySystem_UHL_Player.uasset
deleted file mode 100644
index 53e1de9a..00000000
Binary files a/Content/Characters/Player/DA_AbilitySystem_UHL_Player.uasset and /dev/null differ
diff --git a/Content/Core/GM_UnrealHelperLibrary.uasset b/Content/Core/GM_UnrealHelperLibrary.uasset
deleted file mode 100644
index db69b223..00000000
Binary files a/Content/Core/GM_UnrealHelperLibrary.uasset and /dev/null differ
diff --git a/Content/Core/PC_UnrealHelperLibrary.uasset b/Content/Core/PC_UnrealHelperLibrary.uasset
deleted file mode 100644
index 348abdb8..00000000
Binary files a/Content/Core/PC_UnrealHelperLibrary.uasset and /dev/null differ
diff --git a/Content/Data/CT_RandomChance_Scalable.uasset b/Content/Data/CT_RandomChance_Scalable.uasset
deleted file mode 100644
index fb1ea81b..00000000
Binary files a/Content/Data/CT_RandomChance_Scalable.uasset and /dev/null differ
diff --git a/Content/Data/DT_Abilities.uasset b/Content/Data/DT_Abilities.uasset
deleted file mode 100644
index 43b46039..00000000
Binary files a/Content/Data/DT_Abilities.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_Dummy.uasset b/Content/Gyms/Angles/BP_Dummy.uasset
deleted file mode 100644
index f636a1fa..00000000
Binary files a/Content/Gyms/Angles/BP_Dummy.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_GetPointAtRelativeAngle.uasset b/Content/Gyms/Angles/BP_GetPointAtRelativeAngle.uasset
deleted file mode 100644
index 544360d5..00000000
Binary files a/Content/Gyms/Angles/BP_GetPointAtRelativeAngle.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_GetPointAtRelativeAngleBetweenActors.uasset b/Content/Gyms/Angles/BP_GetPointAtRelativeAngleBetweenActors.uasset
deleted file mode 100644
index bbb242c9..00000000
Binary files a/Content/Gyms/Angles/BP_GetPointAtRelativeAngleBetweenActors.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_GetPointAtRelativeDirection.uasset b/Content/Gyms/Angles/BP_GetPointAtRelativeDirection.uasset
deleted file mode 100644
index 0763d847..00000000
Binary files a/Content/Gyms/Angles/BP_GetPointAtRelativeDirection.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_GetPointAtRelativeDirectionBetweenActors.uasset b/Content/Gyms/Angles/BP_GetPointAtRelativeDirectionBetweenActors.uasset
deleted file mode 100644
index f17212b1..00000000
Binary files a/Content/Gyms/Angles/BP_GetPointAtRelativeDirectionBetweenActors.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_GetRelativeAngle.uasset b/Content/Gyms/Angles/BP_GetRelativeAngle.uasset
deleted file mode 100644
index 529ef503..00000000
Binary files a/Content/Gyms/Angles/BP_GetRelativeAngle.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/BP_RelativeAngle.uasset b/Content/Gyms/Angles/BP_RelativeAngle.uasset
deleted file mode 100644
index 28e6e1f6..00000000
Binary files a/Content/Gyms/Angles/BP_RelativeAngle.uasset and /dev/null differ
diff --git a/Content/Gyms/Angles/Gym_UHL_Angles.umap b/Content/Gyms/Angles/Gym_UHL_Angles.umap
deleted file mode 100644
index ed213c23..00000000
Binary files a/Content/Gyms/Angles/Gym_UHL_Angles.umap and /dev/null differ
diff --git a/Content/Gyms/Gym_UHL_AI.umap b/Content/Gyms/Gym_UHL_AI.umap
deleted file mode 100644
index f72c80b2..00000000
Binary files a/Content/Gyms/Gym_UHL_AI.umap and /dev/null differ
diff --git a/Content/Gyms/Gym_UHL_Angles.umap b/Content/Gyms/Gym_UHL_Angles.umap
deleted file mode 100644
index f7553950..00000000
Binary files a/Content/Gyms/Gym_UHL_Angles.umap and /dev/null differ
diff --git a/Content/Gyms/Gym_UHL_GAS.umap b/Content/Gyms/Gym_UHL_GAS.umap
deleted file mode 100644
index 705170d8..00000000
Binary files a/Content/Gyms/Gym_UHL_GAS.umap and /dev/null differ
diff --git a/Content/Gyms/Gym_UHL_InvokeGameplayAbility.umap b/Content/Gyms/Gym_UHL_InvokeGameplayAbility.umap
deleted file mode 100644
index b1b7b34f..00000000
Binary files a/Content/Gyms/Gym_UHL_InvokeGameplayAbility.umap and /dev/null differ
diff --git a/Content/Gyms/Gym_UHL_PlayAnimMontage_StressTest.umap b/Content/Gyms/Gym_UHL_PlayAnimMontage_StressTest.umap
deleted file mode 100644
index ad016422..00000000
Binary files a/Content/Gyms/Gym_UHL_PlayAnimMontage_StressTest.umap and /dev/null differ
diff --git a/Content/Input/Actions/IA_DebugMenu.uasset b/Content/Input/Actions/IA_DebugMenu.uasset
deleted file mode 100644
index e6dcd9ac..00000000
Binary files a/Content/Input/Actions/IA_DebugMenu.uasset and /dev/null differ
diff --git a/Content/Input/Actions/IA_Jump.uasset b/Content/Input/Actions/IA_Jump.uasset
deleted file mode 100644
index fac64cda..00000000
Binary files a/Content/Input/Actions/IA_Jump.uasset and /dev/null differ
diff --git a/Content/Input/Actions/IA_LookMouse.uasset b/Content/Input/Actions/IA_LookMouse.uasset
deleted file mode 100644
index 70c3e855..00000000
Binary files a/Content/Input/Actions/IA_LookMouse.uasset and /dev/null differ
diff --git a/Content/Input/Actions/IA_LookStick.uasset b/Content/Input/Actions/IA_LookStick.uasset
deleted file mode 100644
index d47487e4..00000000
Binary files a/Content/Input/Actions/IA_LookStick.uasset and /dev/null differ
diff --git a/Content/Input/Actions/IA_Move.uasset b/Content/Input/Actions/IA_Move.uasset
deleted file mode 100644
index e6647a49..00000000
Binary files a/Content/Input/Actions/IA_Move.uasset and /dev/null differ
diff --git a/Content/Input/Configs/IMC_UHL_GamePad_Default.uasset b/Content/Input/Configs/IMC_UHL_GamePad_Default.uasset
deleted file mode 100644
index 9457ebf8..00000000
Binary files a/Content/Input/Configs/IMC_UHL_GamePad_Default.uasset and /dev/null differ
diff --git a/Content/Input/Configs/IMC_UHL_KBM_Default.uasset b/Content/Input/Configs/IMC_UHL_KBM_Default.uasset
deleted file mode 100644
index 5ac0865b..00000000
Binary files a/Content/Input/Configs/IMC_UHL_KBM_Default.uasset and /dev/null differ
diff --git a/Content/Subsystems/DebugSubsystem/DCC_AbilitySystem_Default.uasset b/Content/Subsystems/DebugSubsystem/DCC_AbilitySystem_Default.uasset
deleted file mode 100644
index 9a5a6694..00000000
Binary files a/Content/Subsystems/DebugSubsystem/DCC_AbilitySystem_Default.uasset and /dev/null differ
diff --git a/Content/Subsystems/DebugSubsystem/DCC_ShowDebugReset.uasset b/Content/Subsystems/DebugSubsystem/DCC_ShowDebugReset.uasset
deleted file mode 100644
index e93c6daf..00000000
Binary files a/Content/Subsystems/DebugSubsystem/DCC_ShowDebugReset.uasset and /dev/null differ
diff --git a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_AO.uasset b/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_AO.uasset
deleted file mode 100644
index 44c358e1..00000000
Binary files a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_AO.uasset and /dev/null differ
diff --git a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_metallic.uasset b/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_metallic.uasset
deleted file mode 100644
index 6f3c5cc8..00000000
Binary files a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_metallic.uasset and /dev/null differ
diff --git a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_roughness.uasset b/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_roughness.uasset
deleted file mode 100644
index 8d7a3b0a..00000000
Binary files a/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_roughness.uasset and /dev/null differ
diff --git a/Content/Tools/ConvertToORM/TG_ConvertToORM.uasset b/Content/Tools/ConvertToORM/TG_ConvertToORM.uasset
deleted file mode 100644
index 79b394cb..00000000
Binary files a/Content/Tools/ConvertToORM/TG_ConvertToORM.uasset and /dev/null differ
diff --git a/Content/Tools/EUW_UHL_Utils.uasset b/Content/Tools/EUW_UHL_Utils.uasset
deleted file mode 100644
index c5a750f2..00000000
Binary files a/Content/Tools/EUW_UHL_Utils.uasset and /dev/null differ
diff --git a/Content/UI/SB_DrawDebugBar_Test.uasset b/Content/UI/SB_DrawDebugBar_Test.uasset
deleted file mode 100644
index 3ced88d6..00000000
Binary files a/Content/UI/SB_DrawDebugBar_Test.uasset and /dev/null differ
diff --git a/Content/UI/UI_DebugMenu.uasset b/Content/UI/UI_DebugMenu.uasset
deleted file mode 100644
index ded7848d..00000000
Binary files a/Content/UI/UI_DebugMenu.uasset and /dev/null differ
diff --git a/Content/UI/UI_UHL_DebugWidget.uasset b/Content/UI/UI_UHL_DebugWidget.uasset
deleted file mode 100644
index 6dba96b2..00000000
Binary files a/Content/UI/UI_UHL_DebugWidget.uasset and /dev/null differ
diff --git a/Content/UI/WBP_DrawDebugBar_Test.uasset b/Content/UI/WBP_DrawDebugBar_Test.uasset
deleted file mode 100644
index dbb45c1d..00000000
Binary files a/Content/UI/WBP_DrawDebugBar_Test.uasset and /dev/null differ
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 4f0497d1..00000000
--- a/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2024 Pavel Penkov
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/README.md b/README.md
index e4ac9372..08934185 100644
--- a/README.md
+++ b/README.md
@@ -14,88 +14,60 @@ Support: `UE5.5 (main)`, `UE5.4 (branch UE5.4)`

-## ✨ Features
+## ✨ Plugins and features
-- AI nodes
- - `GameplayFocus` - set focus on actor
- - `RandomChance` - randomize actions
+- [UHL](https://github.com/Ciberusps/UHL) - utility functions like `GetProjectVersion`, `GetAssetsOfClass`, `GetHighestPoint`. Editor - editor customization, e.g. `Custom thumnails`, `Custom class icon`
+- [UHLGAS](https://github.com/Ciberusps/UHLGAS) -
+- [UHLAI](https://github.com/Ciberusps/UHLAI) -
+- [UHLBehaviorTrees](https://github.com/Ciberusps/UHLBehaviorTrees) & [UHLStateTree](https://github.com/Ciberusps/UHLStateTree) - AI nodes
+ - `SetGameplayFocus` - set focus on actor
- `InRange` - check distance to enemy
- `InAngle` - check angle to enemy
- `PlayAnimMontage` - play attack animation
- - `SetBBValue` - set blackboard value
- - `DebugPrintBBValue` - print blackboard value
- - `DebugPrintString` - print string on screen
- `InvokeGameplayAbility` - activate/deactivate GAS Gameplay Ability by tag, with optional "wait for finishing"
- `TurnTo` - turn enemy using turn animations
-- GAS - Lyra based inputs, ability system component, ability system config, input cache, attribute set, ability sets
-- **GAS** strong Lyra based toolset for quick start with GAS and scalable for big projects
-- GAS abilities input binding using tags based on Lyra and enhanced with real project needs
-- GameplayTags based **DebugSystem**
-- Utils - utility functions for your game, e.g. `GetProjectVersion`, `GetAssetsOfClass`, `GetHighestPoint`
-- Editor - editor customization, e.g. `Custom thumnails`, `Custom class icon`
+- [UHLCommonMaps](https://github.com/Ciberusps/UHLCommonMaps)
+- [UHLDebugSystem](https://github.com/Ciberusps/UHLDebugSystem)
-## 🚀 Install
-#### From source (recommended):
+## 🚀 Install & ⬆️ Update
-- add git submodule to your plugins folder
+### From source (recommended)
- ```bash
- git submodule add https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
- ```
+```bash
+// install as git submodule to your plugins folder
+git submodule add https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
--
- C++ setup, old engine versions
-
- - to use C++ things add code to file `.Build.cs`
-
- ```C#
- // .Build.cs
- public GameName(ReadOnlyTargetRules Target) : base(Target)
- {
- PublicDependencyModuleNames.AddRange(new string[] {
- // add "UnrealHelperLibrary" to use it in C++
- "UnrealHelperLibrary",
- });
-
- // OPTIONALLY add "UnrealHelperEditor" module to use custom unreal engine editor features
- if (Target.bBuildEditor)
- {
- PrivateDependencyModuleNames.AddRange(new string[] { "UnrealHelperEditor" });
- }
- }
- ```
-
- - to use specific engine version specify branch e.g. `-b UE5.4`
-
- ```bash
- git submodule add -b UE5.4 https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
- ```
+// to update plugin
+git submodule update --init --recursive --checkout
+```
- - to use specific engine version specify branch e.g. `-b UE5.4`
+or install all plugins as independent plugins
- ```bash
- git submodule add -b UE5.4 https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
- ```
+```bash
+git submodule add https://github.com/Ciberusps/UHL.git ./Plugins/UHL
+git submodule add https://github.com/Ciberusps/UHLGAS.git ./Plugins/UHLGAS
+git submodule add https://github.com/Ciberusps/UHLAI.git ./Plugins/UHLAI
+git submodule add https://github.com/Ciberusps/UHLStateTree.git ./Plugins/UHLStateTree
+git submodule add https://github.com/Ciberusps/UHLBehaviorTree.git ./Plugins/UHLBehaviorTree
+git submodule add https://github.com/Ciberusps/UHLCharacter.git ./Plugins/UHLCharacter
+git submodule add https://github.com/Ciberusps/UHLCommonMaps.git ./Plugins/UHLCommonMaps
+git submodule add https://github.com/Ciberusps/UHLDebugSystem.git ./Plugins/UHLDebugSystem
- > [!NOTE]
- > Don't forget to update your `README.md` with instructions on how to setup - `git submodule update --init --recursive` and how to update submodules/plugin(s) - `git submodule update --remote`
+// to update plugins
+git submodule update --init --remote --recursive
+```
- > [!NOTE]
- > Add `Editor Preferences -> Force Compilation on Startup` in `Config/EditorPerProjectUserSettings.ini` your team don't want to recompile plugin manually 😉
+> [!NOTE]
+> Don't forget to update your `README.md` with instructions on how to setup - `git submodule update --init --recursive` and how to update submodules/plugin(s) - `git submodule update --remote`
-
+> [!NOTE]
+> Add `Editor Preferences -> Force Compilation on Startup` in `Config/EditorPerProjectUserSettings.ini` your team don't want to recompile plugin manually 😉
-#### From marketplace:
+### From marketplace
https://www.fab.com/listings/9f7d82e9-bc72-42ff-b302-b3d6562bd4c8
-## ⬆️ Update
-
-From source:
-
-- `git submodule update --remote` to update plugin from source
-
## 🧩 Modules
UHL consists of 3 modules:
@@ -110,746 +82,67 @@ UHL consists of 3 modules:
AI nodes for behavior tree, based on `BehaviorTree` and `BehaviorTreeComponent` from `UE5.4` and `UE5.5` with some improvements and additional features
-> - Components
-> - [AIPerceptionComponent](#uhlaiperceptioncomponent)
-> - Composite
-> - [RandomSelector](#btc_randomselector)
-> - Services
-> - [GameplayFocus](#setgameplayfocus)
-> - Decorators
-> - [CheckGASGameplayTagsOnActor](#checkgasgameplaytagsonactor)
-> - [InAngle](#inangle)
-> - [InRange](#inrange)
-> - [LoopRandomCount](#looprandomcount)
-> - [RandomChance](#randomchance)
-> - [TimeLimitRandom](#timelimitrandom)
-> - Tasks
-> - [SetBBValue](#setbbvalue)
-> - [DebugPrintBBValue](#debugprintbbvalue)
-> - [DebugPrintString](#debugprintstring)
-> - [InvokeGameplayAbility](#invokegameplayability)
-> - [PlayAnimMontage](#playanimmontage)
-> - [TurnTo](#turnto)
-
**[💪 GAS](#-gas-gameplay-ability-system)**
Gameplay Ability System - Lyra based inputs, ability system component, ability system config, input cache, attribute set, ability sets
-> - Components
-> - [AbilitySystemComponent](#abilitysystemcomponent)
-> - [InputConfig (GAS abilities input binding)](#inputconfig-gas-abilities-input-binding)
-> - [AbilityInputCache (beta)](#abilityinputcache)
-> - [GameplayAbility](#gameplayability)
-> - [AttributeSet](#attributeset)
-> - [AbilitySet](#abilityset)
-> - [AbilitySystem Config](#abilitysystem-config)
-> - Tasks
-> - [InterpolateToPosition](#interpolatetoposition)
-> - AbilityAsync tasks (AbilityAsync versions of GAS UAbilityTask's, AbilityAsync available in blueprints)
-> - WaitForAbilityActivate
-> - WaitForAbilityActivateWithTagRequirements
-> - WaitForAbilityActivate_Query
-> - [UHLGASBlueprintLibrary](#uhlgasblueprintlibrary)
-> - [TryActivateAbilityWithTag](#tryactivateabilitywithtag)
-> - [TryCancelAbilityWithTag](#trycancelabilitywithtag)
-> - [TryCancelAbilitiesWithTags](#trycancelabilitieswithtags)
-> - [FireGameplayEvent](#firegameplayevent)
-> - [UpdateStateGameplayTags](#updatestategameplaytags)
-> - [FindTagByString](#findtagbystring)
-> - [GetUHLAbilitySystemComponent](#getuhlabilitysystemcomponent)
-> - [CreateGenericGASGameplayEffectSpec](#creategenericgasgameplayeffectspec)
**[🦸 Character](#character)**
Default character class with UHL interfaces implemented, so you don't need to do it by yourself
-> - [BaseCharacterWithASC](#basecharacterwithasc) (recommended for start)
-> - [BaseCharacter](#basecharacter)
**[🪲 DebugSystem](#-debugsystem)**
Debug system for your game, in mid-size commands you always use limited set of debugging tools
-> - Settings
-> - [DebugSystemSettings](#debugsystemsettings)
-> - Subsystem
-> - [UHLDebugSystemSubsystem](#uhldebugsystemsubsystem)
-> - AsyncActions
-> - [WaitDebugCategoryChange](#aa_waitdebugcategorychange)
-> - [DebugBlueprintLibrary](#debugblueprintlibrary)
-> - [IsUHLDebugCategoryEnabled](#isuhldebugcategoryenabled)
-
**[📚 UnrealHelperLibrary](#unrealhelperlibrarybpl)**
-> - [UnrealHelperLibraryBPL](#unrealhelperlibrarybpl)
-> - Gameplay
-> - GetActorClosestToCenterOfScreen
-> - GetMostDistantActor
->
-> - RelativeAngles
-> - [RelativeAngleToActor](#relativeangletoactor)
-> - [GetPointAtRelativeAngle](#getpointatrelativeangle)
-> - [GetPointAtRelativeDirection](#getpointatrelativedirection)
-> - [GetPointAtAngleRelativeToOtherActor](#getpointatanglerelativetootheractor)
-> - [GetPointAtDirectionRelativeToOtherActor](#getpointatdirectionrelativetootheractor)
-> - [DirectionToAngle](#directiontoangle)
-> - UI/Screen
-> - GetViewportSizeUnscaled
-> - Misc
-> - [GetProjectVersion](#getprojectversion)
-> - [GetNamesOfComponentsOnObject](#getnamesofcomponentsonobject)
-> - [GetAssetsOfClass](#getassetsofclass)
-> - GetBuildType
->
->
-> - Debug
-> - DrawDebugLineOnCanvas
-> - Other
-> - [GetHighestPoint](#gethighestpoint)
-> - [LoadingUtilLibrary](#loadingutillibrary)
-> - [ApplyDefaultPriorityLoading](#applydefaultpriorityloading)
-> - [ApplyStreamingPriorityLoading](#applystreamingpriorityloading)
-> - [ApplyHighestPriorityLoading](#applyhighestpriorityloading)
-> - [ApplyCustomPriorityLoading](#applycustompriorityloading)
-> - [ForceGarbageCollection](#forcegarbagecollection)
-> - [FlushLevelStreaming](#flushlevelstreaming)
-> - [TraceUtilsBPL](#traceutilsbpl)
-> - SweepCapsuleSingleByChannel
-> - [Settings](#settings)
-> - [UHL Settings](#uhl-settings)
-> - [Subsystems](#subsystems)
-> - [UHLHUD](#uhlhud)
-> - AnimNotifyState (ANS)
-> - [ANS_UHL_Base](#ans_uhl_base)
-> - [ANS_ActivateAbility](#ans_activateability)
**[⌨ Editor](#-uhl-editor)**
-> - [Custom thumnails](#custom-thumnails)
-> - [Custom class icon](#custom-class-icon)
-> - [UHL Utils (Editor Utility Widget)](#uhl-utils-editor-utility-widget)
-> - [ConvertToORM](#converttoorm)
-
----
-
-### 🧠 AI
-
-UHL provides most needed AI nodes toolset for developing at least 3d-action AI - GameplayFocus, Random choices using RandomChance and RandomSelector, PlayAnimMontage to play attacks animations, InRange and InAngle to check distance to enemy and required angle
-
-
-#### `UHLAIPerceptionComponent`
-
-⚒️ InProgress
-
-#### `BTC_RandomSelector`
-
-Select random child node using weights
-
-
-
-
- With cool validations
-
-#### Warns if summary of weights > 1
-
-
-
-#### Warns if chances array have more items then child nodes
-
-
-
-#### Shows error if child nodes count > than chances count
-
-
-
-
-
-#### `CheckGASGameplayTagsOnActor`
-
-**BTD_CheckGASGameplayTagsOnActor** - checks that actor has GAS gameplay tags specified.
-
-> [!WARNING]
-> Don't mess with `UBTDecorator_CheckGameplayTagsOnActor` - its only checks `GameplayTags` on actor itself not on `AbilitySystem`.
-
-Requirements:
-
-- actor should implement `IAbilitySystemInterface` to get `AbilitySystemComponent`
-
-
-
-#### `InAngle`
-
-**BTD_InAngle** - decorator to check is enemy in one of specified angle ranges. Useful in developing big enemies, for example we developing dragon we want to know is player under the right wing or leg, is player in front of dragon or behind and so on.
-
-
-
-#### `InRange`
-
-**BTD_InRange** - decorator to check distance between actors. Compliant with "MoveTo" node have same settings `bIncludeSelfCapsuleRadius` and `bIncludeTargetCapsuleRadius` to check distance excluding capsules radiuses
-
-
-
-
-#### `LoopRandomCount`
-
-**BTD_LoopRandomCount** - randomized version of decorator `Loop`
-
-
-
-#### `TimeLimitRandom`
-
-**BTD_TimeLimitRandom** - randomized version of decorator `TimeLimit`
-
-
-
-#### `RandomChance`
-
-**BTD_RandomChance** - commonly used decorator to randomize actions. Fine for single child node, extra bad for multiple nodes due to chance regression, for randomization between multiple child nodes better to use [RandomSelector](#btc_randomselector)
-
-
-
-#### `SetGameplayFocus`
-
-**BTS_SetGameplayFocus** - alternative for "Set default focus". SetGameplayFocus made right way - prevents rotation jittering while enemy rotation.
-One of most common problems that anybody stucks when starting developing AI - "focus dont work"/"focus works wrong".
-
-
-
-
-Requirements:
-
-- turn on `UseControllerDesiredRotation`
-- turn off
- - `bOrientRotationToMovement`
- - `UseControllerRotationYaw`
- - `UseControllerRotationPitch`
- - `UseControllerRotationRoll`
-
-
-Troubleshooting:
-
-- check that nothing "ClearFocus"
-- check that MoveTo uses "AllowStafe"
-
-#### `SetBBValue`
-
-**BTT_SetBBValue** - helps settings values in blackboard, supports all blackboard types and for some values event provides opportunity to make calculations like `int`
-
-
-
-#### `DebugPrintBBValue`
-
-**BTT_DebugPrintBBValue** - prints BB value of any type
-
-
-
-#### `DebugPrintString`
-
-**BTT_DebugPrintString** - simple task for printing debug info on screen
-
-
-
-#### `InvokeGameplayAbility`
-
-**BTT_InvokeGameplayAbility** - activate/deactivate GAS Gameplay Ability by tag, with optional "wait for finishing"
-
-
-
-#### `PlayAnimMontage`
-
-**BTT_PlayAnimMontage** - play anim montage with option to customize PlayRate, Starting Position, Start Section Name and stopping montage on task abort
-
-
-
-#### `TurnTo`
-
-**BTT_TurnTo** - turn to enemy using turn animations
-Drop in replacement for "RotateToFaceBBEntry" but with option to "RotateTo" with animations
-To get settings from actor requires `IUHLActorSettings` to be implemented on character
-
----
-
-### 💪 GAS (Gameplay Ability System)
-
-Many GAS-related things based on "Lyra" sample project.
-
-#### `AbilitySystemComponent`
-
-
-
-**UHLAbilitySystemComponent** - for quick start with GAS. You can nest from it on start and than turn off its functions when you ready to replace them with your custom solution.
-
-Features:
-
-- set `InitialAttributes`
-- give `Abilities` on start
-- activate `InitialActiveAbilities`
-- apply `InitialGameplayTags`
-- "Lyra"-like "InputConfig", GAS abilities input binding
-
-Setup:
-
-##### Option 1 - zero setup
-
-Easy way with zero setup, just nest your character from `AUHLBaseCharacterWithASC`, fits new projects
-there you don't want to waste time at all.
-
-##### Option 2 - BP way
-
-Easy way - just add `UHLAbilitySystemComponent` to your character and call `InitAbilitySystem` on `BeginPlay`/`Possessed`
-
-
-
-##### Option 3 - C++
-
-A bit harder and requires small C++ work, fits for projects with GAS already integrated.
-Follow instructions below or just check `AUHLBaseCharacterWithASC` example
-
-```C++
-AUHLBaseCharacterWithASC::AUHLBaseCharacterWithASC(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- // create AbilitySystemComponent if you don't have it
- AbilitySystemComponent = CreateDefaultSubobject(TEXT("UHLAbilitySystem"));
-}
-
-void AUHLBaseCharacterWithASC::PossessedBy(AController* NewController)
-{
- Super::PossessedBy(NewController);
-
- // init AbilitySystem
- AbilitySystemComponent->InitAbilitySystem(NewController, this);
-}
-```
-
-If you want custom attributes init you can do it
-
-- by overriding `InitAttributes_Implementation` - recommended
-- or just don't activate abilities `AbilitySystemComponent->InitAbilitySystem(NewController, this, false)` and make your own attributes init, and then call `AbilitySystemComponent->ActivateInitialAbilities()`
-
-You have 3 levels of advancement using GAS with UHL
-
-1) entry - just using abilities/attributes in your character on start of a project
-2) when you understand that you want to share some abilities to other characters - use [AbilitySets](#abilityset)
-3) when your team grows and you understand that locking whole character just to add ability is or change some ability system settings is too much - use [AbilitySystem Config](#abilitysystem-config) and optionally defaults in UHLSettings
-
-
-
-
-#### InputConfig (GAS abilities input binding)
-
-Binding InputActions to GameplayAbilities using tags, based on `Lyra` but enhanced and adopted for 3D action game.
-
-
-
-##### Setup
-
-- turn on `bUseInputConfig` on `UHLAbilitySystemComponent`
-- create `InputConfig` - `DataAsset` nested from `UHLInputConfig`
-- add `InputConfig` to your character `UHLAbilitySystemComponent`
-- in `Project Settings -> Input -> Default Input Component Class` -> set `UHLInputComponent`
-- in your PlayerCharacter class add lines in `SetupPlayerInputComponent` for binding actions from `InputConfig`
-
-For now only C++ setup tested (blueprint option will be later)
-
-```C++
-// Your PlayerCharacter class
-void AUHLPlayerCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
-{
- Super::SetupPlayerInputComponent(PlayerInputComponent);
-
- UUHLInputComponent* UHLInputComponent = CastChecked(PlayerInputComponent);
- UUHLInputConfig* UHLInputConfig = AbilitySystemComponent->InputConfig;
- TArray BindHandles;
- UHLInputComponent->BindAbilityActions(UHLInputConfig, AbilitySystemComponent, &UUHLAbilitySystemComponent::AbilityInputTagPressed, &UUHLAbilitySystemComponent::AbilityInputTagReleased, BindHandles);
-
- // optional
- // if (UHLInputComponent)
- // {
- // UHLInputComponent->BindAction(UHLInputConfig->NativeInputAction_Move.InputAction, ETriggerEvent::Triggered, this, &AUHLPlayerCharacter::InputMove);
- // UHLInputComponent->BindAction(UHLInputConfig->NativeInputAction_Move.InputAction, ETriggerEvent::Completed, this, &AUHLPlayerCharacter::InputStopMove);
-
- // UHLInputComponent->BindAction(UHLInputConfig->NativeInputAction_LookMouse.InputAction, ETriggerEvent::Triggered, this, &AUHLPlayerCharacter::InputLook);
- // UHLInputComponent->BindAction(UHLInputConfig->NativeInputAction_LookStick.InputAction, ETriggerEvent::Triggered, this, &AUHLPlayerCharacter::InputLook);
- // }
-}
-```
-
-- in your PlayerController class add
-
-```c++
-// Your PlayerController.cpp
-void AUHLPlayerController::OnPossess(APawn* InPawn)
-{
- Super::OnPossess(InPawn);
-
- CachedPlayerCharacter = Cast(InPawn);
-}
-
-void AUHLPlayerController::PostProcessInput(const float DeltaTime, const bool bGamePaused)
-{
- Super::PostProcessInput(DeltaTime, bGamePaused);
-
- if (!CachedPlayerCharacter.IsValid()) return;
-
- if (UUHLAbilitySystemComponent* ASC = CachedPlayerCharacter.Get()->GetUHLAbilitySystemComponent())
- {
- ASC->ProcessAbilityInput(DeltaTime, bGamePaused);
- }
-}
-
-
-// Your PlayerController.h
-UCLASS()
-class UHL_API AUHLPlayerController : public APlayerController
-{
- GENERATED_BODY()
-
-protected:
- virtual void OnPossess(APawn* InPawn) override;
- virtual void PostProcessInput(const float DeltaTime, const bool bGamePaused) override;
-
-private:
- TWeakObjectPtr CachedPlayerCharacter;
-};
-```
-
-- now create `InputAction`(IA) and map it in your `InputMappingContext`(IMC)
-- add `InputAction` to created `InputConfig` and map it to `AbilityTags`
-- now Abilities associated with `AbilityTags` will activates when `InputAction` triggered
-- WARN! abilities should nest from `UHLGameplayAbility` for `ActivationPolicy` work correctly
-- to controll ability activation, every `UHLGameplayAbility` have `ActivationPolicy`
- - `OnInputTriggered` - will activate when InputAction triggered
- - `WhileInputActive` - activates ability when input pressed and deactivates when input released
- - `OnSpawn` - activates ability when it gived(granted) to character
-
-#### AbilityInputCache
-
-`AbilityInputCache` (beta) - caches abilities activation. If you want to have input quality like in AAA games when you need cache some inputs and fire whem when its available. Abilities/Inputs to cache may vary depending on project e.g. for 3D actions(souls-likes, slashers) its critical, for shooters less important
-
-> [!WARN]
-> dont work without [UHLAbilitySystemComponent](#abilitysystemcomponent) and [InputConfig](#inputconfig-gas-abilities-input-binding) enabled
-
-
-
-##### Setup:
-
-Instructions here provided with souls-like developing background. Remember you can control `AbilityInputCache` wherever `ASC(AbilitySystemComponent)` is available just take `AbilityInputCache` from `ASC` and call `AddTagToCache`, `CheckCache`, `ClearCache`.... If you need "input window" just add `UHL.AbilityInputCache.Catching` on your character by hand and remove when window not required
-
-- activate `bUseAbilityInputCache` in `UHLAbilitySystemComponent`
-- [optionaly] strongly recommended to activate `bUseInputCacheWindows` also. If `bUseInputCacheWindows` not activated any GameplayAbility marked with `bInputCache` that you try to activate in any time on fail will be added to `AbilityInputCache` thats not what you want in 3D action game
-- in `GameplayAbility` that you want to cache activate `bInputCache` and fill if required
- - `AddingToCacheInputRequiredTags` - tags that required to be on your character for this ability to be added to `AbilityInputCache`
- - `AddingToCacheInputBlockedTags` - tags that blocks adding this ability to `AbilityInputCache`
-- prepare you attack animation - add anim notifies
- - `ANS_CatchToAbilityInputCache` - to mark when its possible to cache ability. Best practice - leave some frames on start(5-10frames at least) and finish when your "BlockAction" end
- - `ANS_CheckAbilityInputCache` - when you want to check cache and activate ability. Best practice - on end of "BlockAction" with 5-10frames duration
-
-##### Debug:
-
-- activate `AbilityInputCache` debug category in [DebugSystem](#-debugsystem) from
- - `ProjectSettings -> UHL DebugSubsystem Settings`
- - or in runtime via `UHLDebugCategoriesListWidget`
-- write in console `ToggleAbilityInputDebug`, don't forget to add `ProcessConsoleExec` to your `GameInstance` or it won't work
-
-#### AttributeSet
-
-Just class with default things that every `AttributeSet` wants like `ATTRIBUTE_ACCESSORS`. Nest your `AttributeSets` from it to not duplicate same things other and other again.
-
-#### AbilitySet
-
-"Lyra"-like set of `Abilities, AttributeSets, GameplayEffects`, that can be added to character and removed later by tag
-
-
-
-AbilitySet - is second level of advancement of using GAS in UHL, when you understand that you want to
-share some abilities to other characters - use AbilitySets
-
-Use cases:
-
-- gived by external source using or `AbilitySet->GiveToAbilitySystem` and removed by external source via `AbilitySetGrantedHandles.TakeFromAbilitySystem`
-- gived by external source using `ASC->GiveAbilitySet(UUHLAbilitySet* AbilitySet)` and removed by tag calling `ASC->RemoveAbilitySetByTag()`, of course if tag associated with set by defining `AbilitySetTags` in `AbilitySet`
-
-#### AbilitySystem Config
-
-DataAsset - option for teams to edit `AbilitySystem` config externally to not locking character
-for just changing abilities/initial attributes
-
-
-
-Defaults can be changed in `ProjectSettings -> UHL Settings`
-
-#### GameplayAbility
-
-Additional events - OnSpawn
-
-Activation policy - InputTriggered, WhileInputActive, OnSpawn
-
-InputCache - to use it required to nest from GameplayAbility
-
-#### `InterpolateToPosition`
-
-**AT_InterpolateToPosition** - interpolate actor to specified position/rotation at a predetermined amount of time
-
-
-
-#### `UHLGASBlueprintLibrary`
-
-##### TryActivateAbilityWithTag
-
-##### TryCancelAbilityWithTag
-
-##### TryCancelAbilitiesWithTags
-
-##### FireGameplayEvent
-
-##### UpdateStateGameplayTags
-
-##### FindTagByString
-
-##### GetUHLAbilitySystemComponent
-
-##### CreateGenericGASGameplayEffectSpec
-
-#### `ANS_ActivateAbility`
-
-**ANS_ActivateAbility** - commonly used ANS that just activate ability on start and deactivate on end
-
-
-
-- `GameplayAbilityTag` - tag associated with ability to activate
-- `bDeactivateOnMontageBlendingOut` - should ability deactivates on montage blends out
-- `bAllowRemoteActivation` - you can allow remote activation
-
-
-
---
-### 🦸 Character
-
-Default characters classess with UHL interfaces implemented, so you don't need to do it by yourself
-
-#### `BaseCharacterWithASC`
-
-**UHLBaseCharacterWithASC** - recommended BaseCharacter for start - ASC created on start and
-inited on `PossessedBy`. Can be turned off by disabling `bInitUHLAbilitySystemOnPosses`
-
-#### `BaseCharacter`
-
-**UHLBaseCharacter** - simplest BaseCharacter with only UHL interfaces implemented, so you don't need to do it by yourself
-
----
-
-### UnrealHelperLibraryBPL
-
-#### > RelativeAngles
-
-#### `RelativeAngleToActor`
-
-for most cases you want to use "InRange" like `IsOtherActorInAngle` (or `IsOtherCharacterInRange` if you want to check distance)
-
-
-
-#### `GetPointAtRelativeAngle`
-
-
-
-
-#### `GetPointAtRelativeDirection`
-
-
-
-
-#### `GetPointAtAngleRelativeToOtherActor`
-
-#### `GetPointAtDirectionRelativeToOtherActor`
-
-#### `DirectionToAngle`
-
-#### > Misc
+### Migration to UHL 2.0, NEW multi-plugins version
-#### `GetProjectVersion`
+if already have plugin
+- checkout main
+- commit UnrealHelperLibrary change
+- run command - `git submodule update --init --recursive`
-Get project version from "Project Settings"
+- UHL CommonMaps - in `Config/DefaultGame` rename section from [/Script/CommonMaps.UHLCommonMapsDeveloperSettings] -> [/Script/UHLCommonMaps.UHLCommonMapsDeveloperSettings]
-
-
-
-
-#### `GetNamesOfComponentsOnObject`
-
-Get names of actor components on object, usefull for [`GetOptions` UPROPERTY](https://benui.ca/unreal/uproperty/#getoptions)
-
-#### `GetAssetsOfClass`
-
-#### > Other
-
-#### `GetHighestPoint`
-
-#### `ANS_UHL_Base`
-
-**ANS_UHL_Base** - base `AnimNotifyState` class with commonly used features like
-
-- subscribing `OnMontageBlendingOut` by overriding `OnMontageBlendingOut` can be disabled by `bUseOnMontageBlendingOut=false(true by default)`
-- more come later
-
-### 🪲 DebugSystem
-
-Powerful debug system for gameplay based on GameplayTags. So any game needs debug system, in mid-size commands you always use limited set of debugging tools
-more always than others, so **DebugSystem** is as tool for creating your debug system as fast as possible by providing `DebugCategories`(gameplaytags) that can be enabled/disabled
-
-Use case:
-I want to have debug for AbilitySystem, it should turn on/off, available in editor between sessions and.....
-
-Components:
-
-##### DebugSystemSettings
-
-- add new categories, turn on/off default state, every debug category is a tag
-- `DebugCategoryComponents` (DCC)
-
-##### Check is category enabled/subscribe on debug category state change
-
-- `WaitDebugCategoryChange` - blueprint node to easier check `isDebugCategoryEnabled` or not and wait for its changes
-- `IsUHLDebugSystemEnabled` - blueprint node
-- `DebugCategoriesList` - UI component for quick integration in your debug menu
-
-**Features:**
-
-- you can create DebugCategoryComponents that activate/deactivate console commands, event in blueprints like GAS abilities
-- you can even compose DebugCategoryComponents e.g. you want Collisions + HitBoxes, so you can create combined DebugCategory and add "DCC_Collisions" and "DCC_HitBoxes"
-- you can "Block" other DebugCategories by tag
-- WaitDebugCategoryChange
-
-**How to add DebugCategory:**
-1) ...
-2) ...
-
-How to subscribe on debug category change in C++
-
-```c++
- UAA_WaitDebugCategoryChange* WaitDebugCategoryChangeTask = UAA_WaitDebugCategoryChange::WaitDebugCategoryChange(
- Actor->GetWorld(),
- YourGameplayTags::TAG_DebugCategory_Combat // same as FGameplayTag("DebugCategory.Something")
- );
- WaitDebugCategoryChangeTask->OnChange.AddUniqueDynamic(this, &UCombatSubsystem::OnDebugCategoryChanged);
- // on activation "OnDebugCategoryChanged" will be fired
- WaitDebugCategoryChangeTask->Activate();
-```
-
-##### DebugSystemSubsystem
-
-##### `UHLDebugSystemSubsystem`
-
-**UHLDebugSystemSubsystem** - subsystem that provides interaction with debug categories
-
-##### DebugBlueprintLibrary
-
-###### `IsUHLDebugCategoryEnabled`
-
-Check is debug category enabled or not
-
-### Subsystems
-
-#### UHLHUD
-
-HUD with debugging abilities, for now used to display debug bars(e.g. HP/hidden attributes)
-
-### 🔃 LoadingUtilLibrary
-
-**UHLLoadingUtilLibrary** - loading utils from Lyra
-
-#### ApplyDefaultPriorityLoading
-
-#### ApplyStreamingPriorityLoading
-
-#### ApplyHighestPriorityLoading
-
-#### ApplyCustomPriorityLoading
-
-#### ForceGarbageCollection
-
-#### FlushLevelStreaming
-
-### 🎯 TraceUtilsBPL
-
-**UHLTraceUtilsBPL** - trace utils
-
-### ⚙️ Settings
-
-#### UHL Settings
-
-- You can set defaults for all [AbilitySystem](#abilitysystemcomponent) and [AbilitySystem Config](#abilitysystem-config) in your project its can be usefull
-if you don't want to copy paste your `AttributeSets`
-
-### ⌨ UHL Editor
-
-**UHL Editor** - optional module with editor customization, e.g. custom thumnails, custom class icons
-
-#### `Custom thumnails`
-
-
-
-**Custom thumnails** - to override thumbnail by your own, just implement `IUHLEditorCustomThumbnail` interface and define your own icon using `GetCustomThumbnailIcon()`
-
-> [!WARNING]
-> ⚠️ NOT sure that blueprints supported for now
+#### Install separately
```C++
-// UInventoryItem.h
-#if WITH_EDITOR
-#include "UHLEditorCustomThumbnail.h"
-#endif
-
-// IUHLEditorCustomThumbnail not available in production build
-#if !WITH_EDITOR
-class IUHLEditorCustomThumbnail {};
-#endif
-
-class GAMECODE_API UInventoryItem : public UObject,
- public IUHLEditorCustomThumbnail
-{
-/** IUHLEditorCustomThumbnail **/
-#if WITH_EDITOR
- virtual UTexture2D* GetCustomThumbnailIcon_Implementation() const override;
-#endif
-/** ~IUHLEditorCustomThumbnail **/
-}
-
-------------------------------------------------------------------
-
-// UInventoryItem.cpp
-#if WITH_EDITOR
-UTexture2D* UInventoryItem::GetCustomThumbnailIcon_Implementation()
-{
- return Description.Icon;
-}
-#endif
+git submodule add https://github.com/Ciberusps/UHL.git ./Plugins/UHL
+git submodule add https://github.com/Ciberusps/UHLAI.git ./Plugins/UHLAI
+git submodule add https://github.com/Ciberusps/UHLBehaviorTree.git ./Plugins/UHLBehaviorTree
+git submodule add https://github.com/Ciberusps/UHLStateTree.git ./Plugins/UHLStateTree
+git submodule add https://github.com/Ciberusps/UHLCharacter.git ./Plugins/UHLCharacter
+git submodule add https://github.com/Ciberusps/UHLCommonMaps.git ./Plugins/UHLCommonMaps
+git submodule add https://github.com/Ciberusps/UHLDebugSystem.git ./Plugins/UHLDebugSystem
+git submodule add https://github.com/Ciberusps/UHLGAS.git ./Plugins/UHLGAS
```
-Thanks to [this post](https://forums.unrealengine.com/t/custom-thumbnail-not-display-asset-is-never-loaded/143155/2?u=ciberus) and [this](https://forums.unrealengine.com/t/custom-thumbnail-on-blueprint/337532/3?u=ciberus)
-
-#### `Custom class icon`
-
-**Custom class icon** - to override classes icons on your own, just set settings in `Project Settings -> Editor -> UnrealHelperEditor Settings`
-
-
-
-[List of default Unreal Engine Editor icons](https://github.com/EpicKiwi/unreal-engine-editor-icons)
-
-Thanks to [this post](https://www.quodsoler.com/blog/customize-your-unreal-class-icons) and [this](https://forums.unrealengine.com/t/how-to-load-a-font-uasset-and-use-it-for-fslatefontinfo/1548466/3?u=ciberus)
-
-### UHL Utils (Editor Utility Widget)
-
-⚒️ InProgress
-
-### ConvertToORM
-
-Combines separate `Occlusion`, `Roughness`, `Metalic` textures into one `ORM`
-
-TODO check ref - https://github.com/Atulin/ChannelMerger
+### Changelog
+
+- all modules moved to separate plugins and made as independent as possible now dependency tree looks like
+- **TODO: draw dependency tree using schemas**
+ - UHLAI
+ - UHLBehaviorTree
+ - UHLStateTree
+ - UHLCharacter
+ - UHLGAS
+ - UHLCharacter
+ - UHL
+ - UHLCharacter
+ - UHLCommonMaps
+ - UHLDebugSystem
+ - UHLCharacter
+- UHLSettings moved to UHLAISettings now UHLStateTree and UHLBehaviorTree independent from core "UHL" plugin
+and can be used completly separatly from it. UHLStateTree and UHLBehaviorTree depends only on UHLAI
+-
## Special Thanks
diff --git a/Resources/Icon128.png b/Resources/Icon128.png
deleted file mode 100644
index e7f78e47..00000000
Binary files a/Resources/Icon128.png and /dev/null differ
diff --git a/Resources/PlaceholderButtonIcon.svg b/Resources/PlaceholderButtonIcon.svg
deleted file mode 100644
index 73024476..00000000
--- a/Resources/PlaceholderButtonIcon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/Source/CommonMaps/CommonMaps.Build.cs b/Source/CommonMaps/CommonMaps.Build.cs
deleted file mode 100644
index de27ea43..00000000
--- a/Source/CommonMaps/CommonMaps.Build.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class CommonMaps : ModuleRules
-{
- public CommonMaps(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicDependencyModuleNames.AddRange(new string[]
- {
- "Core",
- "DeveloperSettings",
- "PropertyEditor",
- }
- );
-
- PrivateDependencyModuleNames.AddRange(new string[]
- {
- "CoreUObject",
- "Engine",
- "Slate",
- "SlateCore",
- "UnrealEd",
- "AssetTools",
- "ToolMenus",
- "DesktopWidgets",
- }
- );
- }
-}
diff --git a/Source/CommonMaps/Private/CommonMaps.cpp b/Source/CommonMaps/Private/CommonMaps.cpp
deleted file mode 100644
index 1b42fb17..00000000
--- a/Source/CommonMaps/Private/CommonMaps.cpp
+++ /dev/null
@@ -1,301 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "CommonMaps.h"
-#include "AssetSelection.h"
-#include "CommonMapsDeveloperSettings.h"
-#include "FileHelpers.h"
-#include "AssetRegistry/AssetRegistryModule.h"
-
-#define LOCTEXT_NAMESPACE "FCommonMapsModule"
-
-namespace CommonMapsFunctionLibrary
-{
- static bool HasPlayWorld()
- {
- return GEditor->PlayWorld != nullptr;
- }
-
- static bool HasNoPlayWorld()
- {
- return !HasPlayWorld();
- }
-
- static void OpenCommonMap_Clicked(const FString MapPath)
- {
- constexpr bool bPromptUserToSave = true;
- constexpr bool bSaveMapPackages = true;
- constexpr bool bSaveContentPackages = true;
- constexpr bool bFastSave = false;
- constexpr bool bNotifyNoPackagesSaved = false;
- constexpr bool bCanBeDeclined = true;
- if (FEditorFileUtils::SaveDirtyPackages(bPromptUserToSave, bSaveMapPackages, bSaveContentPackages, bFastSave,
- bNotifyNoPackagesSaved, bCanBeDeclined))
- {
- if (ensure(MapPath.Len()))
- {
- GEditor->GetEditorSubsystem()->OpenEditorForAsset(MapPath);
- }
- }
- }
-
- // Recursive helper to either add entries or deeper sub-menus.
- static void PopulateRecursive(
- FMenuBuilder& Builder,
- TArray Assets, // captured by value
- const FString RootPath, // e.g. "/Game/GameName/Characters"
- int32 MaxDepth, // SubmenuDepth
- int32 CurrentDepth // 0 on first call
- )
- {
- // Base case: we have descended MaxDepth levels, so just list maps here
- if (CurrentDepth >= MaxDepth)
- {
- for (const FAssetData& Asset : Assets)
- {
- const FString AssetPathString = Asset.GetSoftObjectPath().ToString();
- const FText DisplayName = FText::FromString(Asset.AssetName.ToString());
-
- Builder.AddMenuEntry(
- DisplayName,
- FText::FromString(AssetPathString),
- FSlateIcon(),
- FUIAction(
- FExecuteAction::CreateStatic(&CommonMapsFunctionLibrary::OpenCommonMap_Clicked, AssetPathString),
- FCanExecuteAction::CreateStatic(&CommonMapsFunctionLibrary::HasNoPlayWorld),
- FIsActionChecked(),
- FIsActionButtonVisible::CreateStatic(&CommonMapsFunctionLibrary::HasNoPlayWorld)
- )
- );
- }
- return;
- }
-
- // Otherwise, bucket by the folder name at this level
- TMap> Buckets;
- const FString Prefix = RootPath + TEXT("/");
-
- for (const FAssetData& Asset : Assets)
- {
- // Only World assets
- if (Asset.AssetClassPath.GetAssetName() != FName("World"))
- continue;
-
- // "/Game/Root/Folder1/Folder2" => "Folder1/Folder2"
- FString Rel = Asset.PackagePath.ToString();
- if (Rel.StartsWith(Prefix))
- {
- Rel = Rel.Mid(Prefix.Len());
- }
- else
- {
- Rel.Empty();
- }
-
- // Split into ["Folder1","Folder2",...]
- TArray Parts;
- Rel.ParseIntoArray(Parts, TEXT("/"), /*CullEmpty=*/ true);
-
- // Grab the segment at our current depth (0-based)
- FString Key = Parts.IsValidIndex(CurrentDepth) ? Parts[CurrentDepth] : TEXT("");
- Buckets.FindOrAdd(Key).Add(Asset);
- }
-
- // Create one submenu per bucket, capturing each subgroup by value
- for (auto& Pair : Buckets)
- {
- const FString& FolderName = Pair.Key.IsEmpty() ? TEXT("") : Pair.Key;
- TArray SubAssets = MoveTemp(Pair.Value);
- int32 NextDepth = CurrentDepth + 1;
-
- Builder.AddSubMenu(
- FText::FromString(FolderName),
- FText(), // no extra tooltip
- FNewMenuDelegate::CreateLambda(
- [SubAssets, RootPath, MaxDepth, NextDepth](FMenuBuilder& SubMenuBuilder)
- {
- // recurse with copies only
- CommonMapsFunctionLibrary::PopulateRecursive(
- SubMenuBuilder,
- SubAssets,
- RootPath,
- MaxDepth,
- NextDepth
- );
- }
- )
- );
- }
- }
-
- static TSharedRef GetCommonMapsDropdown()
- {
- FMenuBuilder MenuBuilder(true, nullptr);
-
- for (const FCommonMapCategory& MapCategory : GetDefault()->MapsCategories)
- {
- TAttribute SectionText;
- SectionText.Set(FText::FromName(MapCategory.Name));
- MenuBuilder.BeginSection(NAME_None, SectionText);
-
- for (const FSoftObjectPath& Map : MapCategory.Maps)
- {
- if (!Map.IsValid())
- {
- continue;
- }
-
- const FText DisplayName = FText::FromString(Map.GetAssetName());
- MenuBuilder.AddMenuEntry(
- DisplayName,
- FText::Format(LOCTEXT("CommonPathDescription", "{0}"), FText::FromString(Map.ToString())),
- FSlateIcon(),
- FUIAction(
- FExecuteAction::CreateStatic(&CommonMapsFunctionLibrary::OpenCommonMap_Clicked, Map.ToString()),
- FCanExecuteAction::CreateStatic(&CommonMapsFunctionLibrary::HasNoPlayWorld),
- FIsActionChecked(),
- FIsActionButtonVisible::CreateStatic(&CommonMapsFunctionLibrary::HasNoPlayWorld)
- )
- );
- }
-
- if (MapCategory.bAutoSearchMapsInFolder)
- {
- // 1) Normalize root (assume always "/Game/..."), strip trailing slash
- FString RootPath = MapCategory.SearchFolder.Path.TrimStartAndEnd();
- RootPath.RemoveFromEnd("/");
-
- // Gather all map assets under that path
- FAssetRegistryModule& AR = FModuleManager::LoadModuleChecked("AssetRegistry");
- TArray AllAssets;
- AR.Get().GetAssetsByPath(FName(*RootPath), AllAssets, /*bRecursive=*/ true);
-
- // Kick off the recursive submenu build at depth=0
- CommonMapsFunctionLibrary::PopulateRecursive(
- MenuBuilder,
- MoveTemp(AllAssets),
- RootPath,
- MapCategory.SubmenuDepth,
- /*CurrentDepth=*/ 0
- );
- }
-
- MenuBuilder.EndSection();
- }
-
- return MenuBuilder.MakeWidget();
- }
-
- static bool CanShowCommonMaps()
- {
- return HasNoPlayWorld() && !GetDefault()->MapsCategories.IsEmpty();
- }
-
- static void RegisterGameEditorMenus()
- {
- UToolMenu* Menu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");
- FToolMenuSection& Section = Menu->AddSection("PlayGameExtensions", TAttribute(),
- FToolMenuInsert("Play", EToolMenuInsertType::Default));
-
-
- FToolMenuEntry CommonMapEntry = FToolMenuEntry::InitComboButton(
- "CommonMapOptions",
- FUIAction(
- FExecuteAction(),
- FCanExecuteAction::CreateStatic(&CommonMapsFunctionLibrary::HasNoPlayWorld),
- FIsActionChecked(),
- FIsActionButtonVisible::CreateStatic(&CommonMapsFunctionLibrary::CanShowCommonMaps)),
- FOnGetContent::CreateStatic(&CommonMapsFunctionLibrary::GetCommonMapsDropdown),
- LOCTEXT("CommonMaps_Label", "Common Maps"),
- LOCTEXT("CommonMaps_ToolTip", "Some commonly desired maps while using the editor"),
- FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Level")
- );
- CommonMapEntry.StyleNameOverride = "CalloutToolbar";
- Section.AddEntry(CommonMapEntry);
- }
-}
-
-void FCommonMapsModule::StartupModule()
-{
- ExtendContextMenu();
-
- if (!IsRunningGame())
- {
- if (FSlateApplication::IsInitialized())
- {
- UToolMenus::RegisterStartupCallback(
- FSimpleMulticastDelegate::FDelegate::CreateStatic(&CommonMapsFunctionLibrary::RegisterGameEditorMenus));
- }
- }
-
- // customization of "SearchFolder" to make "meta=(RelativePath)" work
- // FPropertyEditorModule& PropEd = FModuleManager::LoadModuleChecked("PropertyEditor");
- // PropEd.RegisterCustomPropertyTypeLayout(
- // "CommonMapCategory",
- // FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FCommonMapCategoryCustomization::MakeInstance)
- // );
-}
-
-void FCommonMapsModule::ExtendContextMenu()
-{
- UToolMenu* WorldAssetMenu = UToolMenus::Get()->ExtendMenu("ContentBrowser.AssetContextMenu.World");
- if (!WorldAssetMenu) return;
-
- FToolMenuSection& Section = WorldAssetMenu->AddSection("AssetContextCommonMaps",
- LOCTEXT("CommonMapsOptionsMenuHeading", "Common Maps"));
-
- Section.AddSubMenu(FName("Common Maps"),
- LOCTEXT("AddToCommonMapsFromMenu", "Add to Common Maps"),
- LOCTEXT("AddToCommonMapsFromMenuTooltip", "Add this map into Common Maps list."),
- FNewMenuDelegate::CreateRaw(this, &FCommonMapsModule::CreateCategorySelectionSubmenu),
- FToolUIActionChoice(),
- EUserInterfaceActionType::None,
- false,
- FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Star"));
-}
-
-void FCommonMapsModule::AddToCommonMapsFromMenu(FName CategoryName)
-{
- TArray SelectedAssets;
- AssetSelectionUtils::GetSelectedAssets(SelectedAssets);
- if (auto* Settings = GetMutableDefault())
- {
- for (const auto& AssetData : SelectedAssets)
- {
- if (FCommonMapCategory* CurrentCategory = Settings->MapsCategories.FindByKey(CategoryName))
- {
- CurrentCategory->Maps.Add({ AssetData.GetSoftObjectPath() });
- }
- else
- {
- Settings->MapsCategories.Add(FCommonMapCategory(CategoryName, { AssetData.GetSoftObjectPath() }));
- }
- }
-
- Settings->SaveConfig(CPF_Config);
- FMessageDialog::Open(EAppMsgType::Ok, FText::FromString("All maps added to Common Maps!"));
- }
-}
-
-void FCommonMapsModule::CreateCategorySelectionSubmenu(FMenuBuilder& MenuBuilder)
-{
- const UCommonMapsDeveloperSettings* DevSettings = GetDefault();
- if (!DevSettings) return;
-
- for (const FCommonMapCategory& Category : DevSettings->MapsCategories)
- {
- MenuBuilder.AddMenuEntry(
- FText::Format(LOCTEXT("CategoryLabel", "{0}"), FText::FromName(Category.Name)),
- FText::Format(LOCTEXT("CategoryTooltip", "Add this map to \"{0}\" category."), FText::FromName(Category.Name)),
- FSlateIcon(), FUIAction(FExecuteAction::CreateRaw(this, &FCommonMapsModule::AddToCommonMapsFromMenu, Category.Name)));
- }
-}
-
-
-void FCommonMapsModule::ShutdownModule()
-{
- UToolMenus::UnRegisterStartupCallback(this);
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FCommonMapsModule, CommonMaps)
diff --git a/Source/CommonMaps/Private/CommonMapsDeveloperSettings.cpp b/Source/CommonMaps/Private/CommonMapsDeveloperSettings.cpp
deleted file mode 100644
index 6fc623a0..00000000
--- a/Source/CommonMaps/Private/CommonMapsDeveloperSettings.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "CommonMapsDeveloperSettings.h"
-
diff --git a/Source/CommonMaps/Public/CommonMaps.h b/Source/CommonMaps/Public/CommonMaps.h
deleted file mode 100644
index 04001dbd..00000000
--- a/Source/CommonMaps/Public/CommonMaps.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Modules/ModuleManager.h"
-
-class FCommonMapsModule : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-
-private:
- void ExtendContextMenu();
- void AddToCommonMapsFromMenu(FName CategoryName);
- void CreateCategorySelectionSubmenu(FMenuBuilder& MenuBuilder);
-};
diff --git a/Source/CommonMaps/Public/CommonMapsDeveloperSettings.h b/Source/CommonMaps/Public/CommonMapsDeveloperSettings.h
deleted file mode 100644
index ad6e8586..00000000
--- a/Source/CommonMaps/Public/CommonMapsDeveloperSettings.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "CommonMapsDeveloperSettings.generated.h"
-
-USTRUCT(BlueprintType)
-struct FCommonMapCategory
-{
- GENERATED_BODY()
-
-public:
- FCommonMapCategory() = default;
- explicit FCommonMapCategory(FName CategoryName_In, const TArray& InPaths)
- : Name(CategoryName_In), Maps({ InPaths }) {};
-
- UPROPERTY(EditAnywhere, Category="CommonMapCategory")
- FName Name = "";
-
- UPROPERTY(EditAnywhere, Category="CommonMapCategory")
- bool bAutoSearchMapsInFolder = false;
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CommonMapCategory", meta=(ContentDir, EditCondition="bAutoSearchMapsInFolder", EditConditionHides))
- FDirectoryPath SearchFolder;
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CommonMapCategory", meta=(EditCondition="bAutoSearchMapsInFolder", EditConditionHides))
- int32 SubmenuDepth = 1;
-
- UPROPERTY(EditAnywhere, Category="CommonMapCategory", meta=(AllowedClasses="/Script/Engine.World", TitleProperty="Name"))
- TArray Maps = {};
-
- bool operator==(const FCommonMapCategory& Other) const
- {
- return Name == Other.Name;
- }
- bool operator==(const FName& Other) const
- {
- return Name == Other;
- }
-};
-
-/**
- * TODO: add rescan folders button
- */
-UCLASS(config="Game", DefaultConfig, DisplayName="Common Maps")
-class COMMONMAPS_API UCommonMapsDeveloperSettings : public UDeveloperSettings
-{
- GENERATED_BODY()
-
-public:
- virtual FName GetCategoryName() const override { return FName("Plugins"); }
-
-#if WITH_EDITORONLY_DATA
- UPROPERTY(Config,EditAnywhere, Category="Common Maps", meta=(ForceInlineRow))
- TArray MapsCategories;
-#endif
-};
diff --git a/Source/UHLAI/Private/Components/UHLAIPerceptionComponent.cpp b/Source/UHLAI/Private/Components/UHLAIPerceptionComponent.cpp
deleted file mode 100644
index 52cf949a..00000000
--- a/Source/UHLAI/Private/Components/UHLAIPerceptionComponent.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Components/UHLAIPerceptionComponent.h"
-
-#include "Perception/AISense_Sight.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIPerceptionComponent)
-
-void UUHLAIPerceptionComponent::HandleExpiredStimulus(FAIStimulus& StimulusStore)
-{
- Super::HandleExpiredStimulus(StimulusStore);
-
- TSubclassOf StimulusClass = UAIPerceptionSystem::GetSenseClassForStimulus(GetWorld(), StimulusStore);
- if (StimulusClass == UAISense_Sight::StaticClass())
- {
- if (OnSightStimulusExpired.IsBound())
- {
- OnSightStimulusExpired.Broadcast(StimulusStore);
- }
- }
-}
diff --git a/Source/UHLAI/Private/Composite/BTC_RandomSelector.cpp b/Source/UHLAI/Private/Composite/BTC_RandomSelector.cpp
deleted file mode 100644
index d818acda..00000000
--- a/Source/UHLAI/Private/Composite/BTC_RandomSelector.cpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Composite/BTC_RandomSelector.h"
-
-#include "BehaviorTree/BTTaskNode.h"
-#include "BehaviorTree/BTCompositeNode.h"
-#include "BehaviorTree/BehaviorTreeComponent.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "Misc/EngineVersionComparison.h"
-#include "GameFramework/Actor.h"
-#include "VisualLogger/VisualLogger.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BehaviorTree/BTAuxiliaryNode.h"
-#include "Kismet/KismetMathLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTC_RandomSelector)
-
-UBTC_RandomSelector::UBTC_RandomSelector(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "RandomSelector";
-}
-
-void UBTC_RandomSelector::RemoveUnusedChances()
-{
- if (ChancesArray.Num() > GetChildrenNum())
- {
- int32 CountToRemove = ChancesArray.Num() - GetChildrenNum();
- ChancesArray.RemoveAt(ChancesArray.Num() - CountToRemove, CountToRemove);
- }
-}
-
-int32 UBTC_RandomSelector::GetNextChildHandler(FBehaviorTreeSearchData& SearchData, int32 PrevChild, EBTNodeResult::Type LastResult) const
-{
- // success = quit
- int32 NextChildIdx = BTSpecialChild::ReturnToParent;
-
- if (PrevChild == BTSpecialChild::NotInitialized)
- {
- // newly activated: start from first
- NextChildIdx = GetRandomChildIdx();
- }
- else if (LastResult == EBTNodeResult::Failed && (PrevChild + 1) < GetChildrenNum())
- {
- // failed = choose next child
- NextChildIdx = GetRandomChildIdx();
- }
-
- return NextChildIdx;
-}
-
-FString UBTC_RandomSelector::GetStaticDescription() const
-{
- // Chances Array
- FString Result = "";
-
- float ChancesSum = 0.0f;
- FString ChancesString = "";
- for (int32 i = 0; i < Children.Num(); i++)
- {
- FBTCompositeChild ChildNode = Children[i];
-
- FString Name = "";
- if (ChildNode.ChildComposite)
- {
- Name = ChildNode.ChildComposite->NodeName;
- }
- else if (ChildNode.ChildTask)
- {
- Name = ChildNode.ChildTask->NodeName;
- }
- if (!ChancesArray.IsValidIndex(i)) continue;
-
- float CurrentChance = ChancesArray[i];
- ChancesSum += CurrentChance;
- Result += FString::Printf(TEXT("- %s: %.2f \n"), *Name, CurrentChance);
- }
-
- FString SumWarning = ChancesSum != 1.0f ? FString(TEXT("⚠️")) : FString();
- Result = FString::Printf(TEXT("%s \n\nSum: %.2f %s \nChances: \n%s"), *Super::GetStaticDescription(), ChancesSum, *SumWarning, *Result);
- Result += GetErrorOrWarning();
-
- return Result;
-}
-
-#if WITH_EDITOR
-FName UBTC_RandomSelector::GetNodeIconName() const
-{
- return IsValidSelector() ? FName("BTEditor.Graph.BTNode.Composite.Selector.Icon") : FName("Graph.ConnectorFeedback.Error");
-}
-#endif
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
-void UBTC_RandomSelector::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTC_RandomSelector::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-#endif
-
-FString UBTC_RandomSelector::GetErrorOrWarning() const
-{
- if (!IsValidSelector())
- {
- if (GetChildrenNum() > ChancesArray.Num())
- {
- return FString::Printf(TEXT("\n ❌ERROR❌ \nAdd chances for rest child nodes"));
- }
- // if RandomSelector have only one child, unreal somehow can crash randomly in different places Anims/AI/random components
- if (Children.Num() <= 1)
- {
- return FString::Printf(TEXT("\n ❌ERROR❌ \nUse with at least two childs, one child can lead to random crash in child nodes"));
- }
- }
-
- if (GetChildrenNum() < ChancesArray.Num())
- {
- return FString::Printf(TEXT("\n ⚠️WARNING⚠️ \nNot all chances have their child nodes"));
- }
-
- return FString();
-}
-
-int32 UBTC_RandomSelector::GetRandomChildIdx() const
-{
- int32 ResultIdx = BTSpecialChild::ReturnToParent;
-
- TArray ChancesRanges = {};
-
- float SumChances = 0.0f;
- for (int32 i = 0; i < GetChildrenNum(); i++)
- {
- float MinValue = SumChances;
-
- float Chance = ChancesArray.IsValidIndex(i) ? ChancesArray[i] : 999999.0f;
- SumChances += Chance;
-
- FFloatRange ChanceRange = FFloatRange(MinValue, SumChances);
- ChancesRanges.Add(ChanceRange);
- }
-
- float RandomFloat = UKismetMathLibrary::RandomFloatInRange(0.0f, SumChances);
-
- for (FFloatRange ChanceRange : ChancesRanges)
- {
- if (ChanceRange.Contains(RandomFloat))
- {
- ResultIdx = ChancesRanges.IndexOfByKey(ChanceRange);
- }
- }
-
- return ResultIdx;
-}
diff --git a/Source/UHLAI/Private/Core/UHLAIActorSettings.cpp b/Source/UHLAI/Private/Core/UHLAIActorSettings.cpp
deleted file mode 100644
index d010faf3..00000000
--- a/Source/UHLAI/Private/Core/UHLAIActorSettings.cpp
+++ /dev/null
@@ -1,7 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Core/UHLAIActorSettings.h"
-
-// Add default functionality here for any IUHLActorSettings functions that are not pure virtual.
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIActorSettings)
\ No newline at end of file
diff --git a/Source/UHLAI/Private/Core/UHLAIDebugSettings.cpp b/Source/UHLAI/Private/Core/UHLAIDebugSettings.cpp
deleted file mode 100644
index 33285cac..00000000
--- a/Source/UHLAI/Private/Core/UHLAIDebugSettings.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "Core/UHLAIDebugSettings.h"
-
diff --git a/Source/UHLAI/Private/Core/UHLBlackboardValueType.cpp b/Source/UHLAI/Private/Core/UHLBlackboardValueType.cpp
deleted file mode 100644
index bcf93eea..00000000
--- a/Source/UHLAI/Private/Core/UHLBlackboardValueType.cpp
+++ /dev/null
@@ -1,4 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Core/UHLBlackboardValueType.h"
\ No newline at end of file
diff --git a/Source/UHLAI/Private/Core/UHLMathOperations.cpp b/Source/UHLAI/Private/Core/UHLMathOperations.cpp
deleted file mode 100644
index 3453f3d7..00000000
--- a/Source/UHLAI/Private/Core/UHLMathOperations.cpp
+++ /dev/null
@@ -1,211 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "Core/UHLMathOperations.h"
-
-#include "BehaviorTree/BehaviorTreeComponent.h"
-#include "BehaviorTree/BlackboardComponent.h"
-
-
-void FOperationOnBBValue::SetCurrentBBKeyValueType(EBlackboardValueType CurrentBBKeyValueType_In)
-{
- CurrentBBKeyValueType = CurrentBBKeyValueType_In;
-}
-
-int32 FOperationOnBBValue::CalculateIntResult(UBehaviorTreeComponent& OwnerComp, int32 CurrentValue) const
-{
- int32 Result = CurrentValue;
-
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return Result;
-
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = IntValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = CurrentValue + IntValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = CurrentValue * IntValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = CurrentValue / IntValue.GetValue(OwnerComp);
- }
-
- return Result;
-}
-
-float FOperationOnBBValue::CalculateFloatResult(
- UBehaviorTreeComponent& OwnerComp, float CurrentValue) const
-{
- float Result = CurrentValue;
-
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return Result;
-
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = FloatValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = CurrentValue + FloatValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = CurrentValue * FloatValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = CurrentValue / FloatValue.GetValue(OwnerComp);
- }
-
- return Result;
-}
-
-FVector FOperationOnBBValue::CalculateVectorResult(
- UBehaviorTreeComponent& OwnerComp, FVector CurrentValue) const
-{
- FVector Result = CurrentValue;
-
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return Result;
-
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = VectorValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = CurrentValue + VectorValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = CurrentValue * VectorValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = CurrentValue / VectorValue.GetValue(OwnerComp);
- }
-
- return Result;
-}
-
-FRotator FOperationOnBBValue::CalculateRotatorResult(
- UBehaviorTreeComponent& OwnerComp, FRotator CurrentValue) const
-{
- FRotator Result = CurrentValue;
-
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return Result;
-
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = RotatorValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = CurrentValue + RotatorValue.GetValue(OwnerComp);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = (CurrentValue.Euler() * RotatorValue.GetValue(OwnerComp).Euler()).ToOrientationRotator();
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = (CurrentValue.Euler() / RotatorValue.GetValue(OwnerComp).Euler()).ToOrientationRotator();
- }
-
- return Result;
-}
-
-FString FOperationOnBBValue::ToStringIntValue(FString KeyName) const
-{
- FString Result = "";
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = FString::Printf(TEXT("Set \"%s\" to %s"), *KeyName, *IntValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = FString::Printf(TEXT("Add \"%s\" to %s"), *IntValue.ToString(), *KeyName);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = FString::Printf(TEXT("Multiply \"%s\" by %s"), *KeyName, *IntValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = FString::Printf(TEXT("Divide \"%s\" by %s"), *KeyName, *IntValue.ToString());
- }
- return Result;
-}
-
-FString FOperationOnBBValue::ToStringFloatValue(FString KeyName) const
-{
- FString Result = "";
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = FString::Printf(TEXT("Set \"%s\" to %sf"), *KeyName, *FloatValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = FString::Printf(TEXT("Add \"%s\" to %s"), *FloatValue.ToString(), *KeyName);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = FString::Printf(TEXT("Multiply \"%s\" by %sf"), *KeyName, *FloatValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = FString::Printf(TEXT("Divide \"%s\" by %sf"), *KeyName, *FloatValue.ToString());
- }
- return Result;
-}
-
-FString FOperationOnBBValue::ToStringVectorValue(FString KeyName) const
-{
- FString Result = "";
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = FString::Printf(TEXT("Set \"%s\" to %sf"), *KeyName, *VectorValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = FString::Printf(TEXT("Add \"%s\" to %s"), *VectorValue.ToString(), *KeyName);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = FString::Printf(TEXT("Multiply \"%s\" by %sf"), *KeyName, *VectorValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = FString::Printf(TEXT("Divide \"%s\" by %sf"), *KeyName, *VectorValue.ToString());
- }
- return Result;
-}
-
-FString FOperationOnBBValue::ToStringRotatorValue(FString KeyName) const
-{
- FString Result = "";
- if (MathOperation == EUHL_MathOperations::Set)
- {
- Result = FString::Printf(TEXT("Set \"%s\" to %sf"), *KeyName, *RotatorValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Add)
- {
- Result = FString::Printf(TEXT("Add \"%s\" to %s"), *RotatorValue.ToString(), *KeyName);
- }
- else if (MathOperation == EUHL_MathOperations::Multiply)
- {
- Result = FString::Printf(TEXT("Multiply \"%s\" by %sf"), *KeyName, *RotatorValue.ToString());
- }
- else if (MathOperation == EUHL_MathOperations::Divide)
- {
- Result = FString::Printf(TEXT("Divide \"%s\" by %sf"), *KeyName, *RotatorValue.ToString());
- }
- return Result;
-}
diff --git a/Source/UHLAI/Private/Data/TurnSettings.cpp b/Source/UHLAI/Private/Data/TurnSettings.cpp
deleted file mode 100644
index 9358100b..00000000
--- a/Source/UHLAI/Private/Data/TurnSettings.cpp
+++ /dev/null
@@ -1,230 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Data/TurnSettings.h"
-#include "Animation/AnimMontage.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(TurnSettings)
-
-void FTurnSettings::Cleanup()
-{
- TurnRangesGroups.Empty();
-}
-
-void FTurnSettings::SetupPreset_Default_90_180()
-{
- bTurnOnlyWithAnims = false;
- bStopMontageOnGoalReached = true;
- // order is important because ranges might overlap
- TurnRangesGroups = {
- {
- "180deg",
- {
- {
- { "Turn 180 L", FFloatRange(-225, -115) },
- { "Turn 180 R", FFloatRange(115, 225) },
- }
- }
- },
- {
- "90deg",
- {
- {
- { "Turn 90 L", FFloatRange(-115, -45) },
- { "Turn 90 R", FFloatRange(45, 115) },
- }
- }
- },
- };
-}
-
-void FTurnSettings::SetupPreset_BigEnemy_90_180()
-{
- bTurnOnlyWithAnims = true;
- bStopMontageOnGoalReached = true;
- // order is important because ranges might overlap
- TurnRangesGroups = {
- {
- "180deg",
- {
- {
- { "Turn 180 L", FFloatRange(-225, -135) },
- { "Turn 180 R", FFloatRange(135, 225) },
- }
- }
- },
- {
- "90deg",
- {
- {
- { "Turn 90 L", FFloatRange(-135, -45) },
- { "Turn 90 R", FFloatRange(45, 135) },
- }
- }
- },
- };
-}
-
-void FTurnSettings::SetupPreset_45_90_180()
-{
- bTurnOnlyWithAnims = true;
- bStopMontageOnGoalReached = true;
- // order is important because ranges might overlap
- TurnRangesGroups = {
- {
- "180deg",
- {
- {
- { "Turn 180 L", FFloatRange(-225, -135) },
- { "Turn 180 R", FFloatRange(135, 225) },
- }
- }
- },
- {
- "90deg",
- {
- {
- { "Turn 90 L", FFloatRange(-135, -67.5) },
- { "Turn 90 R", FFloatRange(67.5, 135) },
- }
- }
- },
- {
- "45deg",
- {
- {
- { "Turn 45 L", FFloatRange(-67.5, -22.5) },
- { "Turn 45 R", FFloatRange(22.5, 67.5) },
- }
- }
- },
- };
-}
-
-void FTurnSettings::SetupPreset_15_45_90_180()
-{
- bTurnOnlyWithAnims = true;
- bStopMontageOnGoalReached = true;
- // order is important because ranges might overlap
- TurnRangesGroups = {
- {
- "180deg",
- {
- {
- { "Turn 180 L", FFloatRange(-225, -135) },
- { "Turn 180 R", FFloatRange(135, 225) },
- }
- }
- },
- {
- "90deg",
- {
- {
- { "Turn 90 L", FFloatRange(-135, -67.5) },
- { "Turn 90 R", FFloatRange(67.5, 135) },
- }
- }
- },
- {
- "45deg",
- {
- {
- { "Turn 45 L", FFloatRange(-67.5, -30) },
- { "Turn 45 R", FFloatRange(30, 67.5) },
- }
- }
- },
- {
- "15deg",
- {
- {
- { "Turn 15 L", FFloatRange(-30, -7.5) },
- { "Turn 15 R", FFloatRange(7.5, 30) },
- }
- }
- },
- };
-}
-
-void FTurnSettings::SetupPreset_15_30_45_90_180()
-{
- bTurnOnlyWithAnims = true;
- bStopMontageOnGoalReached = true;
- TurnRangesGroups = {
- {
- "180deg",
- {
- {
- { "Turn 180 L", FFloatRange(-225, -135) },
- { "Turn 180 R", FFloatRange(135, 225) },
- }
- }
- },
- {
- "90deg",
- {
- {
- { "Turn 90 L", FFloatRange(-135, -67.5) },
- { "Turn 90 R", FFloatRange(67.5, 135) },
- }
- }
- },
- {
- "45deg",
- {
- {
- { "Turn 45 L", FFloatRange(-67.5, -30) },
- { "Turn 45 R", FFloatRange(30, 67.5) },
- }
- }
- },
- {
- "30deg",
- {
- {
- { "Turn 30 L", FFloatRange(-37.5, -22.5) },
- { "Turn 30 R", FFloatRange(22.5, 37.5) },
- }
- }
- },
- {
- "15deg",
- {
- {
- { "Turn 15 L", FFloatRange(-22.5, -7.5) },
- { "Turn 15 R", FFloatRange(7.5, 22.5) },
- }
- }
- },
- };
-}
-
-void UTurnSettingsDataAsset::Cleanup()
-{
- TurnSettings.Cleanup();
-}
-
-void UTurnSettingsDataAsset::SetupPreset_Default_90_180()
-{
- TurnSettings.SetupPreset_Default_90_180();
-}
-
-void UTurnSettingsDataAsset::SetupPreset_BigEnemy_90_180()
-{
- TurnSettings.SetupPreset_BigEnemy_90_180();
-}
-
-void UTurnSettingsDataAsset::SetupPreset_45_90_180()
-{
- TurnSettings.SetupPreset_45_90_180();
-}
-
-void UTurnSettingsDataAsset::SetupPreset_15_45_90_180()
-{
- TurnSettings.SetupPreset_15_45_90_180();
-}
-
-void UTurnSettingsDataAsset::SetupPreset_15_30_45_90_180()
-{
- TurnSettings.SetupPreset_15_30_45_90_180();
-}
diff --git a/Source/UHLAI/Private/Decorators/BTD_Base.cpp b/Source/UHLAI/Private/Decorators/BTD_Base.cpp
deleted file mode 100644
index d24c6749..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_Base.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_Base.h"
-
-#include "BlueprintNodeHelpers.h"
-#include "BehaviorTree/BlackboardComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_Base)
-
-UBTD_Base::UBTD_Base(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- bIsObservingBB = false;
-}
-
-void UBTD_Base::InitializeProperties()
-{
- if (HasAnyFlags(RF_ClassDefaultObject))
- {
- UClass* StopAtClass = UBTD_Base::StaticClass();
- BlueprintNodeHelpers::CollectPropertyData(this, StopAtClass, PropertyData);
-
- bIsObservingBB = BlueprintNodeHelpers::HasAnyBlackboardSelectors(this, StopAtClass);
- }
- else
- {
- // Make sure if the users started to observe a BB key after we instantiated this node, that this value get propagated correctly
- bIsObservingBB = GetClass()->GetDefaultObject()->bIsObservingBB;
- }
-}
-
-void UBTD_Base::PostInitProperties()
-{
- Super::PostInitProperties();
-
- InitializeProperties();
-}
-
-FString UBTD_Base::GetPropertiesDetails() const
-{
- FString ReturnDesc = "";
- UBTD_Base* CDO = (UBTD_Base*)(GetClass()->GetDefaultObject());
- if (bShowPropertyDetails && CDO)
- {
- UClass* StopAtClass = UBTD_Base::StaticClass();
- FString PropertyDesc = BlueprintNodeHelpers::CollectPropertyDescription(this, StopAtClass, CDO->PropertyData);
- if (PropertyDesc.Len())
- {
- ReturnDesc += TEXT(":\n\n");
- ReturnDesc += PropertyDesc;
- }
- }
- return ReturnDesc;
-}
-
-void UBTD_Base::RequestAbort(UBehaviorTreeComponent& OwnerComp, const EAbortType Type)
-{
- switch (Type)
- {
- case EAbortType::NoAbort:
- // Nothing to abort, continue
- break;
- case EAbortType::ActivateBranch:
- OwnerComp.RequestBranchActivation(*this, false);
- break;
- case EAbortType::DeactivateBranch:
- OwnerComp.RequestBranchDeactivation(*this);
- break;
- case EAbortType::Unknown:
- checkf(false, TEXT("If decorator is active, it must know whether it needs to abort or not"))
- break;
- }
-}
-
-EBlackboardNotificationResult UBTD_Base::OnBlackboardKeyValueChange(const UBlackboardComponent& Blackboard,
- FBlackboard::FKey ChangedKeyID)
-{
- UBehaviorTreeComponent* BehaviorComp = Cast(Blackboard.GetBrainComponent());
- if (BehaviorComp)
- {
- const EAbortType Type = EvaluateAbortType(*BehaviorComp);
- if (Type != EAbortType::Unknown)
- {
- RequestAbort(*BehaviorComp, Type);
- }
- }
- return BehaviorComp ? EBlackboardNotificationResult::ContinueObserving : EBlackboardNotificationResult::RemoveObserver;
-}
-
-void UBTD_Base::PostLoad()
-{
- Super::PostLoad();
-
- if (GetFlowAbortMode() != EBTFlowAbortMode::None && bIsObservingBB)
- {
- ObservedKeyNames.Reset();
- UClass* StopAtClass = UBTD_Base::StaticClass();
- BlueprintNodeHelpers::CollectBlackboardSelectors(this, StopAtClass, ObservedKeyNames);
- ensure(ObservedKeyNames.Num() > 0);
- }
-}
-
-void UBTD_Base::OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- UBlackboardComponent* BlackboardComp = OwnerComp.GetBlackboardComponent();
- if (BlackboardComp)
- {
- for (int32 NameIndex = 0; NameIndex < ObservedKeyNames.Num(); NameIndex++)
- {
- const FBlackboard::FKey KeyID = BlackboardComp->GetKeyID(ObservedKeyNames[NameIndex]);
- if (KeyID != FBlackboard::InvalidKey)
- {
- BlackboardComp->RegisterObserver(KeyID, this, FOnBlackboardChangeNotification::CreateUObject(this, &UBTD_Base::OnBlackboardKeyValueChange));
- }
- }
- }
-}
-
-UBTD_Base::EAbortType UBTD_Base::EvaluateAbortType(UBehaviorTreeComponent& OwnerComp) const
-{
- // if (PerformConditionCheckImplementations == 0)
- // {
- // return EAbortType::Unknown;
- // }
-
- if (FlowAbortMode == EBTFlowAbortMode::None)
- {
- return EAbortType::NoAbort;
- }
-
- const bool bIsOnActiveBranch = OwnerComp.IsExecutingBranch(GetMyNode(), GetChildIndex());
-
- EAbortType AbortType = EAbortType::NoAbort;
- if (bIsOnActiveBranch)
- {
- if ((FlowAbortMode == EBTFlowAbortMode::Self || FlowAbortMode == EBTFlowAbortMode::Both) && CalculateRawConditionValue(OwnerComp, /*NodeMemory*/nullptr) == IsInversed())
- {
- AbortType = EAbortType::DeactivateBranch;
- }
- }
- else
- {
- if ((FlowAbortMode == EBTFlowAbortMode::LowerPriority || FlowAbortMode == EBTFlowAbortMode::Both) && CalculateRawConditionValue(OwnerComp, /*NodeMemory*/nullptr) != IsInversed())
- {
- AbortType = EAbortType::ActivateBranch;
- }
- }
-
- return AbortType;
-}
diff --git a/Source/UHLAI/Private/Decorators/BTD_CheckGASGameplayTagsOnActor.cpp b/Source/UHLAI/Private/Decorators/BTD_CheckGASGameplayTagsOnActor.cpp
deleted file mode 100644
index d507fe0d..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_CheckGASGameplayTagsOnActor.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_CheckGASGameplayTagsOnActor.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemInterface.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_CheckGASGameplayTagsOnActor)
-
-UBTD_CheckGASGameplayTagsOnActor::UBTD_CheckGASGameplayTagsOnActor(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "GAS Gameplay Tag Condition";
- INIT_DECORATOR_NODE_NOTIFY_FLAGS();
-
- // Accept only actors
- ActorToCheck.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_CheckGASGameplayTagsOnActor, ActorToCheck), AActor::StaticClass());
-
- // Default to using Self Actor
- ActorToCheck.SelectedKeyName = FBlackboard::KeySelf;
-
- bAllowAbortNone = true;
- bAllowAbortLowerPri = true;
- bAllowAbortChildNodes = true;
-}
-
-bool UBTD_CheckGASGameplayTagsOnActor::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- const UBlackboardComponent* BlackboardComp = OwnerComp.GetBlackboardComponent();
- if (BlackboardComp == nullptr)
- {
- return false;
- }
-
- IAbilitySystemInterface* AbilitySystemInterface = Cast(BlackboardComp->GetValue(ActorToCheck.GetSelectedKeyID()));
- if (AbilitySystemInterface == nullptr)
- {
- return false;
- }
- UAbilitySystemComponent* ASC = AbilitySystemInterface->GetAbilitySystemComponent();
- if (!IsValid(ASC)) return false;
-
- switch (TagsToMatch)
- {
- case EGameplayContainerMatchType::All:
- return ASC->HasAllMatchingGameplayTags(GameplayTags);
-
- case EGameplayContainerMatchType::Any:
- return ASC->HasAnyMatchingGameplayTags(GameplayTags);
-
- default:
- {
- UE_LOG(LogBehaviorTree, Warning, TEXT("Invalid value for TagsToMatch (EGameplayContainerMatchType) %d. Should only be Any or All."), static_cast(TagsToMatch));
- return false;
- }
- }
-}
-
-void UBTD_CheckGASGameplayTagsOnActor::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values);
-}
-
-FString UBTD_CheckGASGameplayTagsOnActor::GetStaticDescription() const
-{
- return FString::Printf(TEXT("%s: %s"), *Super::GetStaticDescription(), *CachedDescription);
-}
-
-#if WITH_EDITOR
-void UBTD_CheckGASGameplayTagsOnActor::BuildDescription()
-{
- CachedDescription = TEXT("\n") + GameplayTags.ToMatchingText(TagsToMatch, IsInversed()).ToString()
- .Replace(TEXT("),"), TEXT("\n - "))
- // .Replace(TEXT(": "), TEXT(""))
- .Replace(TEXT("=("), TEXT("\n - "))
- .Replace(TEXT("(GameplayTags"), TEXT(""))
- .Replace(TEXT("(TagName="), TEXT(""))
- .Replace(TEXT(")))"), TEXT(""))
- .Replace(TEXT("\""), TEXT(""))
- .Replace(TEXT("=)"), TEXT(""));
- // CachedDescription = FString::Printf(TEXT(" %s"), *GameplayTags.ToStringSimple(true));
-}
-
-void UBTD_CheckGASGameplayTagsOnActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
-{
- Super::PostEditChangeProperty(PropertyChangedEvent);
- if (PropertyChangedEvent.Property == NULL)
- {
- return;
- }
-
- BuildDescription();
-}
-#endif
-
-void UBTD_CheckGASGameplayTagsOnActor::InitializeFromAsset(UBehaviorTree& Asset)
-{
- Super::InitializeFromAsset(Asset);
-
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (ensure(BBAsset))
- {
- ActorToCheck.ResolveSelectedKey(*BBAsset);
- }
-
-#if WITH_EDITOR
- BuildDescription();
-#endif // WITH_EDITOR
-}
-
-void UBTD_CheckGASGameplayTagsOnActor::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
-{
- Super::TickNode(OwnerComp, NodeMemory, DeltaSeconds);
-
- RequestAbort(OwnerComp, EvaluateAbortType(OwnerComp));
-}
-
diff --git a/Source/UHLAI/Private/Decorators/BTD_GameplayEffectCooldown.cpp b/Source/UHLAI/Private/Decorators/BTD_GameplayEffectCooldown.cpp
deleted file mode 100644
index 17ce6e40..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_GameplayEffectCooldown.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2024 NextGenium
-
-
-#include "Decorators/BTD_GameplayEffectCooldown.h"
-
-#include "Engine/World.h"
-#include "AIController.h"
-#include "AbilitySystemBlueprintLibrary.h"
-#include "AbilitySystemComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_GameplayEffectCooldown)
-
-UBTD_GameplayEffectCooldown::UBTD_GameplayEffectCooldown(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "GameplayEffect Cooldown";
- INIT_DECORATOR_NODE_NOTIFY_FLAGS();
-
- // aborting child nodes doesn't makes sense, cooldown starts after leaving this branch
- bAllowAbortChildNodes = false;
-}
-
-bool UBTD_GameplayEffectCooldown::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- // FBTGameplayEffectCooldownDecoratorMemory* DecoratorMemory = CastInstanceNodeMemory(NodeMemory);
- // const double RecalcTime = (OwnerComp.GetWorld()->GetTimeSeconds() - CoolDownTime.GetValue(OwnerComp));
- // return RecalcTime >= DecoratorMemory->LastUseTimestamp;
-
- AAIController* OwnerController = OwnerComp.GetAIOwner();
- AActor* OwnerActor = OwnerController ? OwnerController->GetPawn() : nullptr;
- if (!OwnerActor) return true;
-
- UAbilitySystemComponent* ASC = UAbilitySystemBlueprintLibrary::GetAbilitySystemComponent(OwnerActor);
- if (!ASC) return true;
-
- FGameplayEffectQuery const ActiveGameplayEffectsQuery = FGameplayEffectQuery::MakeQuery_MatchAnyOwningTags(FGameplayTagContainer(CooldownGameplayEffectTag));
- TArray EffectsTimeRemaining = ASC->GetActiveEffectsTimeRemaining(ActiveGameplayEffectsQuery);
- if (EffectsTimeRemaining.Num() > 0)
- {
- return EffectsTimeRemaining[0] > 0.0f ? false : true;
- }
- return true;
-}
-
-void UBTD_GameplayEffectCooldown::OnNodeDeactivation(FBehaviorTreeSearchData& SearchData, EBTNodeResult::Type NodeResult)
-{
- FBTGameplayEffectCooldownDecoratorMemory* DecoratorMemory = GetNodeMemory(SearchData);
- DecoratorMemory->LastUseTimestamp = SearchData.OwnerComp.GetWorld()->GetTimeSeconds();
- DecoratorMemory->bRequestedRestart = false;
-}
-
-void UBTD_GameplayEffectCooldown::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
-{
- // FBTGameplayEffectCooldownDecoratorMemory* DecoratorMemory = CastInstanceNodeMemory(NodeMemory);
- // if (!DecoratorMemory->bRequestedRestart)
- // {
- // const double RecalcTime = (OwnerComp.GetWorld()->GetTimeSeconds() - CoolDownTime.GetValue(OwnerComp));
- // if (RecalcTime >= DecoratorMemory->LastUseTimestamp)
- // {
- // DecoratorMemory->bRequestedRestart = true;
- // OwnerComp.RequestExecution(this);
- // }
- // }
-}
-
-FString UBTD_GameplayEffectCooldown::GetStaticDescription() const
-{
- return "";
- // // basic info: result after time
- // return FString::Printf(TEXT("%s: lock for %s s after execution and return %s"), *Super::GetStaticDescription(),
- // *CoolDownTime.ToString(), *UBehaviorTreeTypes::DescribeNodeResult(EBTNodeResult::Failed));
-}
-
-void UBTD_GameplayEffectCooldown::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values);
-
- // FBTGameplayEffectCooldownDecoratorMemory* DecoratorMemory = CastInstanceNodeMemory(NodeMemory);
- // const double TimePassed = OwnerComp.GetWorld()->GetTimeSeconds() - DecoratorMemory->LastUseTimestamp;
- //
- // if (TimePassed < CoolDownTime.GetValue(OwnerComp))
- // {
- // Values.Add(FString::Printf(TEXT("%s in %ss"),
- // (FlowAbortMode == EBTFlowAbortMode::None) ? TEXT("unlock") : TEXT("restart"),
- // *FString::SanitizeFloat(CoolDownTime.GetValue(OwnerComp) - TimePassed)));
- // }
-}
-
-uint16 UBTD_GameplayEffectCooldown::GetInstanceMemorySize() const
-{
- return sizeof(FBTGameplayEffectCooldownDecoratorMemory);
-}
-
-void UBTD_GameplayEffectCooldown::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const
-{
- FBTGameplayEffectCooldownDecoratorMemory* DecoratorMemory = InitializeNodeMemory(NodeMemory, InitType);
- if (InitType == EBTMemoryInit::Initialize)
- {
- DecoratorMemory->LastUseTimestamp = TNumericLimits::Lowest();
- }
-
- DecoratorMemory->bRequestedRestart = false; ;
-}
-
-void UBTD_GameplayEffectCooldown::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-
-#if WITH_EDITOR
-
-FName UBTD_GameplayEffectCooldown::GetNodeIconName() const
-{
- return FName("BTEditor.Graph.BTNode.Decorator.Cooldown.Icon");
-}
-
-#endif // WITH_EDITOR
-
diff --git a/Source/UHLAI/Private/Decorators/BTD_InAngle.cpp b/Source/UHLAI/Private/Decorators/BTD_InAngle.cpp
deleted file mode 100644
index 706ad078..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_InAngle.cpp
+++ /dev/null
@@ -1,180 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_InAngle.h"
-
-#include "AIController.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/BTCompositeNode.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h"
-#include "Components/CapsuleComponent.h"
-#include "GameFramework/Character.h"
-#include "GameFramework/Controller.h"
-#include "DrawDebugHelpers.h"
-#include "Kismet/KismetMathLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_InAngle)
-
-UBTD_InAngle::UBTD_InAngle(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "InAngle";
- INIT_DECORATOR_NODE_NOTIFY_FLAGS();
-
- // Accept only actors and vectors
- Target.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_InAngle, Target), AActor::StaticClass());
- Target.AddVectorFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_InAngle, Target));
-
- bAllowAbortNone = true;
- bAllowAbortLowerPri = true;
- bAllowAbortChildNodes = true;
-}
-
-bool UBTD_InAngle::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- float CurrentAngle = GetCurrentAngle(OwnerComp, NodeMemory, bDrawDebug);
-
- return bDebugForceFalseCondition ? false : IsInAngle(CurrentAngle);
-}
-
-void UBTD_InAngle::InitializeFromAsset(UBehaviorTree& Asset)
-{
- Super::InitializeFromAsset(Asset);
-
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (ensure(BBAsset))
- {
- Target.ResolveSelectedKey(*BBAsset);
- }
-}
-
-void UBTD_InAngle::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTD_InAngle::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-
-FString UBTD_InAngle::GetStaticDescription() const
-{
- return Super::GetStaticDescription();
-}
-
-void UBTD_InAngle::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values);
- Values.Add(FString::Printf(TEXT("CurrentAngle: %.2f"), GetCurrentAngle(OwnerComp, NodeMemory)));
-}
-
-#if WITH_EDITOR
-FName UBTD_InAngle::GetNodeIconName() const
-{
- return FName("GenericCommands.Redo");
-}
-#endif
-
-float UBTD_InAngle::GetCurrentAngle(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, bool bDrawDebug_In) const
-{
- float CurrentAngle = 0.0f;
-
- const UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return CurrentAngle;
-
- AAIController* OwnerController = OwnerComp.GetAIOwner();
- AActor* OwnerActor = OwnerController ? OwnerController->GetPawn() : nullptr;
- ACharacter* OwnerCharacter = IsValid(OwnerController) ? OwnerController->GetCharacter() : nullptr;
- AActor* TargetActor = nullptr;
- bool bTargetActorRequiredButNotSet = false;
-
- FVector TargetVector = FVector::ZeroVector;
- if (Target.SelectedKeyType == UBlackboardKeyType_Object::StaticClass())
- {
- UObject* BBValue = BlackboardComponent->GetValueAsObject(Target.SelectedKeyName);
- TargetActor = IsValid(BBValue) ? Cast(BBValue) : nullptr;
- bTargetActorRequiredButNotSet = !IsValid(TargetActor);
- TargetVector = IsValid(TargetActor) ? TargetActor->GetActorLocation() : FVector::ZeroVector;
- }
- if (Target.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass())
- {
- TargetVector = BlackboardComponent->GetValueAsVector(Target.SelectedKeyName);
- }
-
- if (!IsValid(OwnerActor) || bTargetActorRequiredButNotSet) return CurrentAngle;
-
- CurrentAngle = UUnrealHelperLibraryBPL::RelativeAngleToVector(OwnerActor, TargetVector);
-
- if (bDrawDebug)
- {
- FVector LineStart = OwnerActor->GetActorLocation();
- FVector LineEnd = TargetVector;
- FVector TextLocation = (LineEnd - LineStart) / 2 + LineStart;
- bool bInAngle = IsInAngle(CurrentAngle);
-
- FAngleRange* InAngleRange = nullptr;
-
- if(IsValid(OwnerCharacter))
- {
- float CapsuleSizeMultiplier = 6.0f;
- float AngleLineLength = OverrideDebugLinesDistance > 0.0f
- ? OverrideDebugLinesDistance
- : OwnerCharacter->GetCapsuleComponent()->GetScaledCapsuleRadius() * CapsuleSizeMultiplier;
- for (FAngleRange IncludeRange : IncludeRanges)
- {
- bool bInThisAngle = UKismetMathLibrary::InRange_FloatFloat(CurrentAngle, IncludeRange.Range.GetLowerBoundValue(), IncludeRange.Range.GetUpperBoundValue(), true, true);
- float RangeAngle = IncludeRange.Range.GetLowerBoundValue() > 0.0f
- ? IncludeRange.Range.GetUpperBoundValue() / 2
- : IncludeRange.Range.GetLowerBoundValue() / 2;
-
- // TODO bDebugUseSuccessColorFromRange
- // if (bInThisAngle)
- // {
- // InAngleRange = &IncludeRange;
- // }
-
- FVector StartRangeLine = LineStart + OwnerCharacter->GetActorForwardVector().RotateAngleAxis(IncludeRange.Range.GetLowerBoundValue(), FVector(0, 0, 1)) * AngleLineLength;
- FVector EndRangeLine = LineStart + OwnerCharacter->GetActorForwardVector().RotateAngleAxis(IncludeRange.Range.GetUpperBoundValue(), FVector(0, 0, 1)) * AngleLineLength;
- // FVector RangeDirection = LineStart + CachedOwnerCharacter->GetActorForwardVector().RotateAngleAxis(RangeAngle, FVector(0, 0, 1)) * AngleLineLength * 0.3f;
-
- // DrawDebugCone(OwnerComp.GetWorld(), CachedOwnerCharacter->GetActorLocation(), RangeDirection, 500.0f, RangeAngle, 2.0f, 2, IncludeRange.DebugColor, false, -1, -1, 1.0f);
- DrawDebugLine(OwnerComp.GetWorld(), LineStart, StartRangeLine, bInThisAngle ? FColor::Green : IncludeRange.DebugColor, false, -1, -1, 4.0f);
- DrawDebugLine(OwnerComp.GetWorld(), LineStart, EndRangeLine, bInThisAngle ? FColor::Green : IncludeRange.DebugColor, false, -1, -1, 4.0f);
- // DrawDebugDirectionalArrow(OwnerComp.GetWorld(), LineStart, RangeDirection, 15.0f, bInThisAngle ? FColor::Green : IncludeRange.DebugColor, false, -1, -1, 3.0f);
- }
- }
-
- FColor AngleTextColor = bInAngle ? FColor::Green : FColor::Red;
- // if (InAngleRange != nullptr)
- // {
- // AngleTextColor = InAngleRange->DebugColor;
- // }
-
- DrawDebugLine(OwnerComp.GetWorld(), LineStart, LineEnd, bInAngle ? FColor::Green : FColor::Red, false, -1, -1, 2.0f);
- DrawDebugSphere(OwnerComp.GetWorld(), LineStart, 4.0f, 16, FColor::Blue, false, -1, -1, 2.0f);
- DrawDebugSphere(OwnerComp.GetWorld(), LineEnd, 4.0f, 16, FColor::Blue, false, -1, -1, 2.0f);
- DrawDebugString(OwnerComp.GetWorld(), TextLocation, FString::Printf(TEXT("Angle: %.2f"), CurrentAngle), nullptr, AngleTextColor, 0, true);
- DrawDebugString(OwnerComp.GetWorld(), OwnerActor->GetActorLocation(), FString::Printf(TEXT("ParentNode:\n%s \n\nNodeName:\n%s"), *GetParentNode()->NodeName, *GetMyNode()->NodeName), nullptr, FColor::White, 0, true);
- }
-
- return CurrentAngle;
-}
-
-bool UBTD_InAngle::IsInAngle(float CurrentAngle) const
-{
- bool bInThisAngle = false;
- for (FAngleRange IncludeRange : IncludeRanges)
- {
- bInThisAngle = UKismetMathLibrary::InRange_FloatFloat(CurrentAngle, IncludeRange.Range.GetLowerBoundValue(), IncludeRange.Range.GetUpperBoundValue(), true, true);
- if (bInThisAngle)
- {
- break;
- }
- }
- return bInThisAngle;
-}
diff --git a/Source/UHLAI/Private/Decorators/BTD_InRange.cpp b/Source/UHLAI/Private/Decorators/BTD_InRange.cpp
deleted file mode 100644
index 59f75798..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_InRange.cpp
+++ /dev/null
@@ -1,178 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_InRange.h"
-
-#include "AIController.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/BTFunctionLibrary.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h"
-#include "Components/CapsuleComponent.h"
-#include "GameFramework/Character.h"
-#include "DrawDebugHelpers.h"
-#include "Kismet/KismetMathLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_InRange)
-
-UBTD_InRange::UBTD_InRange(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "InRange";
- INIT_DECORATOR_NODE_NOTIFY_FLAGS();
-
- // Accept only actors and vectors
- Target.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_InRange, Target), AActor::StaticClass());
- Target.AddVectorFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_InRange, Target));
-
- bAllowAbortNone = true;
- bAllowAbortLowerPri = true;
- bAllowAbortChildNodes = true;
-}
-
-#if WITH_EDITOR
-FName UBTD_InRange::GetNodeIconName() const
-{
- return FName("SoftwareCursor_UpDown");
-}
-#endif
-
-float UBTD_InRange::GetCurrentDistance(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, bool bDrawDebug_In) const
-{
- float CurrentDistance = 0.0f;
-
- const UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardComponent) return CurrentDistance;
-
- AAIController* OwnerController = OwnerComp.GetAIOwner();
- AActor* OwnerActor = OwnerController ? OwnerController->GetPawn() : nullptr;
- AActor* TargetActor = nullptr;
- bool bTargetActorRequiredButNotSet = false;
-
- FVector TargetVector = FVector::ZeroVector;
- if (Target.SelectedKeyType == UBlackboardKeyType_Object::StaticClass())
- {
- UObject* BBValue = BlackboardComponent->GetValueAsObject(Target.SelectedKeyName);
- TargetActor = IsValid(BBValue) ? Cast(BBValue) : nullptr;
- bTargetActorRequiredButNotSet = !IsValid(TargetActor);
- TargetVector = IsValid(TargetActor) ? TargetActor->GetActorLocation() : FVector::ZeroVector;
- }
- if (Target.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass())
- {
- TargetVector = BlackboardComponent->GetValueAsVector(Target.SelectedKeyName);
- }
-
- if (!IsValid(OwnerActor) || bTargetActorRequiredButNotSet) return CurrentDistance;
-
- ACharacter* OwnerCharacter = IsValid(OwnerController) ? OwnerController->GetCharacter() : nullptr;
- CurrentDistance = bCalculateDistanceIn2D
- ? FVector::Dist2D(OwnerActor->GetActorLocation(), TargetVector)
- : FVector::Distance(OwnerActor->GetActorLocation(), TargetVector);
-
- if (bIncludeSelfCapsuleRadius && IsValid(OwnerCharacter))
- {
- CurrentDistance -= OwnerCharacter->GetCapsuleComponent()->GetScaledCapsuleRadius();
- }
-
- // TODO cache TargetCharacter when possible (on BBValue change?)
- ACharacter* TargetCharacter = Cast(TargetActor);
- if (IsValid(TargetCharacter) && bIncludeTargetCapsuleRadius)
- {
- CurrentDistance -= TargetCharacter->GetCapsuleComponent()->GetScaledCapsuleRadius();
- }
-
- if (bDrawDebug_In)
- {
- FVector LineStart = OwnerActor->GetActorLocation();
- FVector LineEnd = TargetVector;
- FVector TextLocation = (LineEnd - LineStart) / 2 + LineStart;
- bool bInRange = UKismetMathLibrary::InRange_FloatFloat(CurrentDistance, Min, Max);
-
- if (bIncludeSelfCapsuleRadius && IsValid(OwnerCharacter))
- {
- UCapsuleComponent* OwnerCharacterCapsule = OwnerCharacter->GetCapsuleComponent();
- DrawDebugCapsule(OwnerComp.GetWorld(), OwnerCharacterCapsule->GetComponentLocation(),
- OwnerCharacterCapsule->GetScaledCapsuleHalfHeight(),
- OwnerCharacterCapsule->GetScaledCapsuleRadius(),
- OwnerCharacterCapsule->GetComponentRotation().Quaternion(), FColor::Blue,
- false,DebugLifetime, 0, 2.0f);
- LineStart = (LineEnd - LineStart).GetSafeNormal() * OwnerCharacterCapsule->GetScaledCapsuleRadius() + OwnerCharacter->GetActorLocation();
- }
-
- if (bIncludeTargetCapsuleRadius && IsValid(TargetCharacter))
- {
- UCapsuleComponent* TargetCharacterCapsule = TargetCharacter->GetCapsuleComponent();
- DrawDebugCapsule(OwnerComp.GetWorld(), TargetCharacterCapsule->GetComponentLocation(),
- TargetCharacterCapsule->GetScaledCapsuleHalfHeight(),
- TargetCharacterCapsule->GetScaledCapsuleRadius(),
- TargetCharacterCapsule->GetComponentRotation().Quaternion(), FColor::Blue,
- false,DebugLifetime, 0, 2.0f);
- LineEnd = (LineStart - LineEnd).GetSafeNormal() * TargetCharacterCapsule->GetScaledCapsuleRadius() + TargetVector;
- }
-
- DrawDebugLine(OwnerComp.GetWorld(), LineStart, LineEnd, bInRange ? FColor::Green : FColor::Red, false, DebugLifetime, -1, 2.0f);
- DrawDebugSphere(OwnerComp.GetWorld(), LineStart, 5.0f, 16, FColor::Blue, false, DebugLifetime, DebugLifetime, 2.0f);
- DrawDebugSphere(OwnerComp.GetWorld(), LineEnd, 5.0f, 16, FColor::Blue, false, DebugLifetime, DebugLifetime, 2.0f);
- DrawDebugString(OwnerComp.GetWorld(), TextLocation, FString::Printf(TEXT("Distance%s: %.2f"), bCalculateDistanceIn2D ? TEXT("(2D)") : TEXT("(3D)"), CurrentDistance), nullptr, bInRange ? FColor::Green : FColor::Red, DebugLifetime < 0 ? 0 : DebugLifetime, true);
- DrawDebugString(OwnerComp.GetWorld(), OwnerCharacter->GetActorLocation(), FString::Printf(TEXT("ParentNode:\n%s \n\nNodeName:\n%s"), *GetParentNode()->NodeName, *GetMyNode()->NodeName), nullptr, FColor::White, DebugLifetime < 0 ? 0 : DebugLifetime, true);
- }
-
- return CurrentDistance;
-}
-
-void UBTD_InRange::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
-{
- Super::TickNode(OwnerComp, NodeMemory, DeltaSeconds);
-
- RequestAbort(OwnerComp, EvaluateAbortType(OwnerComp));
-}
-
-bool UBTD_InRange::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- float CurrentDistance = GetCurrentDistance(OwnerComp, NodeMemory, bDrawDebug);
- bool bIsInRange = UKismetMathLibrary::InRange_FloatFloat(CurrentDistance, Min, Max);
- return bIsInRange;
-}
-
-void UBTD_InRange::InitializeFromAsset(UBehaviorTree& Asset)
-{
- Super::InitializeFromAsset(Asset);
-
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (ensure(BBAsset))
- {
- Target.ResolveSelectedKey(*BBAsset);
- }
-}
-
-void UBTD_InRange::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTD_InRange::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-
-FString UBTD_InRange::GetStaticDescription() const
-{
- FString NodeDescription = GetPropertiesDetails();
- // NodeDescription += FString::Printf(TEXT("Target: %s\n"), *Target.SelectedKeyName.ToString());
- // NodeDescription += FString::Printf(TEXT("Min: %2f\n"), Min);
- // NodeDescription += FString::Printf(TEXT("Max: %2f\n"), Max);
- // NodeDescription += FString::Printf(TEXT("bIncludeSelfCapsuleRadius: %hs\n"), BTOA(bIncludeSelfCapsuleRadius));
- // NodeDescription += FString::Printf(TEXT("bIncludeTargetCapsuleRadius: %hs\n"), BTOA(bIncludeTargetCapsuleRadius));
- return FString::Printf(TEXT("%s%s"), *Super::GetStaticDescription(), *NodeDescription);
-}
-
-void UBTD_InRange::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values);
-
- // no need to cache value its only works in editor
- Values.Add(FString::Printf(TEXT("CurrentDistance: %.2f"), GetCurrentDistance(OwnerComp, NodeMemory, false)));
-}
diff --git a/Source/UHLAI/Private/Decorators/BTD_LoopRandomCount.cpp b/Source/UHLAI/Private/Decorators/BTD_LoopRandomCount.cpp
deleted file mode 100644
index 6c27451a..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_LoopRandomCount.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_LoopRandomCount.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_LoopRandomCount)
-
-UBTD_LoopRandomCount::UBTD_LoopRandomCount(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "Loop_RandomCount";
- NumLoops = 3;
-}
-
-FString UBTD_LoopRandomCount::GetStaticDescription() const
-{
- return FString::Printf(TEXT("Loops: %d-%d loops"), Range.Min, Range.Max);
-}
-
-void UBTD_LoopRandomCount::OnNodeActivation(FBehaviorTreeSearchData& SearchData)
-{
- NumLoops = FMath::RandRange(Range.Min, Range.Max);
- Super::OnNodeActivation(SearchData);
-}
diff --git a/Source/UHLAI/Private/Decorators/BTD_RandomChance.cpp b/Source/UHLAI/Private/Decorators/BTD_RandomChance.cpp
deleted file mode 100644
index c3f16a42..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_RandomChance.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_RandomChance.h"
-
-#include "BehaviorTree/BTCompositeNode.h"
-#include "Engine/Engine.h"
-#include "UObject/UObjectGlobals.h"
-#include "UObject/UnrealType.h"
-#include "BehaviorTree/BlackboardData.h"
-#include "Kismet/KismetMathLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_RandomChance)
-
-UBTD_RandomChance::UBTD_RandomChance(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- bAllowAbortNone = false;
- bAllowAbortLowerPri = false;
- bAllowAbortChildNodes = false;
-
- ScalableChanceLevelInBB.AddFloatFilter(this, GET_MEMBER_NAME_CHECKED(UBTD_RandomChance, ScalableChanceLevelInBB));
-
-#if WITH_EDITOR
- FProperty* StructProp = FindFProperty(
- GetClass(), GET_MEMBER_NAME_CHECKED(UBTD_RandomChance, ChanceChangePerStep));
-
- FStructProperty* StructProperty = CastField(StructProp);
- if (StructProperty)
- {
- FProperty* PotentiallyFloatProperty = StructProperty->Struct->FindPropertyByName(GET_MEMBER_NAME_CHECKED(FOperationOnBBValue, FloatValue));
- FStructProperty* FloatProperty = CastField(PotentiallyFloatProperty);
- if (FloatProperty)
- {
- FloatProperty->SetMetaData(TEXT("ClampMin"), TEXT("0.0"));
- FloatProperty->SetMetaData(TEXT("ClampMax"), TEXT("1.0"));
- FloatProperty->SetMetaData(TEXT("UIMin"), TEXT("0.0"));
- FloatProperty->SetMetaData(TEXT("UIMax"), TEXT("1.0"));
- }
- }
-#endif
-}
-
-bool UBTD_RandomChance::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- float CurrentChance = GetCurrentChance(OwnerComp);
- bool bResult = UKismetMathLibrary::RandomBoolWithWeight(CurrentChance);
-
- float DrawDebugTime = DebugSettings.DrawDebugTime.GetValue(OwnerComp);
- FString ResultString = bResult ? "Success" : "Fail";
- FString ScalabilitySetting = "";
- if (ScaleType == EScalableChanceType::ScalableFloat)
- {
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (BBAsset->IsValid())
- {
- float ScaleLevel = OwnerComp.GetBlackboardComponent()->GetValueAsFloat(ScalableChanceLevelInBB.SelectedKeyName);
- ScalabilitySetting = FString::SanitizeFloat(ScaleLevel);
- }
- }
- else if (ScaleType == EScalableChanceType::BBDependantWithSteps)
- {
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (BBAsset->IsValid())
- {
- float ScaleLevel = OwnerComp.GetBlackboardComponent()->GetValueAsFloat(StepsCount.SelectedKeyName);
- ScalabilitySetting = FString::SanitizeFloat(ScaleLevel);
- }
- }
-
- if (DebugSettings.bEnableDebug)
- {
- GEngine->AddOnScreenDebugMessage(-1,
- DrawDebugTime, bResult ? FColor::Green : FColor::White,
- FString::Printf(TEXT("[UBTD_RandomChance] %s on \"%s\" with chance %.2f scaled by %s (%s)"), *ResultString, *GetParentNode()->GetName(), CurrentChance, *ScalabilitySetting, *UEnum::GetDisplayValueAsText(ScaleType).ToString())
- );
- }
-
- return bResult;
-}
-
-FString UBTD_RandomChance::GetStaticDescription() const
-{
- // TODO BB value preview?
- // float CurrentChance = bUseBlackboardValue ? GetBlackboardAsset()->GetKey(ChanceInBB.GetSelectedKeyID()) : Chance;
- return FString::Printf(TEXT("Chance - %.2f%% (%s)"), Chance * 100.0f, *Chance.ToString());
-}
-
-void UBTD_RandomChance::InitializeFromAsset(UBehaviorTree& Asset)
-{
- Super::InitializeFromAsset(Asset);
-
- ChanceChangePerStep.SetCurrentBBKeyValueType(EBlackboardValueType::Float);
-}
-
-#if WITH_EDITOR
-FName UBTD_RandomChance::GetNodeIconName() const
-{
- // return FName("CodeView.ClassIcon");
- return FName("GraphEditor.StructGlyph");
-}
-#endif
-
-float UBTD_RandomChance::GetCurrentChance(UBehaviorTreeComponent& OwnerComp) const
-{
- float Result = 0.0f;
- switch (ScaleType)
- {
- case EScalableChanceType::None:
- {
- Result = Chance.GetValue(OwnerComp);
- break;
- }
- case EScalableChanceType::ScalableFloat:
- {
- float ScalableChanceLevel = 0.0f;
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (BBAsset->IsValid())
- {
- ScalableChanceLevel = OwnerComp.GetBlackboardComponent()->GetValueAsFloat(ScalableChanceLevelInBB.SelectedKeyName);
- }
- ScalableChanceLevel = ScalableChanceLevelInBB.IsNone() ? 0.0f : ScalableChanceLevel;
- Result = ScalableChance.GetValueAtLevel(ScalableChanceLevel);
- break;
- }
- case EScalableChanceType::BBDependantWithSteps:
- {
- Result = Chance.GetValue(OwnerComp);
- float StepsCountValue = 0.0f;
- UBlackboardData* BBAsset = GetBlackboardAsset();
- if (BBAsset->IsValid())
- {
- StepsCountValue = OwnerComp.GetBlackboardComponent()->GetValueAsFloat(StepsCount.SelectedKeyName);
- }
- // for every step calculate float value
- int32 StepsCountInt = FMath::RoundToInt(StepsCountValue);
- for (int32 i = 0; i < StepsCountInt; i++)
- {
- Result = ChanceChangePerStep.CalculateFloatResult(OwnerComp, Result);
- }
- break;
- }
- default:
- break;
- }
-
- // clamp if MaxChance defined it could be 0.6f or something like that
- if (ScaleType != EScalableChanceType::None)
- {
- Result = FMath::Clamp(Result, 0.0f, MaxChance.GetValue(OwnerComp));
- }
-
- // clamp anything chance range 0.0f-1.0f
- Result = FMath::Clamp(Result, 0.0f, 1.0f);
-
- return Result;
-}
\ No newline at end of file
diff --git a/Source/UHLAI/Private/Decorators/BTD_TimeLimitRandom.cpp b/Source/UHLAI/Private/Decorators/BTD_TimeLimitRandom.cpp
deleted file mode 100644
index 367ac294..00000000
--- a/Source/UHLAI/Private/Decorators/BTD_TimeLimitRandom.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Decorators/BTD_TimeLimitRandom.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_TimeLimitRandom)
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
-struct FBTimeLimitRandomMemory
-{
- bool bElapsed = false;
-};
-#endif
-
-UBTD_TimeLimitRandom::UBTD_TimeLimitRandom(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "TimeLimit_Random";
- TimeLimit = 5.0f;
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
- INIT_DECORATOR_NODE_NOTIFY_FLAGS();
- bTickIntervals = true;
-
- // time limit always abort current branch
- bAllowAbortLowerPri = false;
- bAllowAbortNone = false;
- FlowAbortMode = EBTFlowAbortMode::Self;
-#endif
-}
-
-FString UBTD_TimeLimitRandom::GetStaticDescription() const
-{
- // basic info: result after time
- return FString::Printf(TEXT("TimeLimit: %s after %.1fs-%.1fs"),
- *UBehaviorTreeTypes::DescribeNodeResult(EBTNodeResult::Failed), TimeLimitRange.Min, TimeLimitRange.Max);
-}
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
-void UBTD_TimeLimitRandom::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- Super::DescribeRuntimeValues(OwnerComp, NodeMemory, Verbosity, Values);
-
- const FBTAuxiliaryMemory* DecoratorMemory = GetSpecialNodeMemory(NodeMemory);
- if (OwnerComp.GetWorld())
- {
- const float TimeLeft = DecoratorMemory->NextTickRemainingTime > 0.f ? DecoratorMemory->NextTickRemainingTime : 0.f;
- Values.Add(FString::Printf(TEXT("%s in %ss"),
- *UBehaviorTreeTypes::DescribeNodeResult(EBTNodeResult::Failed),
- *FString::SanitizeFloat(TimeLeft)));
- }
-}
-
-#if WITH_EDITOR
-FName UBTD_TimeLimitRandom::GetNodeIconName() const
-{
- return FName("BTEditor.Graph.BTNode.Decorator.TimeLimit.Icon");
-}
-#endif
-#endif
-
-void UBTD_TimeLimitRandom::OnNodeActivation(FBehaviorTreeSearchData& SearchData)
-{
- TimeLimit = bUseIntegers
- ? FMath::RandRange((int32)TimeLimitRange.Min, (int32)TimeLimitRange.Max)
- : FMath::RandRange(TimeLimitRange.Min, TimeLimitRange.Max);
- Super::OnNodeActivation(SearchData);
-}
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
-void UBTD_TimeLimitRandom::OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- Super::OnBecomeRelevant(OwnerComp, NodeMemory);
-
- SetNextTickTime(NodeMemory, TimeLimit);
-}
-
-void UBTD_TimeLimitRandom::OnCeaseRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- Super::OnCeaseRelevant(OwnerComp, NodeMemory);
-
- reinterpret_cast(NodeMemory)->bElapsed = false;
-}
-
-bool UBTD_TimeLimitRandom::CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const
-{
- return !reinterpret_cast(NodeMemory)->bElapsed;
-}
-
-void UBTD_TimeLimitRandom::TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
-{
- ensureMsgf(DeltaSeconds >= TimeLimit || FMath::IsNearlyEqual(DeltaSeconds, TimeLimit, UE_KINDA_SMALL_NUMBER),
- TEXT("Using SetNextTickTime in OnBecomeRelevant should guarantee that we are only getting ticked when the time limit is finished. DT=%f, TimeLimit=%f"),
- DeltaSeconds,
- TimeLimit);
-
- // Mark this decorator instance as Elapsed for calls to CalculateRawConditionValue
- reinterpret_cast(NodeMemory)->bElapsed = true;
-
- // Set our next tick time to large value so we don't get ticked again in case the decorator
- // is still active after requesting execution (e.g. latent abort)
- SetNextTickTime(NodeMemory, FLT_MAX);
-
- OwnerComp.RequestExecution(this);
-}
-
-uint16 UBTD_TimeLimitRandom::GetInstanceMemorySize() const
-{
- return sizeof(FBTimeLimitMemoryRandom);
-}
-
-void UBTD_TimeLimitRandom::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, const EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTD_TimeLimitRandom::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, const EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-#endif
diff --git a/Source/UHLAI/Private/Services/BTS_GameplayFocus.cpp b/Source/UHLAI/Private/Services/BTS_GameplayFocus.cpp
deleted file mode 100644
index 7e78421a..00000000
--- a/Source/UHLAI/Private/Services/BTS_GameplayFocus.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Services/BTS_GameplayFocus.h"
-
-#include "GameFramework/Actor.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/BehaviorTreeComponent.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "BehaviorTree/Services/BTService_DefaultFocus.h"
-#include "AIController.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTS_GameplayFocus)
-
-UBTS_GameplayFocus::UBTS_GameplayFocus(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "Set Gameplay Focus";
- FocusPriority = EAIFocusPriority::Gameplay;
-}
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
-void UBTS_GameplayFocus::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTS_GameplayFocus::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
-#endif
diff --git a/Source/UHLAI/Private/Tasks/BTT_ClearFocus.cpp b/Source/UHLAI/Private/Tasks/BTT_ClearFocus.cpp
deleted file mode 100644
index 2615335b..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_ClearFocus.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_ClearFocus.h"
-#include "AIController.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_ClearFocus)
-
-UBTT_ClearFocus::UBTT_ClearFocus(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "ClearFocus";
-}
-
-EBTNodeResult::Type UBTT_ClearFocus::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- TObjectPtr AIOwner = OwnerComp.GetAIOwner();
- if (!AIOwner.Get())
- {
- AIOwner.Get()->ClearFocus(EAIFocusPriority::Gameplay);
- }
-
- return Super::ExecuteTask(OwnerComp, NodeMemory);
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_DebugPrintBBValue.cpp b/Source/UHLAI/Private/Tasks/BTT_DebugPrintBBValue.cpp
deleted file mode 100644
index 5a2004f1..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_DebugPrintBBValue.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_DebugPrintBBValue.h"
-
-#include "UHLAIBlueprintLibrary.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/BlackboardData.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Enum.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_NativeEnum.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_DebugPrintBBValue)
-
-UBTT_DebugPrintBBValue::UBTT_DebugPrintBBValue(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "DebugPrintBBValue";
-}
-
-EBTNodeResult::Type UBTT_DebugPrintBBValue::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- UKismetSystemLibrary::PrintString(
- nullptr, GetBBKeyDescription(OwnerComp),
- true, true,
- Color, Duration, Key
- );
- return Super::ExecuteTask(OwnerComp, NodeMemory);
-}
-
-FString UBTT_DebugPrintBBValue::GetBBKeyDescription(UBehaviorTreeComponent& OwnerComp)
-{
- const UBlackboardData* BlackboardAsset = GetBlackboardAsset();
- BlackboardKey.ResolveSelectedKey(*BlackboardAsset);
-
- const FBlackboardEntry* EntryInfo = BlackboardAsset ? BlackboardAsset->GetKey(BlackboardKey.GetSelectedKeyID()) : NULL;
-
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
-
- EBlackboardValueType BBValueType = UUHLAIBlueprintLibrary::BlackboardKeyToBBValueType(BlackboardKey);
-
- FString Description = FString();
-
- switch (BBValueType)
- {
- case EBlackboardValueType::Bool:
- {
- bool BoolValue = BlackboardComponent->GetValueAsBool(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %hhd"), *BlackboardKey.SelectedKeyName.ToString(), BoolValue);
- }
- break;
- case EBlackboardValueType::Int:
- {
- int32 IntValue = BlackboardComponent->GetValueAsInt(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %d"), *BlackboardKey.SelectedKeyName.ToString(), IntValue);
- }
- break;
- case EBlackboardValueType::Float:
- {
- float FloatValue = BlackboardComponent->GetValueAsFloat(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %f"), *BlackboardKey.SelectedKeyName.ToString(), FloatValue);
- }
- break;
- case EBlackboardValueType::String:
- {
- FString StringValue = BlackboardComponent->GetValueAsString(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *StringValue);
- }
- break;
- case EBlackboardValueType::Name:
- {
- FName NameValue = BlackboardComponent->GetValueAsName(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *NameValue.ToString());
- }
- break;
- case EBlackboardValueType::Vector:
- {
- FVector VectorValue = BlackboardComponent->GetValueAsVector(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *VectorValue.ToString());
- }
- break;
- case EBlackboardValueType::Rotator:
- {
- FRotator RotatorValue = BlackboardComponent->GetValueAsRotator(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *RotatorValue.ToString());
- }
- break;
- case EBlackboardValueType::Enum:
- {
- UEnum* Enum = (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass())
- ? ((UBlackboardKeyType_Enum*)(EntryInfo->KeyType))->EnumType
- : ((UBlackboardKeyType_NativeEnum*)(EntryInfo->KeyType))->EnumType;
- uint8 EnumValue = BlackboardComponent->GetValueAsEnum(BlackboardKey.SelectedKeyName);
-
- FString EnumStringValue = Enum->GetNameStringByValue(EnumValue);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *EnumStringValue);
- }
- break;
- case EBlackboardValueType::NativeEnum:
- {
- UEnum* Enum = (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass())
- ? ((UBlackboardKeyType_Enum*)(EntryInfo->KeyType))->EnumType
- : ((UBlackboardKeyType_NativeEnum*)(EntryInfo->KeyType))->EnumType;
- uint8 EnumValue = BlackboardComponent->GetValueAsEnum(BlackboardKey.SelectedKeyName);
- FString EnumStringValue = Enum->GetNameStringByValue(EnumValue);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *EnumStringValue);
- }
- break;
- case EBlackboardValueType::Object:
- {
- FBlackboardKeySelector ObjectValue = BlackboardKey;
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), *ObjectValue.SelectedKeyName.ToString());
- }
- break;
- case EBlackboardValueType::Class:
- {
- UClass* ClassValue = BlackboardComponent->GetValueAsClass(BlackboardKey.SelectedKeyName);
- Description = FString::Printf(TEXT("\"%s\" is %s"), *BlackboardKey.SelectedKeyName.ToString(), ClassValue ? *ClassValue->GetName() : TEXT(""));
- }
- break;
-
- default:
- break;
- }
-
- return FString::Printf(TEXT("%s"), *Description);
-}
-
-FString UBTT_DebugPrintBBValue::GetStaticDescription() const
-{
- return FString::Printf(TEXT("%s: %s"), *Super::GetStaticDescription(), *BlackboardKey.SelectedKeyName.ToString());
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_DebugPrintString.cpp b/Source/UHLAI/Private/Tasks/BTT_DebugPrintString.cpp
deleted file mode 100644
index 8c7849ba..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_DebugPrintString.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_DebugPrintString.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_DebugPrintString)
-
-UBTT_DebugPrintString::UBTT_DebugPrintString(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "DebugPrintString";
-}
-
-EBTNodeResult::Type UBTT_DebugPrintString::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- UKismetSystemLibrary::PrintString(
- nullptr, GetFinalString(),
- true, true,
- Color, Duration.GetValue(OwnerComp), Key.GetValue(OwnerComp)
- );
- return Super::ExecuteTask(OwnerComp, NodeMemory);
-}
-
-FString UBTT_DebugPrintString::GetStaticDescription() const
-{
- return FString::Printf(TEXT("%s: \"%s\""), *Super::GetStaticDescription(), *GetFinalString());
-}
-
-FString UBTT_DebugPrintString::GetFinalString() const
-{
- FString Result = "";
- for (FValueOrBBKey_String PrintString : PrintStrings)
- {
- Result.Append(PrintString.ToString());
- }
- return Result;
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_FireGameplayEvent.cpp b/Source/UHLAI/Private/Tasks/BTT_FireGameplayEvent.cpp
deleted file mode 100644
index d570c9b3..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_FireGameplayEvent.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_FireGameplayEvent.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemGlobals.h"
-#include "AbilitySystemInterface.h"
-#include "BehaviorTree/BlackboardComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_FireGameplayEvent)
-
-UBTT_FireGameplayEvent::UBTT_FireGameplayEvent(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- Target.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_FireGameplayEvent, Target), AActor::StaticClass());
- Instigator.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_FireGameplayEvent, Instigator), AActor::StaticClass());
-
- Target.SelectedKeyName = FBlackboard::KeySelf;
- Instigator.SelectedKeyName = FBlackboard::KeySelf;
-
- OptionalObject.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_FireGameplayEvent, OptionalObject), UObject::StaticClass());
- OptionalObject.AllowNoneAsValue(true);
- OptionalObject2.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_FireGameplayEvent, OptionalObject2), UObject::StaticClass());
- OptionalObject2.AllowNoneAsValue(true);
-}
-
-EBTNodeResult::Type UBTT_FireGameplayEvent::ExecuteTask(
- UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- const UBlackboardData* BlackboardAsset = GetBlackboardAsset();
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardAsset) return EBTNodeResult::Failed;
-
- Target.ResolveSelectedKey(*BlackboardAsset);
- Instigator.ResolveSelectedKey(*BlackboardAsset);
- OptionalObject.ResolveSelectedKey(*BlackboardAsset);
- OptionalObject2.ResolveSelectedKey(*BlackboardAsset);
-
- if (!Target.IsSet() || !Instigator.IsSet())
- {
- return EBTNodeResult::Failed;
- }
-
- UObject* TargetValue = BlackboardComponent->GetValueAsObject(Target.SelectedKeyName);
- UObject* InstigatorValue = BlackboardComponent->GetValueAsObject(Instigator.SelectedKeyName);
- if (!TargetValue || !InstigatorValue) return EBTNodeResult::Failed;
-
- AActor* TargetActor = Cast(TargetValue);
- AActor* InstigatorActor = Cast(InstigatorValue);
- if (!TargetActor || !InstigatorActor) return EBTNodeResult::Failed;
-
- UAbilitySystemComponent* TargetASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(TargetActor);
-
- FGameplayEventData EventData;
- EventData.Target = TargetActor;
- EventData.Instigator = InstigatorActor;
- EventData.EventMagnitude = EventMagnitude;
- EventData.OptionalObject = BlackboardComponent->GetValueAsObject(OptionalObject.SelectedKeyName);
- EventData.OptionalObject2 = BlackboardComponent->GetValueAsObject(OptionalObject2.SelectedKeyName);
- EventData.TargetTags = TargetTags;
- EventData.InstigatorTags = InstigatorTags;
- TargetASC->HandleGameplayEvent(EventTag, &EventData);
-
- return Super::ExecuteTask(OwnerComp, NodeMemory);
-}
-
-FString UBTT_FireGameplayEvent::GetStaticDescription() const
-{
- return Super::GetStaticDescription();
-}
-
diff --git a/Source/UHLAI/Private/Tasks/BTT_InvokeGameplayAbility.cpp b/Source/UHLAI/Private/Tasks/BTT_InvokeGameplayAbility.cpp
deleted file mode 100644
index 0a365863..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_InvokeGameplayAbility.cpp
+++ /dev/null
@@ -1,186 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_InvokeGameplayAbility.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemInterface.h"
-#include "AIController.h"
-#include "AbilitySystemGlobals.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_InvokeGameplayAbility)
-
-UBTT_InvokeGameplayAbility::UBTT_InvokeGameplayAbility(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "InvokeGameplayAbility";
-
- bNotifyTaskFinished = true;
- // TODO probably instancing required or won't work with multiple InvokeGameplayAbilities/multiple enemies
- // as in PlayAnimMontage - yep its required
- // TODO try to remove instancing, to reproduce issue with stucking on "InvokeGameplayAbility"
- // create room with enemy only attacking infinitely
- // bCreateNodeInstance = true;
-}
-
-EBTNodeResult::Type UBTT_InvokeGameplayAbility::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- EBTNodeResult::Type Result = EBTNodeResult::Failed;
- bool GameplayAbilitySpecFound = false;
-
- TObjectPtr AIOwner = OwnerComp.GetAIOwner();
- if (!AIOwner) return EBTNodeResult::Failed;
-
- UAbilitySystemComponent* ASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(AIOwner->GetPawn());
- if (!ASC)
- {
- if (bDebugMessages.GetValue(OwnerComp))
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("[BTT_InvokeGameplayAbility] OwnerActor \"%s\" don't have AbilitySystem(implements IAbilitySystemInterface) add it"), *AIOwner->GetPawn()->GetName()));
- }
- return EBTNodeResult::Failed;
- }
-
- FGameplayAbilitySpec* AbilitySpec = nullptr;
- FGameplayAbilitySpecHandle* GameplayAbilitiesSpecHandle = nullptr;
-
- // TODO UHL->FindAbilitySpecByTags?
- TArray GameplayAbilitiesSpecs = {};
- ASC->GetAllAbilities(GameplayAbilitiesSpecs);
- for (FGameplayAbilitySpecHandle GameplayAbilitiesSpecSearch : GameplayAbilitiesSpecs)
- {
- FGameplayAbilitySpec* AbilitySpecSearch = ASC->FindAbilitySpecFromHandle(GameplayAbilitiesSpecSearch);
- if (AbilitySpecSearch->Ability->GetAssetTags().HasAny(GameplayTag.GetValue(OwnerComp).GetSingleTagContainer()))
- {
- AbilitySpec = AbilitySpecSearch;
- GameplayAbilitiesSpecHandle = &GameplayAbilitiesSpecSearch;
- GameplayAbilitySpecFound = true;
- break;
- }
- }
-
- if (bActivate)
- {
- if (GameplayAbilitySpecFound && AbilitySpec != nullptr)
- {
- if (bWaitForFinishing.GetValue(OwnerComp))
- {
- ASC->OnAbilityEnded.AddUObject(this, &UBTT_InvokeGameplayAbility::OnAbilityEnded, &OwnerComp);
- }
- bool bAbilityActivated = ASC->TryActivateAbility(AbilitySpec->Handle, true);
-
- Result = bAbilityActivated ? EBTNodeResult::InProgress : EBTNodeResult::Failed;
-
- if (!bWaitForFinishing.GetValue(OwnerComp))
- {
- Result = EBTNodeResult::Succeeded;
- }
-
- if (bDebugMessages.GetValue(OwnerComp))
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("[BTT_InvokeGameplayAbility] TryActivateAbility - \"%s\" - %s"), *GameplayTag.GetValue(OwnerComp).ToString(), bAbilityActivated ? TEXT("activated") : TEXT("failed")));
- }
- }
- else
- {
- if (bDebugMessages.GetValue(OwnerComp))
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("[BTT_InvokeGameplayAbility] Ability - \"%s\" - not found, give it to character if forgot"), *GameplayTag.GetValue(OwnerComp).ToString()));
- }
- }
- }
- else
- {
- if (GameplayAbilitySpecFound && GameplayAbilitiesSpecHandle != nullptr)
- {
- ASC->CancelAbilityHandle(*GameplayAbilitiesSpecHandle);
- }
- Result = EBTNodeResult::Succeeded;
- }
-
- return Result;
-}
-
-EBTNodeResult::Type UBTT_InvokeGameplayAbility::AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- bIsAborting = true;
-
- TObjectPtr AIOwner = OwnerComp.GetAIOwner();
- if (AIOwner)
- {
- UAbilitySystemComponent* ASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(AIOwner->GetPawn());
-
- if (ASC)
- {
- const FGameplayTagContainer TagsContainer = FGameplayTagContainer(GameplayTag.GetValue(OwnerComp));
- ASC->CancelAbilities(&TagsContainer);
- if (bWaitForFinishing.GetValue(OwnerComp))
- {
- ASC->OnAbilityEnded.RemoveAll(this);
- }
-
- if (bDebugMessages.GetValue(OwnerComp))
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("[BTT_InvokeGameplayAbility] Task was aborted, CancelAbility - %s"), *GameplayTag.GetValue(OwnerComp).ToString()));
- }
- }
- }
-
- return Super::AbortTask(OwnerComp, NodeMemory);
-}
-
-void UBTT_InvokeGameplayAbility::OnTaskFinished(
- UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTNodeResult::Type TaskResult)
-{
- FInvokeGameplayAbilityMemory* MyMemory = CastInstanceNodeMemory(NodeMemory);
- check(MyMemory);
-
- if (TaskResult != EBTNodeResult::InProgress && MyMemory->AbilityEndHandle.IsValid())
- {
- const AAIController* AIController = OwnerComp.GetAIOwner();
- if (IsValid(AIController))
- {
- UAbilitySystemComponent* AbilityComponent = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(AIController->GetPawn());
- if (IsValid(AbilityComponent))
- {
- AbilityComponent->OnAbilityEnded.Remove(MyMemory->AbilityEndHandle);
- MyMemory->AbilityEndHandle.Reset();
- }
- }
- }
-}
-
-void UBTT_InvokeGameplayAbility::InitializeMemory(
- UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const
-{
- FInvokeGameplayAbilityMemory* MyMemory = CastInstanceNodeMemory(NodeMemory);
- check(MyMemory);
-
- MyMemory->AbilityEndHandle.Reset();
-}
-
-FString UBTT_InvokeGameplayAbility::GetStaticDescription() const
-{
- return FString::Printf(TEXT("%s: \n%s"), *Super::GetStaticDescription(), !GameplayTag.ToString().IsEmpty() ? *GameplayTag.ToString() : TEXT(""));
-}
-
-void UBTT_InvokeGameplayAbility::OnAbilityEnded(
- const FAbilityEndedData& AbilityEndedData, UBehaviorTreeComponent* OwnerComp)
-{
- // if not works check "AbilitySystemComponentTests.IsSameAbility"
- if (!AbilityEndedData.AbilityThatEnded->GetAssetTags().HasAllExact(FGameplayTagContainer(GameplayTag.GetValue(OwnerComp)))) return;
-
- const EBTNodeResult::Type NodeResult(EBTNodeResult::Succeeded);
-
- const AAIController* AIController = OwnerComp->GetAIOwner();
- const AActor* BehaviorOwner = IsValid(AIController) ? AIController->GetPawn() : nullptr;
- const AActor* AbilityOwner = AbilityEndedData.AbilityThatEnded->GetAvatarActorFromActorInfo();
-
- if (AbilityOwner == BehaviorOwner)
- {
- const EBTNodeResult::Type CancelResult = bTreatCancelledAbilityAsSuccess.GetValue(OwnerComp) ? EBTNodeResult::Succeeded : EBTNodeResult::Failed;
- const EBTNodeResult::Type TaskResult = AbilityEndedData.bWasCancelled ? CancelResult : EBTNodeResult::Succeeded;
- FinishLatentTask(*OwnerComp, TaskResult);
- }
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_PlayAnimMontage.cpp b/Source/UHLAI/Private/Tasks/BTT_PlayAnimMontage.cpp
deleted file mode 100644
index 1a35d315..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_PlayAnimMontage.cpp
+++ /dev/null
@@ -1,175 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_PlayAnimMontage.h"
-
-#include "AIController.h"
-#include "Engine/World.h"
-#include "TimerManager.h"
-#include "Animation/AnimMontage.h"
-#include "Components/SkeletalMeshComponent.h"
-#include "GameFramework/Character.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_PlayAnimMontage)
-
-DEFINE_LOG_CATEGORY(LogBTT_PlayAnimMontage);
-
-UBTT_PlayAnimMontage::UBTT_PlayAnimMontage(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- NodeName = "PlayAnimMontage";
- // instantiating to be able to use Timers
- bCreateNodeInstance = true;
-}
-
-EBTNodeResult::Type UBTT_PlayAnimMontage::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- AIOwner = OwnerComp.GetAIOwner();
- ACharacter* Character = AIOwner.IsValid() ? AIOwner->GetCharacter() : nullptr;
-
- bool bPlayMontage = PlayMontage(
- Character ? Character->GetMesh() : nullptr,
- AnimMontage,
- PlayRate,
- StartingPosition,
- StartSectionName
- );
-
- return bPlayMontage ? EBTNodeResult::InProgress : EBTNodeResult::Failed;
-}
-
-EBTNodeResult::Type UBTT_PlayAnimMontage::AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- ClearMontageDelegate();
-
- if (StopMontageOnAbort && AIOwner.IsValid())
- {
- if (ACharacter* Character = AIOwner->GetCharacter())
- {
- Character->StopAnimMontage();
- }
- }
- return Super::AbortTask(OwnerComp, NodeMemory);
-}
-
-void UBTT_PlayAnimMontage::OnTaskFinished(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,EBTNodeResult::Type TaskResult)
-{
- ClearMontageDelegate();
- Super::OnTaskFinished(OwnerComp, NodeMemory, TaskResult);
-}
-
-FString UBTT_PlayAnimMontage::GetStaticDescription() const
-{
- return FString::Printf(
- TEXT(
- "AnimMontage: %s\n"
- "PlayRate: %f\n"
- "StartingPosition: %f\n"
- "StartSectionName: %s\n"
- "StopMontageOnAbort: %s\n"
- "TaskNodeEndPolicy: %s"),
- AnimMontage ? *AnimMontage->GetName() : TEXT("None"),
- PlayRate,
- StartingPosition,
- *StartSectionName.ToString(),
- StopMontageOnAbort ? TEXT("True") : TEXT("False"),
- TaskNodeEndPolicy == ETaskNodeEndPolicy::OnMontageEnded ? TEXT("OnMontageEnded") : TEXT("OnMontageBlendingOut")
- );
-}
-
-
-bool UBTT_PlayAnimMontage::PlayMontage(USkeletalMeshComponent* InSkeletalMeshComponent, UAnimMontage* MontageToPlay,
- float InPlayRate, float InStartingPosition, FName InStartingSection)
-{
- bool bPlayedSuccessfully = false;
-
- if (UAnimInstance* AnimInstance = InSkeletalMeshComponent ? InSkeletalMeshComponent->GetAnimInstance() : nullptr)
- {
- const float MontageLength = AnimInstance->Montage_Play(MontageToPlay, InPlayRate,EMontagePlayReturnType::MontageLength,InStartingPosition);
-
- bPlayedSuccessfully = (MontageLength > 0.f);
-
- if (bPlayedSuccessfully)
- {
- if (InStartingSection != NAME_None)
- {
- AnimInstance->Montage_JumpToSection(InStartingSection, MontageToPlay);
- }
-
- /**
- * If a callback is set within this Tick, the notification of the previous montage interrupted will be called!
- * We need to consume a Tick to prevent the notification of the previous montage interrupted
- * from triggering on the current launched montage
- */
- GetWorld()->GetTimerManager().SetTimerForNextTick([&]()
- {
- ACharacter* Character = AIOwner.IsValid() ? AIOwner->GetCharacter() : nullptr;
- USkeletalMeshComponent* MeshComponent = Character ? Character->GetMesh() : nullptr;
- UAnimInstance* AnimIns = MeshComponent ? MeshComponent->GetAnimInstance() : nullptr;
- if (AnimIns)
- {
- if (TaskNodeEndPolicy == ETaskNodeEndPolicy::OnMontageBlendingOut)
- {
- AnimIns->OnMontageBlendingOut.AddUniqueDynamic(
- this, &UBTT_PlayAnimMontage::OnMontageBlendingOut);
- }
- else if (TaskNodeEndPolicy == ETaskNodeEndPolicy::OnMontageEnded)
- {
- AnimIns->OnMontageEnded.AddUniqueDynamic(this, &UBTT_PlayAnimMontage::OnMontageEnded);
- }
- }
- });
- }
- }
-
- return bPlayedSuccessfully;
-}
-
-
-void UBTT_PlayAnimMontage::OnMontageEnded(UAnimMontage* InAnimMontage, bool bInterrupted)
-{
- if (InAnimMontage != AnimMontage)
- {
- return;
- }
-
- FinishTaskNode();
-}
-
-void UBTT_PlayAnimMontage::OnMontageBlendingOut(UAnimMontage* InAnimMontage, bool bInterrupted)
-{
- if (InAnimMontage != AnimMontage)
- {
- return;
- }
-
- FinishTaskNode();
-}
-
-void UBTT_PlayAnimMontage::FinishTaskNode()
-{
- UBehaviorTreeComponent* OwnerComp = AIOwner.IsValid()? Cast(AIOwner->BrainComponent): nullptr;
-
- ClearMontageDelegate();
-
- if (OwnerComp)
- {
- FinishLatentTask(*OwnerComp, EBTNodeResult::Succeeded);
- }
-}
-
-void UBTT_PlayAnimMontage::ClearMontageDelegate()
-{
- if (AIOwner.IsValid())
- {
- ACharacter* Character = AIOwner->GetCharacter();
- USkeletalMeshComponent* MeshComponent = Character ? Character->GetMesh() : nullptr;
- UAnimInstance* AnimInstance = MeshComponent ? MeshComponent->GetAnimInstance() : nullptr;
-
- if (AnimInstance)
- {
- AnimInstance->OnMontageEnded.RemoveAll(this);
- AnimInstance->OnMontageBlendingOut.RemoveAll(this);
- }
- }
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_SetBBValue.cpp b/Source/UHLAI/Private/Tasks/BTT_SetBBValue.cpp
deleted file mode 100644
index 5a02b1f8..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_SetBBValue.cpp
+++ /dev/null
@@ -1,266 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_SetBBValue.h"
-
-#include "UHLAIBlueprintLibrary.h"
-#include "BehaviorTree/BehaviorTree.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/BlackboardData.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Bool.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Class.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Enum.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Float.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Int.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Name.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_NativeEnum.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Rotator.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_String.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_SetBBValue)
-
-UBTT_SetBBValue::UBTT_SetBBValue(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- ObjectValue.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_SetBBValue, ObjectValue), UObject::StaticClass());
-}
-
-EBTNodeResult::Type UBTT_SetBBValue::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- const UBlackboardData* BlackboardAsset = GetBlackboardAsset();
- UBlackboardComponent* BlackboardComponent = OwnerComp.GetBlackboardComponent();
- if (!BlackboardAsset) return EBTNodeResult::Failed;
-
- BlackboardKey.ResolveSelectedKey(*BlackboardAsset);
-
- const FBlackboardEntry* EntryInfo = BlackboardAsset ? BlackboardAsset->GetKey(BlackboardKey.GetSelectedKeyID()) : NULL;
-
-
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Bool::StaticClass())
- {
- BlackboardComponent->SetValueAsBool(BlackboardKey.SelectedKeyName, BoolValue);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Int::StaticClass())
- {
- int32 CurrentValue = BlackboardComponent->GetValueAsInt(BlackboardKey.SelectedKeyName);
- int32 Result = OperationOnBBValue.CalculateIntResult(OwnerComp, CurrentValue);
- BlackboardComponent->SetValueAsInt(BlackboardKey.SelectedKeyName, Result);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Float::StaticClass())
- {
- float CurrentValue = BlackboardComponent->GetValueAsFloat(BlackboardKey.SelectedKeyName);
- float Result = OperationOnBBValue.CalculateFloatResult(OwnerComp, CurrentValue);
- BlackboardComponent->SetValueAsFloat(BlackboardKey.SelectedKeyName, Result);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_String::StaticClass())
- {
- BlackboardComponent->SetValueAsString(BlackboardKey.SelectedKeyName, StringValue);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Name::StaticClass())
- {
- BlackboardComponent->SetValueAsName(BlackboardKey.SelectedKeyName, NameValue);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass())
- {
- FVector CurrentValue = BlackboardComponent->GetValueAsVector(BlackboardKey.SelectedKeyName);
- FVector Result = OperationOnBBValue.CalculateVectorResult(OwnerComp, CurrentValue);
- BlackboardComponent->SetValueAsVector(BlackboardKey.SelectedKeyName, Result);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Rotator::StaticClass())
- {
- FRotator CurrentValue = BlackboardComponent->GetValueAsRotator(BlackboardKey.SelectedKeyName);
- FRotator Result = OperationOnBBValue.CalculateRotatorResult(OwnerComp, CurrentValue);
- BlackboardComponent->SetValueAsRotator(BlackboardKey.SelectedKeyName, Result);
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass())
- {
- CurrentEnum = ((UBlackboardKeyType_Enum*)(EntryInfo->KeyType))->EnumType;
- if (CurrentEnum)
- {
- BlackboardComponent->SetValueAsEnum(BlackboardKey.SelectedKeyName, CurrentEnum->GetValueByNameString(EnumStringValue));
- }
- else
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings("Enum from BB key ", BlackboardKey.SelectedKeyName.ToString(), "not found");
- }
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_NativeEnum::StaticClass())
- {
- CurrentEnum = ((UBlackboardKeyType_NativeEnum*)(EntryInfo->KeyType))->EnumType;
- if (CurrentEnum)
- {
- BlackboardComponent->SetValueAsEnum(BlackboardKey.SelectedKeyName, CurrentEnum->GetValueByNameString(EnumStringValue));
- }
- else
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings("Enum from BB key ", BlackboardKey.SelectedKeyName.ToString(), "not found");
- }
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Object::StaticClass())
- {
- if (ObjectValue.NeedsResolving())
- {
- ObjectValue.ResolveSelectedKey(*BlackboardAsset);
- }
- BlackboardComponent->SetValueAsObject(BlackboardKey.SelectedKeyName, BlackboardComponent->GetValueAsObject(ObjectValue.SelectedKeyName));
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Class::StaticClass())
- {
- BlackboardComponent->SetValueAsClass(BlackboardKey.SelectedKeyName, ClassValue);
- }
-
- return Super::ExecuteTask(OwnerComp, NodeMemory);
-}
-
-FString UBTT_SetBBValue::GetStaticDescription() const
-{
- FString Description = FString();
-
- switch (CurrentBBKeyValueType)
- {
- case EBlackboardValueType::Bool:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), BoolValue ? TEXT("true") : TEXT("false"));
- break;
- case EBlackboardValueType::Int:
- Description = OperationOnBBValue.ToStringIntValue(BlackboardKey.SelectedKeyName.ToString());
- break;
- case EBlackboardValueType::Float:
- Description = OperationOnBBValue.ToStringFloatValue(BlackboardKey.SelectedKeyName.ToString());
- break;
- case EBlackboardValueType::String:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), *StringValue);
- break;
- case EBlackboardValueType::Name:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), *NameValue.ToString());
- break;
- case EBlackboardValueType::Vector:
- Description = OperationOnBBValue.ToStringVectorValue(BlackboardKey.SelectedKeyName.ToString());
- break;
- case EBlackboardValueType::Rotator:
- Description = OperationOnBBValue.ToStringRotatorValue(BlackboardKey.SelectedKeyName.ToString());
- break;
- case EBlackboardValueType::Enum:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), *EnumStringValue);
- break;
- case EBlackboardValueType::NativeEnum:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), *EnumStringValue);
- break;
- case EBlackboardValueType::Object:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), *ObjectValue.SelectedKeyName.ToString());
- break;
- case EBlackboardValueType::Class:
- Description = FString::Printf(TEXT("Set \"%s\" to %s"), *BlackboardKey.SelectedKeyName.ToString(), ClassValue ? *ClassValue->GetName() : TEXT(""));
- break;
- default:
- break;
- }
-
- // return FString::Printf(TEXT("%s: \n%s"), *Super::GetStaticDescription(), *Description);
- return FString::Printf(TEXT("%s"), *Description);
-}
-
-void UBTT_SetBBValue::InitializeFromAsset(UBehaviorTree& Asset)
-{
- Super::InitializeFromAsset(Asset);
-
- BlackboardKey.ResolveSelectedKey(*Asset.BlackboardAsset);
-
- CurrentBBKeyValueType = UUHLAIBlueprintLibrary::BlackboardKeyToBBValueType(BlackboardKey);
- OperationOnBBValue.SetCurrentBBKeyValueType(CurrentBBKeyValueType);
-}
-
-void UBTT_SetBBValue::PostLoad()
-{
- Super::PostLoad();
-
- // migrate to FOperationOnBBValue
- if (!bMigratedToMathOperation)
- {
- if (MathOperation != EUHL_MathOperations::None)
- {
- OperationOnBBValue.MathOperation = MathOperation;
- MathOperation = EUHL_MathOperations::None;
- }
- if (IntValue != 0)
- {
- OperationOnBBValue.IntValue = IntValue;
- IntValue = 0;
- };
- if (FloatValue != 0)
- {
- OperationOnBBValue.FloatValue = FloatValue;
- FloatValue = 0;
- };
- if (VectorValue != FVector::ZeroVector)
- {
- OperationOnBBValue.VectorValue = VectorValue;
- VectorValue = FVector::ZeroVector;
- };
- if (RotatorValue != FRotator::ZeroRotator)
- {
- OperationOnBBValue.RotatorValue = RotatorValue;
- RotatorValue = FRotator::ZeroRotator;
- };
-
- bMigratedToMathOperation = true;
- }
-}
-
-#if WITH_EDITOR
-void UBTT_SetBBValue::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
-{
- Super::PostEditChangeProperty(PropertyChangedEvent);
-
- const UBlackboardData* BlackboardAsset = GetBlackboardAsset();
- if (!BlackboardAsset) return;
-
- if (!BlackboardKey.IsSet()) return;
- BlackboardKey.ResolveSelectedKey(*BlackboardAsset);
-
- CurrentBBKeyValueType = UUHLAIBlueprintLibrary::BlackboardKeyToBBValueType(BlackboardKey);
- OperationOnBBValue.SetCurrentBBKeyValueType(CurrentBBKeyValueType);
-
- // if (CurrentBBKeyValueType == EBlackboardValueType::Int)
- // {
- // MathOperation = EUHL_MathOperations::Set;
- // }
-}
-#endif
-
-TArray UBTT_SetBBValue::GetEnumOptions()
-{
- TArray Result = {};
-
- const UBlackboardData* BlackboardAsset = GetBlackboardAsset();
- if (!BlackboardAsset) return Result;
-
- BlackboardKey.ResolveSelectedKey(*BlackboardAsset);
- const FBlackboardEntry* EntryInfo = BlackboardAsset ? BlackboardAsset->GetKey(BlackboardKey.GetSelectedKeyID()) : NULL;
-
- if (BlackboardKey.SelectedKeyType != UBlackboardKeyType_Enum::StaticClass()
- || BlackboardKey.SelectedKeyType != UBlackboardKeyType_NativeEnum::StaticClass())
- {
- return Result;
- }
-
- if (!EntryInfo) return Result;
-
- const UEnum* Enum = (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass())
- ? ((UBlackboardKeyType_Enum*)(EntryInfo->KeyType))->EnumType
- : ((UBlackboardKeyType_NativeEnum*)(EntryInfo->KeyType))->EnumType;
-
- if (!Enum || !Enum->IsValidLowLevel())
- {
- return Result;
- }
-
- for (int32 i = 0; i < Enum->NumEnums(); i++)
- {
- Result.Add(Enum->GetNameByIndex(i).ToString());
- }
-
- return Result;
-}
diff --git a/Source/UHLAI/Private/Tasks/BTT_TurnTo.cpp b/Source/UHLAI/Private/Tasks/BTT_TurnTo.cpp
deleted file mode 100644
index 90f5e546..00000000
--- a/Source/UHLAI/Private/Tasks/BTT_TurnTo.cpp
+++ /dev/null
@@ -1,364 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/BTT_TurnTo.h"
-
-#include "AIController.h"
-#include "BehaviorTree/BlackboardComponent.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Rotator.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h"
-#include "GameFramework/Actor.h"
-#include "GameFramework/Character.h"
-#include "Animation/AnimMontage.h"
-#include "DrawDebugHelpers.h"
-#include "Core/UHLAIActorSettings.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_TurnTo)
-
-void UBTT_TurnTo::SetupPreset_Default_90_180()
-{
- TurnSettings.SetupPreset_Default_90_180();
-}
-
-void UBTT_TurnTo::SetupPreset_BigEnemy_90_180()
-{
- TurnSettings.SetupPreset_BigEnemy_90_180();
-}
-
-void UBTT_TurnTo::SetupPreset_45_90_180()
-{
- TurnSettings.SetupPreset_45_90_180();
-}
-
-void UBTT_TurnTo::SetupPreset_15_45_90_180()
-{
- TurnSettings.SetupPreset_15_45_90_180();
-}
-
-void UBTT_TurnTo::SetupPreset_15_30_45_90_180()
-{
- TurnSettings.SetupPreset_15_30_45_90_180();
-}
-
-void UBTT_TurnTo::Cleanup()
-{
- TurnSettings.Cleanup();
-}
-
-UBTT_TurnTo::UBTT_TurnTo(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
- , Precision(10.f)
-{
- NodeName = "TurnTo";
- INIT_TASK_NODE_NOTIFY_FLAGS();
-
- // accept only actors and vectors
- BlackboardKey.AddObjectFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_TurnTo, BlackboardKey), AActor::StaticClass());
- // TODO add support for Vectors/Rotators
- BlackboardKey.AddVectorFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_TurnTo, BlackboardKey));
- // BlackboardKey.AddRotatorFilter(this, GET_MEMBER_NAME_CHECKED(UBTT_TurnTo, BlackboardKey));
-}
-
-void UBTT_TurnTo::PostInitProperties()
-{
- Super::PostInitProperties();
-
- PrecisionDot = FMath::Cos(FMath::DegreesToRadians(Precision));
-}
-
-void UBTT_TurnTo::PostLoad()
-{
- Super::PostLoad();
-
- PrecisionDot = FMath::Cos(FMath::DegreesToRadians(Precision));
-}
-
-EBTNodeResult::Type UBTT_TurnTo::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- AAIController* AIController = OwnerComp.GetAIOwner();
-
- if (AIController == NULL || AIController->GetPawn() == NULL)
- {
- return EBTNodeResult::Failed;
- }
-
- FBTTurnToMemory* MyMemory = CastInstanceNodeMemory(NodeMemory);
- check(MyMemory);
- MyMemory->Reset();
-
- EBTNodeResult::Type Result = EBTNodeResult::Failed;
-
- APawn* Pawn = AIController->GetPawn();
-
- const FVector PawnLocation = Pawn->GetActorLocation();
- const UBlackboardComponent* MyBlackboard = OwnerComp.GetBlackboardComponent();
-
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Object::StaticClass())
- {
- UObject* KeyValue = MyBlackboard->GetValue(BlackboardKey.GetSelectedKeyID());
- AActor* ActorValue = Cast(KeyValue);
-
- if (ActorValue != NULL)
- {
- const FVector::FReal AngleDifference = TurnToStatics::CalculateAngleDifferenceDot(Pawn->GetActorForwardVector()
- , (ActorValue->GetActorLocation() - PawnLocation));
-
- if (AngleDifference >= PrecisionDot)
- {
- Result = EBTNodeResult::Succeeded;
- }
- else
- {
- AIController->SetFocus(ActorValue, EAIFocusPriority::Gameplay);
- MyMemory->FocusActorSet = ActorValue;
- MyMemory->bActorSet = true;
- if (Pawn->GetClass()->ImplementsInterface(UUHLAIActorSettings::StaticClass()))
- {
- MyMemory->TurnSettings = GetTurnSettings(Pawn, MyMemory->bCurrentTurnSettingsSet);
- }
- Result = EBTNodeResult::InProgress;
- }
- }
- }
- // TODO add support for Vectors/Rotators
- else if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass())
- {
- const FVector KeyValue = MyBlackboard->GetValue(BlackboardKey.GetSelectedKeyID());
-
- if (FAISystem::IsValidLocation(KeyValue))
- {
- const FVector::FReal AngleDifference = TurnToStatics::CalculateAngleDifferenceDot(Pawn->GetActorForwardVector()
- , (KeyValue - PawnLocation));
-
- if (AngleDifference >= PrecisionDot)
- {
- Result = EBTNodeResult::Succeeded;
- }
- else
- {
- AIController->SetFocalPoint(KeyValue, EAIFocusPriority::Gameplay);
- MyMemory->FocusLocationSet = KeyValue;
- MyMemory->bActorSet = false;
- if (Pawn->GetClass()->ImplementsInterface(UUHLAIActorSettings::StaticClass()))
- {
- MyMemory->TurnSettings = GetTurnSettings(Pawn, MyMemory->bCurrentTurnSettingsSet);
- }
- Result = EBTNodeResult::InProgress;
- }
- }
- }
- // else if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Rotator::StaticClass())
- // {
- // const FRotator KeyValue = MyBlackboard->GetValue(BlackboardKey.GetSelectedKeyID());
- //
- // if (FAISystem::IsValidRotation(KeyValue))
- // {
- // const FVector DirectionVector = KeyValue.Vector();
- // const FVector::FReal AngleDifference = CalculateAngleDifferenceDot(Pawn->GetActorForwardVector(), DirectionVector);
- //
- // if (AngleDifference >= PrecisionDot)
- // {
- // Result = EBTNodeResult::Succeeded;
- // }
- // else
- // {
- // const FVector FocalPoint = PawnLocation + DirectionVector * 10000.0f;
- // // set focal somewhere far in the indicated direction
- // AIController->SetFocalPoint(FocalPoint, EAIFocusPriority::Gameplay);
- // MyMemory->FocusLocationSet = FocalPoint;
- // Result = EBTNodeResult::InProgress;
- // }
- // }
- // }
-
- return Result;
-}
-
-void UBTT_TurnTo::TickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds)
-{
- AAIController* AIController = OwnerComp.GetAIOwner();
-
- FBTTurnToMemory* MyMemory = CastInstanceNodeMemory(NodeMemory);
- check(MyMemory);
-
- if (AIController == NULL || AIController->GetPawn() == NULL)
- {
- FinishLatentTask(OwnerComp, EBTNodeResult::Failed);
- }
- else
- {
- const FVector PawnDirection = AIController->GetPawn()->GetActorForwardVector();
- const FVector FocalPoint = AIController->GetFocalPointForPriority(EAIFocusPriority::Gameplay);
- ACharacter* AICharacter = AIController->GetCharacter();
-
- if (FocalPoint != FAISystem::InvalidLocation)
- {
- float DeltaAngleRad = TurnToStatics::CalculateAngleDifferenceDot(PawnDirection, FocalPoint - AIController->GetPawn()->GetActorLocation());
- // float DeltaAngle = FMath::RadiansToDegrees(FMath::Acos(DeltaAngleRad));
- float DeltaAngle = MyMemory->bActorSet
- ? UUnrealHelperLibraryBPL::RelativeAngleToActor(AICharacter, MyMemory->FocusActorSet)
- : UUnrealHelperLibraryBPL::RelativeAngleToVector(AICharacter, MyMemory->FocusLocationSet);
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("DeltaAngle %f"), DeltaAngle), "", "", "", "", "", "", "", "", "", -1, FName("Test"));
-
- if (bDebug)
- {
- FVector CurrentLocation = MyMemory->bActorSet
- ? MyMemory->FocusActorSet->GetActorLocation()
- : MyMemory->FocusLocationSet;
- DrawDebugSphere(AIController->GetWorld(), CurrentLocation,
- 50.0f, 12, FColor::Blue, false, -1);
- }
-
- if (DeltaAngleRad >= PrecisionDot)
- {
- UUnrealHelperLibraryBPL::DebugPrintStrings(FString::Printf(TEXT("TurnRange->bOverrideStopMontageOnGoalReached %hhd"), MyMemory->CurrentTurnRange.bOverrideStopMontageOnGoalReached));
- bool bCanStopMontage = false;
- if (MyMemory->CurrentTurnRange.bOverrideStopMontageOnGoalReached)
- {
- bCanStopMontage = MyMemory->CurrentTurnRange.bStopMontageOnGoalReached;
- }
- else
- {
- bCanStopMontage = MyMemory->TurnSettings.bStopMontageOnGoalReached;
- }
-
- if (MyMemory && bCanStopMontage)
- {
- AICharacter->StopAnimMontage();
- CleanUp(*AIController, NodeMemory);
- FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded);
- }
- else
- {
- CleanUp(*AIController, NodeMemory);
- FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded);
- }
- }
- else
- {
- if (TurnToStatics::IsTurnWithAnimationRequired(AICharacter))
- {
- MyMemory->CurrentTurnRange = TurnToStatics::GetTurnRange(DeltaAngle, MyMemory->bCurrentTurnRangeSet, MyMemory->TurnSettings);
- if (MyMemory->bCurrentTurnRangeSet && MyMemory->CurrentTurnRange.AnimMontage)
- {
- AICharacter->PlayAnimMontage(MyMemory->CurrentTurnRange.AnimMontage);
- }
-
- // TODO тут ошибка?
- // finish if no turn animation found and "bTurnOnlyWithAnims"
- if (!MyMemory->bCurrentTurnRangeSet && MyMemory->TurnSettings.bTurnOnlyWithAnims)
- {
- CleanUp(*AIController, NodeMemory);
- FinishLatentTask(OwnerComp, EBTNodeResult::Succeeded);
- }
- }
- }
- }
- else
- {
- CleanUp(*AIController, NodeMemory);
- FinishLatentTask(OwnerComp, EBTNodeResult::Failed);
- }
- }
-}
-
-void UBTT_TurnTo::CleanUp(AAIController& AIController, uint8* NodeMemory)
-{
- FBTTurnToMemory* MyMemory = (FBTTurnToMemory*)NodeMemory;
- check(MyMemory);
-
- bool bClearFocus = false;
- if (MyMemory->bActorSet)
- {
- bClearFocus = (MyMemory->FocusActorSet == AIController.GetFocusActorForPriority(EAIFocusPriority::Gameplay));
- }
- else
- {
- bClearFocus = (MyMemory->FocusLocationSet == AIController.GetFocalPointForPriority(EAIFocusPriority::Gameplay));
- }
-
- if (bClearFocus)
- {
- AIController.ClearFocus(EAIFocusPriority::Gameplay);
- }
-}
-
-FTurnSettings UBTT_TurnTo::GetTurnSettings(AActor* Actor, bool& bCurrentTurnSettingsSet)
-{
- FTurnSettings Result;
- bCurrentTurnSettingsSet = false;
- if (SettingsSource == EUHLSettingsSource::Actor)
- {
- Result = IUHLAIActorSettings::Execute_GetTurnSettings(Actor);
- bCurrentTurnSettingsSet = true;
- }
- if (SettingsSource == EUHLSettingsSource::DataAsset)
- {
- Result = RotateToAnimationsDataAsset->TurnSettings;
- bCurrentTurnSettingsSet = true;
- }
- if (SettingsSource == EUHLSettingsSource::Node)
- {
- Result = TurnSettings;
- bCurrentTurnSettingsSet = true;
- }
- return Result;
-}
-
-EBTNodeResult::Type UBTT_TurnTo::AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory)
-{
- AAIController* AIController = OwnerComp.GetAIOwner();
-
- if (AIController != NULL)
- {
- CleanUp(*AIController, NodeMemory);
- }
-
- return EBTNodeResult::Aborted;
-}
-
-void UBTT_TurnTo::DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const
-{
- FString KeyDesc = BlackboardKey.SelectedKeyName.ToString();
- Values.Add(FString::Printf(TEXT("%s: %s"), *Super::GetStaticDescription(), *KeyDesc));
-
- AAIController* AIController = OwnerComp.GetAIOwner();
-
- if (AIController != NULL && AIController->GetPawn() != NULL)
- {
- const FVector PawnDirection = AIController->GetPawn()->GetActorForwardVector();
- const FVector FocalPoint = AIController->GetFocalPointForPriority(EAIFocusPriority::Gameplay);
-
- if (FocalPoint != FAISystem::InvalidLocation)
- {
- const FVector::FReal CurrentAngleRadians = TurnToStatics::CalculateAngleDifferenceDot(PawnDirection, (FocalPoint - AIController->GetPawn()->GetActorLocation()));
- Values.Add(FString::Printf(TEXT("Current angle: %.2f"), FMath::RadiansToDegrees(FMath::Acos(CurrentAngleRadians))));
- }
- else
- {
- Values.Add(TEXT("FocalPoint is an Invalid Location"));
- }
- }
- else
- {
- Values.Add(TEXT("Controller or Pawn is NULL"));
- }
-}
-
-FString UBTT_TurnTo::GetStaticDescription() const
-{
- FString KeyDesc = BlackboardKey.SelectedKeyName.ToString();
- return FString::Printf(TEXT("%s: %s"), *Super::GetStaticDescription(), *KeyDesc);
-}
-
-void UBTT_TurnTo::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const
-{
- InitializeNodeMemory(NodeMemory, InitType);
-}
-
-void UBTT_TurnTo::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const
-{
- CleanupNodeMemory(NodeMemory, CleanupType);
-}
diff --git a/Source/UHLAI/Private/UHLAI.cpp b/Source/UHLAI/Private/UHLAI.cpp
deleted file mode 100644
index b0ba6de1..00000000
--- a/Source/UHLAI/Private/UHLAI.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLAI.h"
-
-#include "Misc/Paths.h"
-
-#define LOCTEXT_NAMESPACE "FUHLAIModule"
-
-
-void FUHLAIModule::StartupModule()
-{
-}
-
-void FUHLAIModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLAIModule, UHLAI)
diff --git a/Source/UHLAI/Private/UHLAIBlueprintLibrary.cpp b/Source/UHLAI/Private/UHLAIBlueprintLibrary.cpp
deleted file mode 100644
index 4e9f5a8e..00000000
--- a/Source/UHLAI/Private/UHLAIBlueprintLibrary.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLAIBlueprintLibrary.h"
-
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Bool.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Class.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Enum.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Float.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Int.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Name.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_NativeEnum.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Rotator.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_String.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIBlueprintLibrary)
-
-
-EBlackboardValueType UUHLAIBlueprintLibrary::BlackboardKeyToBBValueType(FBlackboardKeySelector BlackboardKey)
-{
- EBlackboardValueType Result = EBlackboardValueType::None;
-
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Bool::StaticClass())
- {
- Result = EBlackboardValueType::Bool;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Int::StaticClass())
- {
- Result = EBlackboardValueType::Int;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Float::StaticClass())
- {
- Result = EBlackboardValueType::Float;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_String::StaticClass())
- {
- Result = EBlackboardValueType::String;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Name::StaticClass())
- {
- Result = EBlackboardValueType::Name;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass())
- {
- Result = EBlackboardValueType::Vector;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Rotator::StaticClass())
- {
- Result = EBlackboardValueType::Rotator;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass())
- {
- Result = EBlackboardValueType::Enum;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_NativeEnum::StaticClass())
- {
- Result = EBlackboardValueType::NativeEnum;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Object::StaticClass())
- {
- Result = EBlackboardValueType::Object;
- }
- if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Class::StaticClass())
- {
- Result = EBlackboardValueType::Class;
- }
-
- return Result;
-}
\ No newline at end of file
diff --git a/Source/UHLAI/Private/UHLAIBlueprintLibrary.h b/Source/UHLAI/Private/UHLAIBlueprintLibrary.h
deleted file mode 100644
index 3961138b..00000000
--- a/Source/UHLAI/Private/UHLAIBlueprintLibrary.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Core/UHLBlackboardValueType.h"
-#include "Kismet/BlueprintFunctionLibrary.h"
-#include "UHLAIBlueprintLibrary.generated.h"
-
-class UWidget;
-struct FBlackboardKeySelector;
-
-/*
- * Function library class.
- * Each function in it is expected to be static and represents blueprint node that can be called in any blueprint.
- *
- * When declaring function you can define metadata for the node. Key function specifiers will be BlueprintPure and BlueprintCallable.
- * BlueprintPure - means the function does not affect the owning object in any way and thus creates a node without Exec pins.
- * BlueprintCallable - makes a function which can be executed in Blueprints - Thus it has Exec pins.
- * DisplayName - full name of the node, shown when you mouse over the node and in the blueprint drop down menu.
- * Its lets you name the node using characters not allowed in C++ function names.
- * CompactNodeTitle - the word(s) that appear on the node.
- * Keywords - the list of keywords that helps you to find node when you search for it using Blueprint drop-down menu.
- * Good example is "Print String" node which you can find also by using keyword "log".
- * Category - the category your node will be under in the Blueprint drop-down menu.
- *
- * For more info on custom blueprint nodes visit documentation:
- * https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation
- */
-UCLASS()
-class UHLAI_API UUHLAIBlueprintLibrary : public UBlueprintFunctionLibrary
-{
- GENERATED_BODY()
-
-public:
- static EBlackboardValueType BlackboardKeyToBBValueType(FBlackboardKeySelector BlackboardKey);
-};
diff --git a/Source/UHLAI/Private/UHLValueOrBBKey_GameplayTag.cpp b/Source/UHLAI/Private/UHLValueOrBBKey_GameplayTag.cpp
deleted file mode 100644
index c7b59de3..00000000
--- a/Source/UHLAI/Private/UHLValueOrBBKey_GameplayTag.cpp
+++ /dev/null
@@ -1,82 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLValueOrBBKey_GameplayTag.h"
-
-#include "GameplayTagContainer.h"
-#include "BehaviorTree/ValueOrBBKey.h"
-#include "BehaviorTree/Blackboard/BlackboardKeyType_Name.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLValueOrBBKey_GameplayTag)
-
-FGameplayTag FUHLValueOrBBKey_GameplayTag::GetValue(const UBlackboardComponent& Blackboard) const
-{
- FName TagName = FBlackboard::GetValue(Blackboard, Key, KeyId, DefaultValue.GetTagName());
- FGameplayTag FoundGameplayTag = FGameplayTag::RequestGameplayTag(TagName, false);
- if (!FoundGameplayTag.IsValid())
- {
- UUnrealHelperLibraryBPL::DebugPrintString(Blackboard.GetWorld(),
- FString::Printf(TEXT("FUHLValueOrBBKey_GameplayTag::GetValue GameplayTag %s not found"), *Key.ToString())
- );
- return DefaultValue;
- }
- return FoundGameplayTag;
-}
-
-FGameplayTag FUHLValueOrBBKey_GameplayTag::GetValue(const UBlackboardComponent* Blackboard) const
-{
- return Blackboard ? GetValue(*Blackboard) : DefaultValue;
-}
-
-FGameplayTag FUHLValueOrBBKey_GameplayTag::GetValue(const UBehaviorTreeComponent& BehaviorComp) const
-{
- FName TagName = FBlackboard::GetValue(BehaviorComp, Key, KeyId, DefaultValue.GetTagName());
- FGameplayTag FoundGameplayTag = FGameplayTag::RequestGameplayTag(TagName, false);
- if (!FoundGameplayTag.IsValid())
- {
- UUnrealHelperLibraryBPL::DebugPrintString(BehaviorComp.GetWorld(),
- FString::Printf(TEXT("FUHLValueOrBBKey_GameplayTag::GetValue GameplayTag %s not found"), *Key.ToString())
- );
- return DefaultValue;
- }
- return FoundGameplayTag;
-}
-
-FGameplayTag FUHLValueOrBBKey_GameplayTag::GetValue(const UBehaviorTreeComponent* BehaviorComp) const
-{
- return BehaviorComp ? GetValue(*BehaviorComp) : DefaultValue;
-}
-
-bool FUHLValueOrBBKey_GameplayTag::SerializeFromMismatchedTag(
- const FPropertyTag& Tag, FStructuredArchive::FSlot Slot)
-{
- if (Tag.Type == NAME_StructProperty && Tag.GetType().IsStruct(FGameplayTag::StaticStruct()->GetFName()))
- {
- FGameplayTag TempTag;
- FGameplayTag::StaticStruct()->SerializeItem(Slot, &TempTag, nullptr);
- // Slot << TempTag; // Deserialize the data as an FGameplayTag
- DefaultValue = TempTag; // Store it in a compatible property
- return true;
- }
- return false;
-}
-
-#if WITH_EDITOR
-bool FUHLValueOrBBKey_GameplayTag::IsCompatibleType(const UBlackboardKeyType* KeyType) const
-{
- return KeyType && KeyType->GetClass() == UBlackboardKeyType_Name::StaticClass();
-}
-#endif
-
-FString FUHLValueOrBBKey_GameplayTag::ToString() const
-{
- if (!Key.IsNone())
- {
- return ToStringKeyName();
- }
- else
- {
- return DefaultValue.GetTagName().ToString();
- }
-}
diff --git a/Source/UHLAI/Public/Components/UHLAIPerceptionComponent.h b/Source/UHLAI/Public/Components/UHLAIPerceptionComponent.h
deleted file mode 100644
index 699323f3..00000000
--- a/Source/UHLAI/Public/Components/UHLAIPerceptionComponent.h
+++ /dev/null
@@ -1,24 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Perception/AIPerceptionComponent.h"
-#include "UHLAIPerceptionComponent.generated.h"
-
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSightStimulusExpired, const FAIStimulus&, StimulusStore);
-
-/**
- *
- */
-UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
-class UHLAI_API UUHLAIPerceptionComponent : public UAIPerceptionComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void HandleExpiredStimulus(FAIStimulus& StimulusStore) override;
-
- UPROPERTY(BlueprintAssignable, Category="UHL AIPerceptionComponent")
- FOnSightStimulusExpired OnSightStimulusExpired;
-};
diff --git a/Source/UHLAI/Public/Composite/BTC_RandomSelector.h b/Source/UHLAI/Public/Composite/BTC_RandomSelector.h
deleted file mode 100644
index b821f195..00000000
--- a/Source/UHLAI/Public/Composite/BTC_RandomSelector.h
+++ /dev/null
@@ -1,65 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UObject/ObjectMacros.h"
-#include "BehaviorTree/BTCompositeNode.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "Misc/EngineVersionComparison.h"
-#include "BTC_RandomSelector.generated.h"
-
-class UBehaviorTreeComponent;
-
-// Should nest from "FBTCompositeMemory" or build error fail on FAB servers
-// struct FBTRandomSelectorMemory : public FBTCompositeMemory
-// {
-// };
-
-/**
- * RandomSelector composite node.
- * RandomSelector random between child nodes using chances, and will stop executing its children when one of their children succeeds.
- * If a Selector's child succeeds, the Selector succeeds. If all the Selector's children fail, the Selector fails.
- * P.S. space for improvement - memory, but not sure that its required,
- * just random until we get valid node is seems looks like is enough
- * https://www.youtube.com/watch?v=wI_kwwvc-pw&t=781s&ab_channel=VeryHotShark
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTC_RandomSelector : public UBTCompositeNode
-{
- GENERATED_BODY()
-
-public:
- UBTC_RandomSelector(const FObjectInitializer& ObjectInitializer);
-
- // TODO validate that chances count == ChildrenNum
- // if no chance specified, node without chance will win always
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="RandomSelector", meta=(ForceUnits="Multiplier"))
- TArray ChancesArray = { 0.5f, 0.5f };
-
- UFUNCTION(BlueprintCallable, CallInEditor, Category="RandomSelector")
- void RemoveUnusedChances();
-
-protected:
- virtual int32 GetNextChildHandler(struct FBehaviorTreeSearchData& SearchData, int32 PrevChild, EBTNodeResult::Type LastResult) const override;
- virtual FString GetStaticDescription() const override;
-
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
- // 5.4.0 and up only code
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-#endif
-
-private:
- UFUNCTION()
- bool IsValidSelector() const { return GetChildrenNum() > 1 && GetChildrenNum() <= ChancesArray.Num(); };
- UFUNCTION()
- FString GetErrorOrWarning() const;
- UFUNCTION()
- int32 GetRandomChildIdx() const;
-
-};
diff --git a/Source/UHLAI/Public/Core/UHLAIActorSettings.h b/Source/UHLAI/Public/Core/UHLAIActorSettings.h
deleted file mode 100644
index 6e1e8929..00000000
--- a/Source/UHLAI/Public/Core/UHLAIActorSettings.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Data/TurnSettings.h"
-#include "UObject/Interface.h"
-#include "UHLAIActorSettings.generated.h"
-
-// This class does not need to be modified.
-UINTERFACE(MinimalAPI)
-class UUHLAIActorSettings : public UInterface
-{
- GENERATED_BODY()
-};
-
-/**
- *
- */
-class UHLAI_API IUHLAIActorSettings
-{
- GENERATED_BODY()
-
- // Add interface functions to this class. This is the class that will be inherited to implement this interface.
-public:
-
-/** IUHLActorSettings */
- UFUNCTION(Category="UHLActorSettings", BlueprintCallable, BlueprintNativeEvent)
- FTurnSettings GetTurnSettings() const;
-/** ~IUHLActorSettings */
-};
diff --git a/Source/UHLAI/Public/Core/UHLAIDebugSettings.h b/Source/UHLAI/Public/Core/UHLAIDebugSettings.h
deleted file mode 100644
index eda9c18e..00000000
--- a/Source/UHLAI/Public/Core/UHLAIDebugSettings.h
+++ /dev/null
@@ -1,20 +0,0 @@
-#pragma once
-#include "BehaviorTree/ValueOrBBKey.h"
-
-#include "UHLAIDebugSettings.generated.h"
-
-// struct for easier creating BBValue + BBValue math operations
-USTRUCT(BlueprintType)
-struct FUHLAIDebugSettings
-{
- GENERATED_BODY()
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bEnableDebug = false;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FValueOrBBKey_Float DrawDebugTime = 2.0f;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FColor Color = FLinearColor(0, 0.66, 1).ToFColor(true);
-};
diff --git a/Source/UHLAI/Public/Core/UHLBlackboardValueType.h b/Source/UHLAI/Public/Core/UHLBlackboardValueType.h
deleted file mode 100644
index 4690a567..00000000
--- a/Source/UHLAI/Public/Core/UHLBlackboardValueType.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#pragma once
-
-#include "UHLBlackboardValueType.generated.h"
-
-UENUM()
-enum class EBlackboardValueType
-{
- None,
- Bool,
- Int,
- Float,
- String,
- Name,
- Vector,
- Rotator,
- Enum,
- NativeEnum,
- Object,
- Class,
-};
\ No newline at end of file
diff --git a/Source/UHLAI/Public/Core/UHLMathOperations.h b/Source/UHLAI/Public/Core/UHLMathOperations.h
deleted file mode 100644
index c8c96f74..00000000
--- a/Source/UHLAI/Public/Core/UHLMathOperations.h
+++ /dev/null
@@ -1,64 +0,0 @@
-#pragma once
-
-#include "UHLBlackboardValueType.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "BehaviorTree/ValueOrBBKey.h"
-#include "UHLMathOperations.generated.h"
-
-UENUM(BlueprintType)
-enum class EUHL_MathOperations : uint8
-{
- None UMETA(Hidden),
- Set,
- Add,
- Multiply,
- Divide,
-};
-
-// struct for easier creating BBValue + BBValue math operations
-USTRUCT(BlueprintType)
-struct FOperationOnBBValue
-{
- GENERATED_BODY()
-
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Int || CurrentBBKeyValueType==EBlackboardValueType::Float", EditConditionHides))
- EUHL_MathOperations MathOperation = EUHL_MathOperations::Set;
-
- /** Values */
- // UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Bool", EditConditionHides))
- // bool BoolValue;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Int", EditConditionHides))
- FValueOrBBKey_Int32 IntValue;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Float", EditConditionHides))
- FValueOrBBKey_Float FloatValue;
-
- // UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::String", EditConditionHides, MultiLine))
- // FString StringValue;
- // UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Name", EditConditionHides, MultiLine))
- // FName NameValue;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Vector", EditConditionHides))
- FValueOrBBKey_Vector VectorValue;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Rotator", EditConditionHides))
- FValueOrBBKey_Rotator RotatorValue;
- /** ~Values */
-
- void SetCurrentBBKeyValueType(EBlackboardValueType CurrentBBKeyValueType_In);
-
- int32 CalculateIntResult(UBehaviorTreeComponent& OwnerComp, int32 CurrentValue) const;
- float CalculateFloatResult(UBehaviorTreeComponent& OwnerComp, float CurrentValue) const;
- FVector CalculateVectorResult(UBehaviorTreeComponent& OwnerComp, FVector CurrentValue) const;
- FRotator CalculateRotatorResult(UBehaviorTreeComponent& OwnerComp, FRotator CurrentValue) const;
-
- FString ToStringIntValue(FString KeyName) const;
- FString ToStringFloatValue(FString KeyName) const;
- FString ToStringVectorValue(FString KeyName) const;
- FString ToStringRotatorValue(FString KeyName) const;
-
-private:
- UPROPERTY()
- EBlackboardValueType CurrentBBKeyValueType = EBlackboardValueType::None;
-};
diff --git a/Source/UHLAI/Public/Data/TurnSettings.h b/Source/UHLAI/Public/Data/TurnSettings.h
deleted file mode 100644
index 8646ed9d..00000000
--- a/Source/UHLAI/Public/Data/TurnSettings.h
+++ /dev/null
@@ -1,110 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Engine/DataAsset.h"
-#include "TurnSettings.generated.h"
-
-class UAnimMontage;
-
-USTRUCT(Blueprintable)
-struct FTurnRange
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRange")
- FString Name;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRange")
- FFloatRange Range = FFloatRange(-135, -45);
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRange")
- UAnimMontage* AnimMontage = nullptr;
- // useful in big enemies cases, Dragon shouldn't cancel 180deg rotate animation
- // even if Player somehow teleported
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRange")
- bool bOverrideStopMontageOnGoalReached = false;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRange", meta=(EditCondition="bOverrideStopMontageOnGoalReached", EditConditionHides))
- bool bStopMontageOnGoalReached = false;
-};
-
-USTRUCT(Blueprintable)
-struct FTurnRanges
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnRanges")
- TArray TurnRanges;
-};
-
-
-/**
- *
- */
-// TODO make warning that not all ranges are covered
-// TODO limit TurnAnimations count e.g. max 3 times, then give choice what to do - abort or success?
-// TODO limit playing similar animations count e.g. max 3 times ?? and then give choice what to do - abort or success?
-// TIPS
-// - ranges can overlap, in such cases animation will be fired by order, so order is important
-USTRUCT(Blueprintable)
-struct FTurnSettings
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="TurnSettings", meta=(EditCondition="true", MultiLine))
- FString Notes = FString(TEXT(
- "Use cases:"
- "\n\n1) Big enemy (dragon, etc.) - better to use with \"bTurnOnlyWithAnims\", \"bStopMontageOnGoalReached\" and \"Precision = 1°\", BlendOut settings in AnimMontage becomes critcal for smooth visual ~0.5s blendout + inertionalization recommended"
- "\n\n2) Medium enemy (human size) - disable bTurnOnlyWithAnims nobody will mention that medium enemy rotates in place without anim"
- "\n\nTips: "
- "\n- ranges can overlap, in such cases animation will be fired by order, so order is important"
- ));
-
- // if enabled - turn only with animations, if no ranges fits - consider it as success
- // if disabled - turn also with rotating enemy in place
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings")
- bool bTurnOnlyWithAnims = true;
- // stops AnimMontage when reached goal, even if 180deg turn animation on half of playing - stop it
- // BlendOut settings for this option is critical
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings")
- bool bStopMontageOnGoalReached = true;
- // TODO bChooseClosestInRaceCondition? если подходят 2 ренджа, в чью пользу принимать решение, зач если есть order TurnRange'ей
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings", meta=(ForceInlineRow))
- TMap TurnRangesGroups;
-
- void Cleanup();
- void SetupPreset_Default_90_180();
- void SetupPreset_BigEnemy_90_180();
- void SetupPreset_45_90_180();
- void SetupPreset_15_45_90_180();
- void SetupPreset_15_30_45_90_180();
-};
-
-
-UCLASS(Blueprintable)
-class UHLAI_API UTurnSettingsDataAsset : public UPrimaryDataAsset
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings")
- FTurnSettings TurnSettings;
-
- // Prefers to rotate 180deg if relative angle >115deg, suits for all medium mobs(human size)
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && !bUseTurnSettingsDataAsset", EditConditionHides, DisplayPriority=1))
- void SetupPreset_Default_90_180();
- // All ranges have same proportion
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && !bUseTurnSettingsDataAsset", EditConditionHides, DisplayPriority=1))
- void SetupPreset_BigEnemy_90_180();
- UFUNCTION(BlueprintCallable, CallInEditor, Category="Setup", meta = (DisplayPriority=2))
- void SetupPreset_45_90_180();
- UFUNCTION(BlueprintCallable, CallInEditor, Category="Setup", meta = (DisplayPriority=3))
- void SetupPreset_15_45_90_180();
- UFUNCTION(BlueprintCallable, CallInEditor, Category="Setup", meta = (DisplayPriority=4))
- void SetupPreset_15_30_45_90_180();
- UFUNCTION(BlueprintCallable, CallInEditor, Category="Setup", meta = (DisplayPriority=5))
- void Cleanup();
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_Base.h b/Source/UHLAI/Public/Decorators/BTD_Base.h
deleted file mode 100644
index 49ab6301..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_Base.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "BehaviorTree/BTDecorator.h"
-#include "BTD_Base.generated.h"
-
-/**
- * Used to add abort functionality to BTDecorators
- */
-UCLASS(Category = "UnrealHelperLibrary", Abstract)
-class UHLAI_API UBTD_Base : public UBTDecorator
-{
- GENERATED_BODY()
-
-public:
- UBTD_Base(const FObjectInitializer& ObjectInitializer);
-
- FString GetPropertiesDetails() const;
- /** notify about changes in blackboard */
- virtual EBlackboardNotificationResult OnBlackboardKeyValueChange(const UBlackboardComponent& Blackboard, FBlackboard::FKey ChangedKeyID);
-
-protected:
- // BTDecorator_BlueprintBase
- enum class EAbortType : uint8
- {
- NoAbort,
- ActivateBranch,
- DeactivateBranch,
- Unknown,
- };
- /** gets set to true if decorator declared BB keys it can potentially observe */
- uint32 bIsObservingBB : 1;
- /** blackboard key names that should be observed */
- UPROPERTY()
- TArray ObservedKeyNames;
- /** properties with runtime values, stored only in class default object */
- TArray PropertyData;
- /** show detailed information about properties */
- UPROPERTY(EditInstanceOnly, Category=Description)
- bool bShowPropertyDetails = true;
- /** return this decorator abort type in current circumstances */
- EAbortType EvaluateAbortType(UBehaviorTreeComponent& OwnerComp) const;
- void RequestAbort(UBehaviorTreeComponent& OwnerComp, const EAbortType Type);
-
- virtual void PostLoad() override;
- virtual void OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
-
- /** initialize data about blueprint defined properties
- * copy-paste from UBTDecorator_BlueprintBase
- */
- virtual void InitializeProperties();
-
- /** setup node name
- * copy-paste from UBTDecorator_BlueprintBase
- */
- virtual void PostInitProperties() override;
- // ~BTDecorator_BlueprintBase
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_CheckGASGameplayTagsOnActor.h b/Source/UHLAI/Public/Decorators/BTD_CheckGASGameplayTagsOnActor.h
deleted file mode 100644
index 6e176007..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_CheckGASGameplayTagsOnActor.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BTD_Base.h"
-#include "BehaviorTree/BTDecorator.h"
-#include "BTD_CheckGASGameplayTagsOnActor.generated.h"
-
-/**
- * Actor should implement "IAbilitySystemInterface" to get AbilitySystemComponent
- */
-UCLASS(Category = "UnrealHelperLibrary", DisplayName="Check GAS Gameplay Tags On Actor")
-class UHLAI_API UBTD_CheckGASGameplayTagsOnActor : public UBTD_Base
-{
- GENERATED_BODY()
-
-public:
- UBTD_CheckGASGameplayTagsOnActor(const FObjectInitializer& ObjectInitializer);
-
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
- virtual FString GetStaticDescription() const override;
-
-protected:
- UPROPERTY(EditAnywhere, Category="GameplayTagCheck", Meta=(ToolTips="Which Actor (from the blackboard) should be checked for these GAS gameplay tags?"))
- struct FBlackboardKeySelector ActorToCheck;
-
- UPROPERTY(EditAnywhere, Category="GameplayTagCheck")
- EGameplayContainerMatchType TagsToMatch;
-
- UPROPERTY(EditAnywhere, Category="GameplayTagCheck")
- FGameplayTagContainer GameplayTags;
-
- /** cached description */
- UPROPERTY()
- FString CachedDescription;
-
-#if WITH_EDITOR
- /** describe decorator and cache it */
- virtual void BuildDescription();
-
- virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
-#endif
-
- virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
- virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_GameplayEffectCooldown.h b/Source/UHLAI/Public/Decorators/BTD_GameplayEffectCooldown.h
deleted file mode 100644
index 896a3131..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_GameplayEffectCooldown.h
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2024 NextGenium
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameplayEffect.h"
-#include "Decorators/BTD_Base.h"
-#include "BTD_GameplayEffectCooldown.generated.h"
-
-struct FBTGameplayEffectCooldownDecoratorMemory
-{
- double LastUseTimestamp;
- uint8 bRequestedRestart : 1;
-};
-
-/**
- * TODO: finish node StaticDescription, Runtime and so on
- * Actor should implement "IAbilitySystemInterface"
- */
-UCLASS()
-class UHLAI_API UBTD_GameplayEffectCooldown : public UBTD_Base
-{
- GENERATED_BODY()
-
-public:
- UBTD_GameplayEffectCooldown(const FObjectInitializer& ObjectInitializer);
-
- // Tag used in GameplayEffect to check cooldown
- UPROPERTY(Category="Decorator", EditAnywhere)
- FGameplayTag CooldownGameplayEffectTag;
-
- // TODO: make option to check cooldowns by this query
- // UPROPERTY(Category="Decorator", EditAnywhere)
- // FGameplayEffectQuery GameplayEffectQuery;
-
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
- virtual uint16 GetInstanceMemorySize() const override;
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
- virtual FString GetStaticDescription() const override;
-
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif // WITH_EDITOR
-
-protected:
- virtual void OnNodeDeactivation(FBehaviorTreeSearchData& SearchData, EBTNodeResult::Type NodeResult) override;
- virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
-
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_InAngle.h b/Source/UHLAI/Public/Decorators/BTD_InAngle.h
deleted file mode 100644
index c2d305b4..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_InAngle.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Decorators/BTD_Base.h"
-#include "BTD_InAngle.generated.h"
-
-class ACharacter;
-
-struct FBTInAngleMemory
-{
-};
-
-USTRUCT(BlueprintType)
-struct FAngleRange
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(Category="Decorator", EditAnywhere)
- FFloatRange Range = FFloatRange();
-
- // ~"FColor::MakeRandomColor()" will lead to non-critical error
- // ~unreal don't support random colors from native code.
- // ~They should be deterministic but there is no option
- UPROPERTY(Category="Decorator", EditAnywhere)
- FColor DebugColor = FColor::Blue;
-};
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTD_InAngle : public UBTD_Base
-{
- GENERATED_BODY()
-
-public:
- UBTD_InAngle(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="", EditConditionHides))
- FBlackboardKeySelector Target;
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="", EditConditionHides))
- TArray IncludeRanges;
- // UPROPERTY(Category=Decorator, EditAnywhere, meta=(EditCondition="", EditConditionHides))
- // TArray ExcludeRanges;
-
- // TODO bIncludeTargetCharacterCapsule - checks not only angle to actor
- // but also that TargetCharacter capsule in angle
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bDrawDebug = false;
- // helpful for testing ranges
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bDebugForceFalseCondition = false;
- UPROPERTY(Category="Decorator", EditAnywhere)
- float OverrideDebugLinesDistance = 0.0f;
-
- virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
-
- virtual uint16 GetInstanceMemorySize() const override { return sizeof(FBTInAngleMemory); };
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-
- virtual FString GetStaticDescription() const override;
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif
-
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
- bool IsInAngle(float CurrentAngle) const;
-
-private:
- TWeakObjectPtr CachedOwnerCharacter;
-
- float GetCurrentAngle(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, bool bDrawDebug_In = false) const;
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_InRange.h b/Source/UHLAI/Public/Decorators/BTD_InRange.h
deleted file mode 100644
index fe823fa8..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_InRange.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BTD_Base.h"
-#include "BehaviorTree/BTCompositeNode.h"
-#include "BTD_InRange.generated.h"
-
-struct FBTInRangeMemory
-{
-};
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTD_InRange : public UBTD_Base
-{
- GENERATED_BODY()
-
-public:
- UBTD_InRange(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="", EditConditionHides))
- FBlackboardKeySelector Target;
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="", EditConditionHides))
- float Min = 0.0f;
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="", EditConditionHides))
- float Max = 500.0f;
- // Should we exclude Self character capsule radius from distance
- // mostly for big enemies
- // compliant with "MoveTo"
- /** if set, radius of AI's capsule will be added to threshold between AI and goal location in destination reach test */
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bIncludeSelfCapsuleRadius = true;
- // Should we exclude Target character capsule radius from distance
- /** if set, radius of Target's capsule will be added to threshold between AI and goal location */
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bIncludeTargetCapsuleRadius = true;
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bCalculateDistanceIn2D = true;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- bool bDrawDebug = false;
- // TODO: if -1 or 0, when should be overriden by UHLGlobalSettings.DebugLifeTime, by default should be -1 or 0?
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="bDrawDebug", EditConditionHides))
- float DebugLifetime = -1.0f;
-
- virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
-
- virtual uint16 GetInstanceMemorySize() const override { return sizeof(FBTInRangeMemory); };
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-
- virtual FString GetStaticDescription() const override;
- // TODO should be only "WITH_EDITOR"???
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif
-
- float GetCurrentDistance(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, bool bDrawDebug_In = false) const;
-
- virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_LoopRandomCount.h b/Source/UHLAI/Public/Decorators/BTD_LoopRandomCount.h
deleted file mode 100644
index 1d323155..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_LoopRandomCount.h
+++ /dev/null
@@ -1,28 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/Decorators/BTDecorator_Loop.h"
-#include "BTD_LoopRandomCount.generated.h"
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary", hidecategories="Decorator")
-class UHLAI_API UBTD_LoopRandomCount : public UBTDecorator_Loop
-{
- GENERATED_BODY()
-
-public:
- UBTD_LoopRandomCount(const FObjectInitializer& ObjectInitializer);
-
- /** number of executions */
- UPROPERTY(EditAnywhere, Category="LoopRandomCount", meta=(EditCondition="!bInfiniteLoop", ClampMin="1", ClampMax="255"))
- FInt32Interval Range = FInt32Interval(2, 4);
-
-protected:
- virtual void OnNodeActivation(FBehaviorTreeSearchData& SearchData) override;
- virtual FString GetStaticDescription() const override;
-
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_RandomChance.h b/Source/UHLAI/Public/Decorators/BTD_RandomChance.h
deleted file mode 100644
index dc9adf3c..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_RandomChance.h
+++ /dev/null
@@ -1,71 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "ScalableFloat.h"
-#include "BehaviorTree/BTDecorator.h"
-#include "BehaviorTree/ValueOrBBKey.h"
-#include "Core/UHLAIDebugSettings.h"
-#include "Core/UHLMathOperations.h"
-#include "BTD_RandomChance.generated.h"
-
-UENUM(BlueprintType)
-enum class EScalableChanceType : uint8
-{
- None,
- ScalableFloat UMETA(ToolTip = "with FScalableFloat value level getted from blackboard ScalableChanceLevelInBB"),
- BBDependantWithSteps UMETA(ToolTip = "Chance changes by math operation that applies every step e.g. step 0 - \"BaseChance\", step 1 - \"BaseChance\" + 20%, step 2 - \"BaseChance\" + 40% with math operation \"Add\" 20%"),
-};
-
-/**
- * TODO: blackboard based random chances
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTD_RandomChance : public UBTDecorator
-{
- GENERATED_BODY()
-
-public:
- UBTD_RandomChance(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- EScalableChanceType ScaleType = EScalableChanceType::None;
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(UIMin=0.0f, UIMax=1.0f, ClampMin=0.0f, ClampMax=1.0f, EditCondition="ScaleType != EScalableChanceType::ScalableFloat", EditConditionHides))
- FValueOrBBKey_Float Chance = 1.0f;
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="ScaleType == EScalableChanceType::ScalableFloat", EditConditionHides))
- FScalableFloat ScalableChance;
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="ScaleType == EScalableChanceType::ScalableFloat", EditConditionHides))
- FBlackboardKeySelector ScalableChanceLevelInBB;
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="ScaleType == EScalableChanceType::BBDependantWithSteps", EditConditionHides))
- FOperationOnBBValue ChanceChangePerStep = {};
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="ScaleType == EScalableChanceType::BBDependantWithSteps", EditConditionHides))
- FBlackboardKeySelector StepsCount;
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(UIMin=0.0f, UIMax=1.0f, ClampMin=0.0f, ClampMax=1.0f, EditCondition="ScaleType != EScalableChanceType::None", EditConditionHides))
- FValueOrBBKey_Float MaxChance = 1.0f;
-
- UPROPERTY(Category="Decorator", EditAnywhere, AdvancedDisplay, meta=(ShowOnlyInnerProperties))
- FUHLAIDebugSettings DebugSettings;
-
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
-
- virtual FString GetStaticDescription() const override;
-
- virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
-
- // TODO value preview?
- // virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
-
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif // WITH_EDITOR
-
-private:
- float GetCurrentChance(UBehaviorTreeComponent& OwnerComp) const;
-};
diff --git a/Source/UHLAI/Public/Decorators/BTD_TimeLimitRandom.h b/Source/UHLAI/Public/Decorators/BTD_TimeLimitRandom.h
deleted file mode 100644
index b0060910..00000000
--- a/Source/UHLAI/Public/Decorators/BTD_TimeLimitRandom.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/Decorators/BTDecorator_TimeLimit.h"
-#include "Misc/EngineVersionComparison.h"
-#include "BehaviorTree/BTDecorator.h"
-#include "UObject/ObjectMacros.h"
-#include "BehaviorTree/BehaviorTree.h"
-#include "Misc/EngineVersionComparison.h"
-#include "BTD_TimeLimitRandom.generated.h"
-
-
-struct FBTimeLimitMemoryRandom
-{
-};
-
-/**
- * In UE5.4 changed completely now we can't nest from "TimeLimit" and forced to copy-paste same functionality
- */
-UCLASS(Category = "UnrealHelperLibrary", hidecategories="Decorator")
-class UHLAI_API UBTD_TimeLimitRandom : public UBTDecorator
-{
- GENERATED_BODY()
-
-public:
- UBTD_TimeLimitRandom(const FObjectInitializer& ObjectInitializer);
-
- /** TimeLimit */
- UPROPERTY(EditAnywhere, Category="TimeLimitRandom", meta=(ClampMin="0"))
- FFloatInterval TimeLimitRange = FFloatInterval(3.0f, 5.0f);
- UPROPERTY(EditAnywhere, Category="TimeLimitRandom")
- bool bUseIntegers = true;
-
- virtual FString GetStaticDescription() const override;
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
-#if WITH_EDITOR
- virtual FName GetNodeIconName() const override;
-#endif // WITH_EDITOR
-#endif
-
-protected:
- virtual void OnNodeActivation(FBehaviorTreeSearchData& SearchData) override;
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
- // 5.4.0 and up only code
- virtual uint16 GetInstanceMemorySize() const override;
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-
- virtual void OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual void OnCeaseRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override;
- virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
-#endif
-
-private:
- /** max allowed time for execution of underlying node */
- UPROPERTY(EditAnywhere, Category="Decorator")
- float TimeLimit;
-};
diff --git a/Source/UHLAI/Public/Services/BTS_GameplayFocus.h b/Source/UHLAI/Public/Services/BTS_GameplayFocus.h
deleted file mode 100644
index cf28bcf5..00000000
--- a/Source/UHLAI/Public/Services/BTS_GameplayFocus.h
+++ /dev/null
@@ -1,33 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Misc/EngineVersionComparison.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "BehaviorTree/Services/BTService_DefaultFocus.h"
-#include "BTS_GameplayFocus.generated.h"
-
-class UBehaviorTreeComponent;
-
-/**
- * Prevents rotation jittering while moving to enemy
- * Requires to turned on "UseControllerDesiredRotation"
- * Requires to turn off "UseControllerRotationYaw"/"UseControllerRotationPitch"/"UseControllerRotationRoll"
- * Troubleshooting:
- * - Check that nothing "ClearFocus" when thinks that it don't work
- * - Check that MoveTo uses "AllowStafe"(low chances to get work, in tests it don't block from strafing)
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTS_GameplayFocus : public UBTService_DefaultFocus
-{
- GENERATED_BODY()
-
-public:
- UBTS_GameplayFocus(const FObjectInitializer& ObjectInitializer);
-
-#if UE_VERSION_NEWER_THAN(5, 4, 0)
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-#endif
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_ClearFocus.h b/Source/UHLAI/Public/Tasks/BTT_ClearFocus.h
deleted file mode 100644
index 1192cdda..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_ClearFocus.h
+++ /dev/null
@@ -1,26 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BTT_ClearFocus.generated.h"
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_ClearFocus : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_ClearFocus(const FObjectInitializer& ObjectInitializer);
-
- // not possible to expose "EAIFocusPriority::Type"
- // by default clears Gameplay level priority
- // UPROPERTY(Category="Decorator", EditAnywhere)
- // EAIFocusPriority::Type Priority = (uint8)EAIFocusPriority::Gameplay;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_DebugPrintBBValue.h b/Source/UHLAI/Public/Tasks/BTT_DebugPrintBBValue.h
deleted file mode 100644
index c0da3e46..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_DebugPrintBBValue.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BTT_DebugPrintBBValue.generated.h"
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_DebugPrintBBValue : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_DebugPrintBBValue(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FBlackboardKeySelector BlackboardKey;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- float Duration = 3.5f;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FLinearColor Color = FLinearColor(0, 0.66, 1);;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FName Key = NAME_None;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- FString GetBBKeyDescription(UBehaviorTreeComponent& OwnerComp);
- virtual FString GetStaticDescription() const override;
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_DebugPrintString.h b/Source/UHLAI/Public/Tasks/BTT_DebugPrintString.h
deleted file mode 100644
index d0db3b84..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_DebugPrintString.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BehaviorTree/ValueOrBBKey.h"
-#include "BTT_DebugPrintString.generated.h"
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_DebugPrintString : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_DebugPrintString(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditFixedSize, MultiLine, FullyExpand=true))
- TArray PrintStrings = {
- FValueOrBBKey_String(""),
- FValueOrBBKey_String(""),
- FValueOrBBKey_String("")
- };
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FValueOrBBKey_Float Duration = 3.5f;
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FLinearColor Color = FLinearColor(0, 0.66, 1);
-
- UPROPERTY(Category="Decorator", EditAnywhere)
- FValueOrBBKey_Name Key = FValueOrBBKey_Name();
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual FString GetStaticDescription() const override;
-
-private:
- FString GetFinalString() const;
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_FireGameplayEvent.h b/Source/UHLAI/Public/Tasks/BTT_FireGameplayEvent.h
deleted file mode 100644
index e729c5f0..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_FireGameplayEvent.h
+++ /dev/null
@@ -1,52 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BTT_FireGameplayEvent.generated.h"
-
-struct FBlackboardKeySelector;
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_FireGameplayEvent : public UBTTaskNode
-{
- GENERATED_BODY()
-
-
-public:
- UBTT_FireGameplayEvent(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FGameplayTag EventTag = FGameplayTag::EmptyTag;
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FBlackboardKeySelector Target;
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FBlackboardKeySelector Instigator;
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FBlackboardKeySelector OptionalObject;
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FBlackboardKeySelector OptionalObject2;
-
- // tags that required on instigator to fire event ??
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FGameplayTagContainer InstigatorTags = {};
-
- // tags that required on target to fire event ??
- UPROPERTY(EditAnywhere, Category="Blackboard")
- FGameplayTagContainer TargetTags = {};
-
- UPROPERTY(EditAnywhere, Category="Blackboard")
- float EventMagnitude = 0.0f;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
-
- virtual FString GetStaticDescription() const override;
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_InvokeGameplayAbility.h b/Source/UHLAI/Public/Tasks/BTT_InvokeGameplayAbility.h
deleted file mode 100644
index 6e87bd9b..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_InvokeGameplayAbility.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLValueOrBBKey_GameplayTag.h"
-#include "Abilities/GameplayAbilityTypes.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BTT_InvokeGameplayAbility.generated.h"
-
-class IAbilitySystemInterface;
-
-struct FInvokeGameplayAbilityMemory
-{
- FDelegateHandle AbilityEndHandle;
-};
-
-/**
- * TODO Invoke by Class option?
- * 1) tbh its bad practice to have hard refs on classes,
- * no need in this options, better to force good practices - dont hard ref abilities
- * 2) it brokes good architechture/behaviorTrees reusability if we hard ref ability
- * it means that nested abilities can't be activated, with activation by tag
- * all enemies can have different abilities implementation using same tag
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_InvokeGameplayAbility : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_InvokeGameplayAbility(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Blackboard", EditAnywhere)
- FUHLValueOrBBKey_GameplayTag GameplayTag;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "Activate")
- FValueOrBBKey_Bool bActivate = true;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "WaitForFinishing")
- FValueOrBBKey_Bool bWaitForFinishing = true;
-
- UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "DebugMessages")
- FValueOrBBKey_Bool bDebugMessages = false;
-
- /** Cancelled ability should be handled as success. */
- UPROPERTY(EditAnywhere, Category = "Gameplay Ability Activation", DisplayName = "TreatCancelledAbilityAsSuccess")
- FValueOrBBKey_Bool bTreatCancelledAbilityAsSuccess = false;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual EBTNodeResult::Type AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual void OnTaskFinished(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTNodeResult::Type TaskResult) override;
-
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual uint16 GetInstanceMemorySize() const override { return sizeof(FInvokeGameplayAbilityMemory); };
-
- virtual FString GetStaticDescription() const override;
-
-private:
- bool bIsAborting = false;
-
- UFUNCTION()
- void OnAbilityEnded(const FAbilityEndedData& AbilityEndedData, UBehaviorTreeComponent* OwnerComp);
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_PlayAnimMontage.h b/Source/UHLAI/Public/Tasks/BTT_PlayAnimMontage.h
deleted file mode 100644
index 96607779..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_PlayAnimMontage.h
+++ /dev/null
@@ -1,96 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "PlayMontageCallbackProxy.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BTT_PlayAnimMontage.generated.h"
-
-DECLARE_LOG_CATEGORY_EXTERN(LogBTT_PlayAnimMontage, Log, All);
-
-/**
- * Deciding when to end the node
- */
-UENUM()
-enum ETaskNodeEndPolicy
-{
- /**
- * after the node ends, still need to perform montage node, using this policy can make the anime more coherent
- */
- OnMontageBlendingOut,
-
- /**
- * end when the montage is completely finished, applicable to situations where only one montage is executed
- */
- OnMontageEnded
-};
-
-/**
- * playMontage and wait finish.
- * If the montage is already playing, it will be forcefully overwritten and played directly.
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_PlayAnimMontage : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_PlayAnimMontage(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(Category="Blackboard", EditAnywhere)
- UAnimMontage* AnimMontage = nullptr;
- UPROPERTY(Category="Blackboard", EditAnywhere)
- float PlayRate = 1.0f;
- UPROPERTY(Category="Blackboard", EditAnywhere)
- float StartingPosition = 0.0f;
- UPROPERTY(Category="Blackboard", EditAnywhere)
- FName StartSectionName = NAME_None;
- UPROPERTY(Category="Blackboard", EditAnywhere)
- bool StopMontageOnAbort = true;
- UPROPERTY(Category="Blackboard", EditAnywhere)
- TEnumAsByte TaskNodeEndPolicy = ETaskNodeEndPolicy::OnMontageBlendingOut;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual EBTNodeResult::Type AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual void OnTaskFinished(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory,
- EBTNodeResult::Type TaskResult) override;
-
- virtual FString GetStaticDescription() const override;
-
-private:
- /**
- * AIOwner Cache
- */
- UPROPERTY()
- TWeakObjectPtr AIOwner;
-
-protected:
- /**
- * PlayMontage and bind callback
- */
- bool PlayMontage(USkeletalMeshComponent* InSkeletalMeshComponent,
- UAnimMontage* MontageToPlay,
- float InPlayRate,
- float InStartingPosition,
- FName InStartingSection);
-
- /**
- * All callbacks at the end of montage need to be filtered
- */
- UFUNCTION()
- void OnMontageEnded(UAnimMontage* InAnimMontage, bool bInterrupted);
-
- /**
- * All callbacks at the BlendingOut of montage need to be filtered
- */
- UFUNCTION()
- void OnMontageBlendingOut(UAnimMontage* InAnimMontage, bool bInterrupted);
-
- void ClearMontageDelegate();
-
- /**
- * finish AIOwner task node, if AIOwner still is Valid
- */
- void FinishTaskNode();
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_SetBBValue.h b/Source/UHLAI/Public/Tasks/BTT_SetBBValue.h
deleted file mode 100644
index 887c9b28..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_SetBBValue.h
+++ /dev/null
@@ -1,97 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BehaviorTree/BehaviorTreeTypes.h"
-#include "Core/UHLBlackboardValueType.h"
-#include "Core/UHLMathOperations.h"
-#include "BTT_SetBBValue.generated.h"
-
-/**
- * Use with caution, setting BB values in BehaviorTrees directly is "anti-pattern"
- * mostly you want to write BTTasks where its possible, use it for test purposes
- *
- * TODO arithmetic operations like A + B, A * B ...
- * TODO vector calculations - add relative to owner, e.g. set Value as GetActorLocation + Value(offset)
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_SetBBValue : public UBTTaskNode
-{
- GENERATED_BODY()
-
-public:
- UBTT_SetBBValue(const FObjectInitializer& ObjectInitializer);
-
- /** blackboard key selector */
- UPROPERTY(EditAnywhere, Category="Blackboard")
- struct FBlackboardKeySelector BlackboardKey;
-
- UPROPERTY(
- EditAnywhere, Category="Blackboard",
- meta=(EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Int || CurrentBBKeyValueType==EBlackboardValueType::Float || CurrentBBKeyValueType==EBlackboardValueType::Vector || CurrentBBKeyValueType==EBlackboardValueType::Rotator",
- EditConditionHides, ShowOnlyInnerProperties))
- FOperationOnBBValue OperationOnBBValue;
-
- /** Values */
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Bool", EditConditionHides))
- bool BoolValue;
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::String", EditConditionHides, MultiLine))
- FString StringValue;
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Name", EditConditionHides, MultiLine))
- FName NameValue;
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Enum || CurrentBBKeyValueType==EBlackboardValueType::NativeEnum", EditConditionHides, GetOptions="GetEnumOptions"))
- FString EnumStringValue;
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Object", EditConditionHides))
- FBlackboardKeySelector ObjectValue;
- UPROPERTY(Category="Blackboard", EditAnywhere, meta=(DisplayName="Value", EditCondition="CurrentBBKeyValueType==EBlackboardValueType::Class", EditConditionHides))
- UClass* ClassValue;
- /** ~Values */
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
-
- virtual FString GetStaticDescription() const override;
-
- virtual void InitializeFromAsset(UBehaviorTree& Asset) override;
-
- virtual void PostLoad() override;
-
-#if WITH_EDITORONLY_DATA
-
- // UPROPERTY(Category=Blackboard, EditAnywhere, meta=(DisplayName="Key Query"))
- // TEnumAsByte BasicOperation;
- // UPROPERTY(Category=Blackboard, EditAnywhere, meta=(DisplayName="Key Query"))
- // TEnumAsByte ArithmeticOperation;
- // UPROPERTY(Category=Blackboard, EditAnywhere, meta=(DisplayName="Key Query"))
- // TEnumAsByte TextOperation;
-
-#endif
-
-#if WITH_EDITOR
- virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
-#endif
-
-private:
- UPROPERTY()
- UEnum* CurrentEnum;
- UPROPERTY()
- EBlackboardValueType CurrentBBKeyValueType = EBlackboardValueType::None;
-
- UFUNCTION()
- TArray GetEnumOptions();
-
- UPROPERTY(meta=(DeprecatedProperty, DeprecationMessage="Use \"MathOperationNew\" instead"))
- EUHL_MathOperations MathOperation = EUHL_MathOperations::None;
- UPROPERTY(meta=(DeprecatedProperty, DeprecationMessage="Use \"OperationOnBBValue.IntValue\" instead"))
- int32 IntValue;
- UPROPERTY(meta=(DeprecatedProperty, DeprecationMessage="Use \"OperationOnBBValue.FloatValue\" instead"))
- float FloatValue;
- UPROPERTY(meta=(DeprecatedProperty, DeprecationMessage="Use \"OperationOnBBValue.VectorValue\" instead"))
- FVector VectorValue;
- UPROPERTY(meta=(DeprecatedProperty, DeprecationMessage="Use \"OperationOnBBValue.RotatorValue\" instead"))
- FRotator RotatorValue;
-
- UPROPERTY()
- bool bMigratedToMathOperation = false;
-};
diff --git a/Source/UHLAI/Public/Tasks/BTT_TurnTo.h b/Source/UHLAI/Public/Tasks/BTT_TurnTo.h
deleted file mode 100644
index 76cbea7d..00000000
--- a/Source/UHLAI/Public/Tasks/BTT_TurnTo.h
+++ /dev/null
@@ -1,143 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Data/TurnSettings.h"
-#include "BehaviorTree/BTTaskNode.h"
-#include "BehaviorTree/Services/BTService_DefaultFocus.h"
-#include "BehaviorTree/Tasks/BTTask_BlackboardBase.h"
-#include "UnrealHelperLibraryTypes.h"
-#include "GameFramework/Character.h"
-#include "BTT_TurnTo.generated.h"
-
-class AAIController;
-class ACharacter;
-
-namespace TurnToStatics
-{
- static bool IsTurnWithAnimationRequired(ACharacter* Character)
- {
- if (!Character) return false;
- if (Character->IsPlayingRootMotion()) return false;
- return true;
- }
-
- static FTurnRange GetTurnRange(float DeltaAngle, bool& bCurrentTurnRangeSet, FTurnSettings TurnSettings_In)
- {
- FTurnRange Result;
- bCurrentTurnRangeSet = false;
- for (TTuple TurnToRange : TurnSettings_In.TurnRangesGroups)
- {
- for (FTurnRange Range : TurnToRange.Value.TurnRanges)
- {
- if (Range.Range.Contains(DeltaAngle))
- {
- Result = Range;
- bCurrentTurnRangeSet = true;
- break;
- }
- }
- if (bCurrentTurnRangeSet)
- {
- break;
- }
- }
- return Result;
- }
-
- FORCEINLINE_DEBUGGABLE FVector::FReal CalculateAngleDifferenceDot(const FVector& VectorA, const FVector& VectorB)
- {
- return (VectorA.IsNearlyZero() || VectorB.IsNearlyZero())
- ? 1.f
- : VectorA.CosineAngle2D(VectorB);
- }
-}
-
-struct FBTTurnToMemory : FBTFocusMemory
-{
- FTurnRange CurrentTurnRange;
- bool bCurrentTurnRangeSet = false;
- FTurnSettings TurnSettings;
- bool bCurrentTurnSettingsSet = false;
-
- void Reset()
- {
- FocusActorSet = nullptr;
- FocusLocationSet = FAISystem::InvalidLocation;
- bActorSet = false;
- bCurrentTurnRangeSet = false;
- bCurrentTurnSettingsSet = false;
- }
-};
-
-/**
- * Mostly copy-pasted from RotateToFaceBBEntry but can use animations to rotate
- * TODO bForceRotateNotOnlyWithAnims - overrides DataAsset setting, in rare cases we need to rotate in place
- */
-UCLASS(config = Game, Category = "UnrealHelperLibrary")
-class UHLAI_API UBTT_TurnTo : public UBTTask_BlackboardBase
-{
- GENERATED_BODY()
-
-protected:
- // TODO IMO can't be 0.0f, enemy wont turn such precisely clamp to 0.1f at least?
- /** Success condition precision in degrees */
- UPROPERTY(config, Category="TurnTo", EditAnywhere, meta = (ClampMin = "0.0", Units="Degrees"))
- float Precision = 1.0f;
-
- UPROPERTY(EditAnywhere, Category="TurnTo")
- bool bUseTurnAnimations = true;
- UPROPERTY(EditAnywhere, Category="TurnTo", meta=(EditCondition="bUseTurnAnimations", EditConditionHides))
- EUHLSettingsSource SettingsSource = EUHLSettingsSource::Actor;
-
- UPROPERTY(EditAnywhere, Category="TurnTo", meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides))
- FTurnSettings TurnSettings;
- UPROPERTY(EditAnywhere, Category="TurnTo", meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::DataAsset", EditConditionHides))
- UTurnSettingsDataAsset* RotateToAnimationsDataAsset;
-
- UPROPERTY(EditAnywhere, Category="TurnTo")
- bool bDebug = false;
-
- // Prefers to rotate 180deg if relative angle >115deg, suits for all medium mobs(human size)
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=1))
- void SetupPreset_Default_90_180();
- // All ranges have same proportion
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=1))
- void SetupPreset_BigEnemy_90_180();
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=2))
- void SetupPreset_45_90_180();
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=3))
- void SetupPreset_15_45_90_180();
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=4))
- void SetupPreset_15_30_45_90_180();
- UFUNCTION(BlueprintCallable, Category="Setup", CallInEditor, meta=(EditCondition="bUseTurnAnimations && SettingsSource==EUHLSettingsSource::Node", EditConditionHides, DisplayPriority=5))
- void Cleanup();
-
-private:
- /** cached Precision tangent value */
- float PrecisionDot;
-
-public:
- UBTT_TurnTo(const FObjectInitializer& ObjectInitializer);
-
- virtual void PostInitProperties() override;
- virtual void PostLoad() override;
-
- virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual void TickTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override;
- virtual EBTNodeResult::Type AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override;
- virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override;
- virtual FString GetStaticDescription() const override;
-
- virtual uint16 GetInstanceMemorySize() const override { return sizeof(FBTTurnToMemory); }
- virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override;
- virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override;
-
-protected:
- float GetPrecisionDot() const { return PrecisionDot; }
- void CleanUp(AAIController& AIController, uint8* NodeMemory);
-
-private:
- FTurnSettings GetTurnSettings(AActor* Actor, bool& bCurrentTurnSettingsSet);
-};
diff --git a/Source/UHLAI/Public/UHLAI.h b/Source/UHLAI/Public/UHLAI.h
deleted file mode 100644
index b677a153..00000000
--- a/Source/UHLAI/Public/UHLAI.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Modules/ModuleManager.h"
-
-
-class FUHLAIModule : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-};
diff --git a/Source/UHLAI/Public/UHLValueOrBBKey_GameplayTag.h b/Source/UHLAI/Public/UHLValueOrBBKey_GameplayTag.h
deleted file mode 100644
index e5496078..00000000
--- a/Source/UHLAI/Public/UHLValueOrBBKey_GameplayTag.h
+++ /dev/null
@@ -1,47 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "BehaviorTree/ValueOrBBKey.h"
-#include "UHLValueOrBBKey_GameplayTag.generated.h"
-
-// TODO: Looks like there is same thing(not sure) in
-// Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/AI/ValueOrBBKey_GameplayTag.h
-
-USTRUCT(BlueprintType, Category = "UnrealHelperLibrary")
-struct UHLAI_API FUHLValueOrBBKey_GameplayTag : public FValueOrBlackboardKeyBase
-{
- GENERATED_BODY()
-
- FUHLValueOrBBKey_GameplayTag(FGameplayTag Default = FGameplayTag::EmptyTag)
- : DefaultValue(Default) {}
- FGameplayTag GetValue(const UBehaviorTreeComponent& BehaviorComp) const;
- FGameplayTag GetValue(const UBehaviorTreeComponent* BehaviorComp) const;
- FGameplayTag GetValue(const UBlackboardComponent& Blackboard) const;
- FGameplayTag GetValue(const UBlackboardComponent* Blackboard) const;
-
- bool SerializeFromMismatchedTag(const FPropertyTag& Tag, FStructuredArchive::FSlot Slot);
-
-#if WITH_EDITOR
- virtual bool IsCompatibleType(const UBlackboardKeyType* KeyType) const override;
-#endif // WITH_EDITOR
-
- FString ToString() const;
-
- UE_DEPRECATED_FORGAME(5.5, "Implicit conversion will be removed next version. Call GetValue instead")
- operator FName() const { return DefaultValue.GetTagName(); }
-
-protected:
- UPROPERTY(EditAnywhere, Category = "Value")
- FGameplayTag DefaultValue = FGameplayTag::EmptyTag;
-};
-
-template <>
-struct TStructOpsTypeTraits : public TStructOpsTypeTraitsBase2
-{
- enum
- {
- WithStructuredSerializeFromMismatchedTag = true,
- };
-};
diff --git a/Source/UHLAI/UHLAI.Build.cs b/Source/UHLAI/UHLAI.Build.cs
deleted file mode 100644
index 7df75dea..00000000
--- a/Source/UHLAI/UHLAI.Build.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class UHLAI : ModuleRules
-{
- public UHLAI(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "CoreUObject",
-
- "GameplayAbilities",
- "GameplayTags",
- "GameplayTasks",
-
- "AIModule",
-
- // ... add other public dependencies that you statically link with here ...
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "Engine",
-
- // TODO: probably should be removed
- "UnrealHelperLibrary",
-
- "AnimGraphRuntime",
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLAIEditor/Private/UHLAIEditor.cpp b/Source/UHLAIEditor/Private/UHLAIEditor.cpp
deleted file mode 100644
index 719de2a7..00000000
--- a/Source/UHLAIEditor/Private/UHLAIEditor.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLAIEditor.h"
-#include "Misc/MessageDialog.h"
-#include "ToolMenus.h"
-#include "UHLAIEditorValueOrBBKeyDetails.h"
-
-static const FName UHLAIEditorTabName("UHLAIEditor");
-
-#define LOCTEXT_NAMESPACE "FUHLAIEditorModule"
-
-void FUHLAIEditorModule::StartupModule()
-{
- // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
-
- // Register the details customizer
- FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked("PropertyEditor");
- // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance));
- // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance));
- // PropertyModule.RegisterCustomClassLayout("BlackboardKeyType_Class", FOnGetDetailCustomizationInstance::CreateStatic(&FBlackboardKeyDetails_Class::MakeInstance));
- // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_Struct::MakeInstance));
- PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance));
- PropertyModule.NotifyCustomizationModuleChanged();
-}
-
-void FUHLAIEditorModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-
- // Unregister the details customization
- if (FModuleManager::Get().IsModuleLoaded("PropertyEditor"))
- {
- FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked("PropertyEditor");
- PropertyModule.UnregisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag");
- PropertyModule.NotifyCustomizationModuleChanged();
- }
-}
-
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLAIEditorModule, UHLAIEditor)
diff --git a/Source/UHLAIEditor/Private/UHLAIEditorValueOrBBKeyDetails.cpp b/Source/UHLAIEditor/Private/UHLAIEditorValueOrBBKeyDetails.cpp
deleted file mode 100644
index 7fb079fe..00000000
--- a/Source/UHLAIEditor/Private/UHLAIEditorValueOrBBKeyDetails.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLAIEditorValueOrBBKeyDetails.h"
-
-#include "GameplayTagContainer.h"
-#include "IDetailChildrenBuilder.h"
-#include "SGameplayTagCombo.h"
-
-TSharedRef FValueOrBBKeyDetails_GameplayTag::MakeInstance()
-{
- return MakeShareable(new FValueOrBBKeyDetails_GameplayTag);
-}
-
-void FValueOrBBKeyDetails_GameplayTag::CustomizeChildren(TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils)
-{
- if (GameplayTagProperty && GameplayTagProperty->IsEditable())
- {
- StructBuilder.AddProperty(GameplayTagProperty.ToSharedRef());
- }
-}
-
-TSharedRef FValueOrBBKeyDetails_GameplayTag::CreateDefaultValueWidget()
-{
- return SNew(SGameplayTagCombo)
- // .Visibility(this, &SGraphPin::GetDefaultValueVisibility)
- // .Filter(FilterString)
- .Tag(this, &FValueOrBBKeyDetails_GameplayTag::GetGameplayTag)
- .OnTagChanged(this, &FValueOrBBKeyDetails_GameplayTag::OnGameplayTagChanged);
-}
-
-void FValueOrBBKeyDetails_GameplayTag::OnGameplayTagChanged(const FGameplayTag NewTag)
-{
- if (DefaultValueProperty.IsValid())
- {
- FGameplayTag TagToSet = NewTag;
- FString TagAsString = TagToSet.ToString();
- const FPropertyAccess::Result Result = DefaultValueProperty->SetValueFromFormattedString(TagAsString);
- if (Result != FPropertyAccess::Success)
- {
- UE_LOG(LogTemp, Warning, TEXT("Failed to set GameplayTag value on property handle."));
- }
- }
-}
-
-FGameplayTag FValueOrBBKeyDetails_GameplayTag::GetGameplayTag() const
-{
- FGameplayTag* GameplayTag = nullptr;
- void* StructData = nullptr;
- if (DefaultValueProperty->GetValueData(StructData) == FPropertyAccess::Success)
- {
- GameplayTag = reinterpret_cast(StructData);
- }
- return *GameplayTag;
-}
diff --git a/Source/UHLAIEditor/Public/UHLAIEditor.h b/Source/UHLAIEditor/Public/UHLAIEditor.h
deleted file mode 100644
index 38abb6c6..00000000
--- a/Source/UHLAIEditor/Public/UHLAIEditor.h
+++ /dev/null
@@ -1,18 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Modules/ModuleManager.h"
-
-class FToolBarBuilder;
-class FMenuBuilder;
-
-class FUHLAIEditorModule : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-
-};
diff --git a/Source/UHLAIEditor/Public/UHLAIEditorValueOrBBKeyDetails.h b/Source/UHLAIEditor/Public/UHLAIEditorValueOrBBKeyDetails.h
deleted file mode 100644
index c96d79b4..00000000
--- a/Source/UHLAIEditor/Public/UHLAIEditorValueOrBBKeyDetails.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "GameplayTagContainer.h"
-#include "ValueOrBBKeyDetails.h"
-
-class FValueOrBBKeyDetails_GameplayTag : public FValueOrBBKeyDetails
-{
-public:
- /** Makes a new instance of this detail layout class for a specific detail view requesting it */
- static TSharedRef MakeInstance();
-
- virtual void CustomizeChildren(TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override;
-
-protected:
- TSharedPtr GameplayTagProperty;
-
- virtual TSharedRef CreateDefaultValueWidget() override;
-
- void OnGameplayTagChanged(const FGameplayTag NewTag);
- FGameplayTag GetGameplayTag() const;
-};
diff --git a/Source/UHLAIEditor/UHLAIEditor.Build.cs b/Source/UHLAIEditor/UHLAIEditor.Build.cs
deleted file mode 100644
index be0d14d4..00000000
--- a/Source/UHLAIEditor/UHLAIEditor.Build.cs
+++ /dev/null
@@ -1,71 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class UHLAIEditor : ModuleRules
-{
- public UHLAIEditor(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "CoreUObject",
- "Engine",
- "PropertyEditor",
- "Blutility",
- "UMG",
- "BehaviorTreeEditor",
- // ... add other public dependencies that you statically link with here ...
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "Projects",
- "InputCore",
- "EditorFramework",
- "UnrealEd",
- "ToolMenus",
- "Slate",
- "SlateCore",
- "UnrealEd",
- "DeveloperSettings",
-
- "UHLAI",
-
- "EditorWidgets",
-
- "GameplayTags",
- "GameplayTagsEditor",
- // ... add private dependencies that you statically link with here ...
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLCharacter/Private/AttributeSets/UHLBaseCharacterAttributeSet.cpp b/Source/UHLCharacter/Private/AttributeSets/UHLBaseCharacterAttributeSet.cpp
deleted file mode 100644
index 14a93083..00000000
--- a/Source/UHLCharacter/Private/AttributeSets/UHLBaseCharacterAttributeSet.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "AttributeSets/UHLBaseCharacterAttributeSet.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacterAttributeSet)
-
-void UUHLBaseCharacterAttributeSet::PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue)
-{
- Super::PreAttributeChange(Attribute, NewValue);
-
- // If a Max value changes, adjust current to keep Current % of Current to Max
- if (Attribute == GetMaxHealthAttribute()) // GetMaxHealthAttribute comes from the Macros defined at the top of the header
- {
- AdjustAttributeForMaxChange(Health, MaxHealth, NewValue, GetHealthAttribute());
- }
-
- ClampAttribute(Attribute, NewValue);
-}
-
-void UUHLBaseCharacterAttributeSet::PreAttributeBaseChange(const FGameplayAttribute& Attribute, float& NewValue) const
-{
- Super::PreAttributeBaseChange(Attribute, NewValue);
-
- ClampAttribute(Attribute, NewValue);
-}
-
-void UUHLBaseCharacterAttributeSet::AdjustAttributeForMaxChange(FGameplayAttributeData & AffectedAttribute, const FGameplayAttributeData & MaxAttribute, float NewMaxValue, const FGameplayAttribute & AffectedAttributeProperty)
-{
- TObjectPtr AbilityComp = GetOwningAbilitySystemComponent();
- const float CurrentMaxValue = MaxAttribute.GetCurrentValue();
- if (!FMath::IsNearlyEqual(CurrentMaxValue, NewMaxValue) && AbilityComp)
- {
- // Change current value to maintain the current Val / Max percent
- const float CurrentValue = AffectedAttribute.GetCurrentValue();
- float NewDelta = (CurrentMaxValue > 0.f) ? (CurrentValue * NewMaxValue / CurrentMaxValue) - CurrentValue : NewMaxValue;
-
- AbilityComp->ApplyModToAttributeUnsafe(AffectedAttributeProperty, EGameplayModOp::Additive, NewDelta);
- }
-}
-
-void UUHLBaseCharacterAttributeSet::ClampAttribute(const FGameplayAttribute& Attribute, float& NewValue) const
-{
- // Values clamp should be always here, dont move to "PostGameplayEffectExecute"
- // it leads to value jittering every frame e.g for stamina like "150, 151, 150, 151, 150, 151, ..."
- if (Attribute == GetHealthAttribute())
- {
- NewValue = FMath::Clamp(NewValue, 0.0f, MaxHealth.GetCurrentValue());
- }
-}
-
diff --git a/Source/UHLCharacter/Private/Characters/UHLBaseCharacter.cpp b/Source/UHLCharacter/Private/Characters/UHLBaseCharacter.cpp
deleted file mode 100644
index a8841282..00000000
--- a/Source/UHLCharacter/Private/Characters/UHLBaseCharacter.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Characters/UHLBaseCharacter.h"
-
-#include "GameFramework/CharacterMovementComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacter)
-
-// Sets default values
-AUHLBaseCharacter::AUHLBaseCharacter(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- // smooth AI rotation
- bUseControllerRotationYaw = false;
- GetCharacterMovement()->bOrientRotationToMovement = 0;
- GetCharacterMovement()->bUseControllerDesiredRotation = true;
-}
-
-FTurnSettings AUHLBaseCharacter::GetTurnSettings_Implementation() const
-{
- return TurnSettingsDataAsset->TurnSettings;
-}
-
diff --git a/Source/UHLCharacter/Private/Characters/UHLBaseCharacterWithASC.cpp b/Source/UHLCharacter/Private/Characters/UHLBaseCharacterWithASC.cpp
deleted file mode 100644
index 52325e1d..00000000
--- a/Source/UHLCharacter/Private/Characters/UHLBaseCharacterWithASC.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Characters/UHLBaseCharacterWithASC.h"
-
-#include "GameFramework/Controller.h"
-#include "UHLAbilitySystemComponent.h"
-#include "AttributeSets/UHLBaseCharacterAttributeSet.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacterWithASC)
-
-AUHLBaseCharacterWithASC::AUHLBaseCharacterWithASC(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- AbilitySystemComponent = CreateDefaultSubobject(TEXT("UHLAbilitySystem"));
-
- // some attribute sets can be added here, but its not only option
- // you can use UHL Settings to set defaults for every AbilitySystemComponent and add default AttributeSet
- // AbilitySystemComponent->AttributeSets = { UUHLBaseCharacterAttributeSet::StaticClass() };
-}
-
-void AUHLBaseCharacterWithASC::PossessedBy(AController* NewController)
-{
- Super::PossessedBy(NewController);
-
- if (bInitUHLAbilitySystemOnPosses)
- {
- if (bDontInitOnSameControllerTwice)
- {
- if (NewController != PreviousController.Get())
- {
- AbilitySystemComponent->InitAbilitySystem(NewController, this);
- PreviousController = NewController;
- }
- }
- else
- {
- AbilitySystemComponent->InitAbilitySystem(NewController, this);
- }
-
- // Advanced setup if you want to make something after attributes set, but before abilities activated
- // AbilitySystemComponent->InitAbilitySystem(NewController, this, false);
- // AbilitySystemComponent->ActivateInitialAbilities();
- }
-}
diff --git a/Source/UHLCharacter/Private/Components/UHLCharacterMovementComponent.cpp b/Source/UHLCharacter/Private/Components/UHLCharacterMovementComponent.cpp
deleted file mode 100644
index de47b7c5..00000000
--- a/Source/UHLCharacter/Private/Components/UHLCharacterMovementComponent.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (c) 2024 NextGenium
-
-
-#include "Components/UHLCharacterMovementComponent.h"
-
-UUHLCharacterMovementComponent::UUHLCharacterMovementComponent()
-{
- bUseControllerDesiredRotation = true;
- bOrientRotationToMovement = false;
-}
-
-void UUHLCharacterMovementComponent::SetRotationRate(FRotator RotationRate_In)
-{
- RotationRate = RotationRate_In;
-}
diff --git a/Source/UHLCharacter/Private/Controllers/UHLPlayerController.cpp b/Source/UHLCharacter/Private/Controllers/UHLPlayerController.cpp
deleted file mode 100644
index c8375ff1..00000000
--- a/Source/UHLCharacter/Private/Controllers/UHLPlayerController.cpp
+++ /dev/null
@@ -1,15 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Controllers/UHLPlayerController.h"
-
-#include "Kismet/GameplayStatics.h"
-#include "Engine/World.h"
-#include "Engine/GameInstance.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLPlayerController)
-
-void AUHLPlayerController::BeginPlay()
-{
- Super::BeginPlay();
-}
diff --git a/Source/UHLCharacter/Private/UHLCharacter.cpp b/Source/UHLCharacter/Private/UHLCharacter.cpp
deleted file mode 100644
index f4760b6c..00000000
--- a/Source/UHLCharacter/Private/UHLCharacter.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLCharacter.h"
-
-#include "Misc/Paths.h"
-#include "GameplayTagsManager.h"
-
-#define LOCTEXT_NAMESPACE "FUHLCharacterModule"
-
-
-void FUHLCharacterModule::StartupModule()
-{
- UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get();
- // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
- TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags"));
-}
-
-void FUHLCharacterModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLCharacterModule, UHLCharacter)
diff --git a/Source/UHLCharacter/Public/AttributeSets/UHLBaseCharacterAttributeSet.h b/Source/UHLCharacter/Public/AttributeSets/UHLBaseCharacterAttributeSet.h
deleted file mode 100644
index cfd7dab9..00000000
--- a/Source/UHLCharacter/Public/AttributeSets/UHLBaseCharacterAttributeSet.h
+++ /dev/null
@@ -1,37 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "AbilitySystemComponent.h"
-#include "AttributeSet.h"
-#include "AttributeSets/UHLAttributeSet.h"
-#include "UHLBaseCharacterAttributeSet.generated.h"
-
-/**
- *
- */
-UCLASS(Category = "UnrealHelperLibrary")
-class UHLCHARACTER_API UUHLBaseCharacterAttributeSet : public UUHLAttributeSet
-{
- GENERATED_BODY()
-
-public:
- ATTRIBUTE_ACCESSORS(UUHLBaseCharacterAttributeSet, Health);
- ATTRIBUTE_ACCESSORS(UUHLBaseCharacterAttributeSet, MaxHealth);
-
-protected:
- virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override;
- virtual void PreAttributeBaseChange(const FGameplayAttribute& Attribute, float& NewValue) const override;
-
- // Helper function to proportionally adjust the value of an attribute when it's associated max attribute changes.
- // (i.e. When MaxHealth increases, Health increases by an amount that maintains the same percentage as before)
- void AdjustAttributeForMaxChange(FGameplayAttributeData& AffectedAttribute, const FGameplayAttributeData& MaxAttribute, float NewMaxValue, const FGameplayAttribute& AffectedAttributeProperty);
- virtual void ClampAttribute(const FGameplayAttribute& Attribute, float& NewValue) const;
-
-private:
- UPROPERTY(BlueprintReadOnly, Category = "Attributes | Health", Meta=(AllowPrivateAccess=true))
- FGameplayAttributeData Health;
- UPROPERTY(BlueprintReadOnly, Category = "Attributes | Health", Meta=(AllowPrivateAccess=true))
- FGameplayAttributeData MaxHealth;
-};
diff --git a/Source/UHLCharacter/Public/Characters/UHLBaseCharacter.h b/Source/UHLCharacter/Public/Characters/UHLBaseCharacter.h
deleted file mode 100644
index 82136900..00000000
--- a/Source/UHLCharacter/Public/Characters/UHLBaseCharacter.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Core/UHLAIActorSettings.h"
-#include "GameFramework/Character.h"
-#include "UHLBaseCharacter.generated.h"
-
-/**
- * Character with base interfaces and features implemented,
- * except AbilitySystem implementation cause its may vary on project setup
- * ASC can be inited on PlayerState/Character
- */
-UCLASS()
-class UHLCHARACTER_API AUHLBaseCharacter : public ACharacter,
- public IUHLAIActorSettings
-{
- GENERATED_BODY()
-
-public:
- // Sets default values for this character's properties
- AUHLBaseCharacter(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings")
- UTurnSettingsDataAsset* TurnSettingsDataAsset;
-
-/** IUHLActorSettings */
- virtual FTurnSettings GetTurnSettings_Implementation() const override;
-/** ~IUHLActorSettings */
-};
diff --git a/Source/UHLCharacter/Public/Characters/UHLBaseCharacterWithASC.h b/Source/UHLCharacter/Public/Characters/UHLBaseCharacterWithASC.h
deleted file mode 100644
index e020e47d..00000000
--- a/Source/UHLCharacter/Public/Characters/UHLBaseCharacterWithASC.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "AbilitySystemInterface.h"
-#include "UHLAbilitySystemComponent.h"
-#include "Characters/UHLBaseCharacter.h"
-#include "Core/UHLAbilitySystemInterface.h"
-#include "UHLBaseCharacterWithASC.generated.h"
-
-class UAbilitySystemComponent;
-
-/**
- * Extended version of UHLBaseCharacter but with AbilitySystem and ASC init on "PossessedBy"
- */
-UCLASS()
-class UHLCHARACTER_API AUHLBaseCharacterWithASC : public AUHLBaseCharacter,
- public IAbilitySystemInterface,
- public IUHLAbilitySystemInterface
-{
- GENERATED_BODY()
-
-public:
- AUHLBaseCharacterWithASC(const FObjectInitializer& ObjectInitializer);
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="UHL BaseCharacter with ASC")
- bool bInitUHLAbilitySystemOnPosses = true;
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="UHL BaseCharacter with ASC")
- bool bDontInitOnSameControllerTwice = true;
-
- /** IAbilitySystemInterface **/
- virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystemComponent; };
- /** ~IAbilitySystemInterface **/
-
- /** IUHLAbilitySystemInterface */
- virtual UUHLAbilitySystemComponent* GetUHLAbilitySystemComponent_Implementation() const override
- {
- return AbilitySystemComponent;
- };
- /** ~IUHLAbilitySystemInterface */
-
-protected:
- /** GameplayAbilities */
- UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category="UHL BaseCharacter with ASC")
- UUHLAbilitySystemComponent* AbilitySystemComponent;
- /** ~GameplayAbilities */
-
- virtual void PossessedBy(AController* NewController) override;
-
-private:
- TWeakObjectPtr PreviousController;
-};
diff --git a/Source/UHLCharacter/Public/Components/UHLCharacterMovementComponent.h b/Source/UHLCharacter/Public/Components/UHLCharacterMovementComponent.h
deleted file mode 100644
index c40fbc5c..00000000
--- a/Source/UHLCharacter/Public/Components/UHLCharacterMovementComponent.h
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2024 NextGenium
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameFramework/CharacterMovementComponent.h"
-#include "UHLCharacterMovementComponent.generated.h"
-
-/**
- *
- */
-UCLASS(Blueprintable, BlueprintType)
-class UHLCHARACTER_API UUHLCharacterMovementComponent : public UCharacterMovementComponent
-{
- GENERATED_BODY()
-
-public:
- UUHLCharacterMovementComponent();
-
- // not required?
- void SetRotationRate(FRotator RotationRate_In);
-};
diff --git a/Source/UHLCharacter/Public/Controllers/UHLPlayerController.h b/Source/UHLCharacter/Public/Controllers/UHLPlayerController.h
deleted file mode 100644
index 99114819..00000000
--- a/Source/UHLCharacter/Public/Controllers/UHLPlayerController.h
+++ /dev/null
@@ -1,19 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameFramework/PlayerController.h"
-#include "UHLPlayerController.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLCHARACTER_API AUHLPlayerController : public APlayerController
-{
- GENERATED_BODY()
-
-public:
- virtual void BeginPlay() override;
-};
diff --git a/Source/UHLCharacter/Public/UHLCharacter.h b/Source/UHLCharacter/Public/UHLCharacter.h
deleted file mode 100644
index fd1f15a9..00000000
--- a/Source/UHLCharacter/Public/UHLCharacter.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Modules/ModuleManager.h"
-
-
-class FUHLCharacterModule : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-};
diff --git a/Source/UHLCharacter/UHLCharacter.Build.cs b/Source/UHLCharacter/UHLCharacter.Build.cs
deleted file mode 100644
index 512b86c4..00000000
--- a/Source/UHLCharacter/UHLCharacter.Build.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class UHLCharacter : ModuleRules
-{
- public UHLCharacter(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- // ... add other public dependencies that you statically link with here ...
- "GameplayAbilities",
- "GameplayTags",
- "GameplayTasks",
- "EnhancedInput",
-
- "UnrealHelperLibrary",
- "UHLDebugSystem",
- "UHLAI",
- "UHLGAS",
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "CoreUObject",
- "Engine",
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLDebug/Private/UHLDebug.cpp b/Source/UHLDebug/Private/UHLDebug.cpp
deleted file mode 100644
index b9586a21..00000000
--- a/Source/UHLDebug/Private/UHLDebug.cpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLDebug.h"
-
-#include "Misc/Paths.h"
-#include "GameplayTagsManager.h"
-
-#define LOCTEXT_NAMESPACE "FUHLDebugModule"
-
-
-void FUHLDebugModule::StartupModule()
-{
- UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get();
- // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
- TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags"));
-}
-
-void FUHLDebugModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLDebugModule, UHLDebug)
diff --git a/Source/UHLDebug/Private/UHLDebugModuleSubsystem.cpp b/Source/UHLDebug/Private/UHLDebugModuleSubsystem.cpp
deleted file mode 100644
index e7ad06ad..00000000
--- a/Source/UHLDebug/Private/UHLDebugModuleSubsystem.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLDebugModuleSubsystem.h"
-
-#include "GameFramework/Pawn.h"
-#include "AbilitySystemInterface.h"
-#include "UHLGASBlueprintLibrary.h"
-#include "Blueprint/UserWidget.h"
-#include "Core/UHLGameplayTags.h"
-#include "Kismet/GameplayStatics.h"
-#include "UI/UHLDebugWidget.h"
-#include "AA_WaitDebugCategoryChange.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugModuleSubsystem)
-
-UUHLDebugModuleSubsystem::UUHLDebugModuleSubsystem()
-{
- UHLDebugWidgetClass = FSoftObjectPath(TEXT("/UnrealHelperLibrary/UI/UI_UHL_DebugWidget.UI_UHL_DebugWidget_C"));
-}
-
-void UUHLDebugModuleSubsystem::Initialize(FSubsystemCollectionBase& Collection)
-{
- Super::Initialize(Collection);
-
- UAA_WaitDebugCategoryChange* WaitEncounterDebugCategoryChangeTask =
- UAA_WaitDebugCategoryChange::WaitDebugCategoryChange(
- GetWorld(),
- UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_AbilityInputCache
- );
- WaitEncounterDebugCategoryChangeTask->OnChange.AddUniqueDynamic(
- this,
- &UUHLDebugModuleSubsystem::OnAbilityInputDebugCategoryChanged);
- WaitEncounterDebugCategoryChangeTask->Activate();
-}
-
-void UUHLDebugModuleSubsystem::Deinitialize()
-{
- Super::Deinitialize();
-}
-
-void UUHLDebugModuleSubsystem::OnAbilityInputDebugCategoryChanged(bool bEnabled)
-{
- if (bEnabled)
- {
- UUHLAbilitySystemComponent* UHLASC = GetPlayerAbilitySystemComponent();
-
- UUHLDebugWidget* DebugWidget = GetOrCreateUHLDebugWidget();
- if (!DebugWidget) return;
- DebugWidget->ToggleAbilityInputCache(UHLASC);
- }
- else
- {
- if (DebugWidgetInstance)
- {
- DebugWidgetInstance->ToggleAbilityInputCache(nullptr);
- };
- }
-}
-
-UUHLDebugWidget* UUHLDebugModuleSubsystem::GetOrCreateUHLDebugWidget()
-{
- if (DebugWidgetInstance) return DebugWidgetInstance;
-
- APlayerController* PlayerController = GetPlayerController();
- if (!PlayerController) return nullptr;
-
- UClass* WidgetClass = UHLDebugWidgetClass.LoadSynchronous();
- DebugWidgetInstance = CreateWidget(PlayerController, WidgetClass);
- DebugWidgetInstance->AddToViewport(99999999);
-
- return DebugWidgetInstance;
-}
-
-APlayerController* UUHLDebugModuleSubsystem::GetPlayerController() const
-{
- return UGameplayStatics::GetPlayerController(GetWorld(), 0);
-}
-
-UUHLAbilitySystemComponent* UUHLDebugModuleSubsystem::GetPlayerAbilitySystemComponent() const
-{
- APlayerController* PlayerController = GetPlayerController();
- if (!PlayerController) return nullptr;
-
- APawn* Pawn = PlayerController->GetPawn();
- if (!Pawn) return nullptr;
-
- IAbilitySystemInterface* AbilitySystemInterface = Cast(Pawn);
- if (!AbilitySystemInterface) return nullptr;
-
- UAbilitySystemComponent* ASC = AbilitySystemInterface->GetAbilitySystemComponent();
- if (!ASC) return nullptr;
-
- UUHLAbilitySystemComponent* UHLASC = Cast(ASC);
- if (!UHLASC) return nullptr;
-
- return UHLASC;
-}
diff --git a/Source/UHLDebug/Private/UI/UHLDebugWidget.cpp b/Source/UHLDebug/Private/UI/UHLDebugWidget.cpp
deleted file mode 100644
index 5203b477..00000000
--- a/Source/UHLDebug/Private/UI/UHLDebugWidget.cpp
+++ /dev/null
@@ -1,41 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UI/UHLDebugWidget.h"
-
-#include "UHLAbilitySystemComponent.h"
-#include "Blueprint/WidgetTree.h"
-#include "Components/TextBlock.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugWidget)
-
-void UUHLDebugWidget::ToggleAbilityInputCache(UUHLAbilitySystemComponent* ASC_In)
-{
- ASC = ASC_In;
- if (ASC.Get())
- {
- bShowAbilityInputCacheList = true;
- }
- else
- {
- bShowAbilityInputCacheList = false;
- }
-}
-
-void UUHLDebugWidget::NativeTick(const FGeometry& MyGeometry, float InDeltaTime)
-{
- Super::NativeTick(MyGeometry, InDeltaTime);
-
- if (bShowAbilityInputCacheList)
- {
- FString NewText = "";
- TArray AbilityInputCache = ASC->GetAbilityInputCache()->GetAbilityInputCache();
-
- for (int32 i = AbilityInputCache.Num() - 1; i >= 0; i--)
- {
- NewText.Append(AbilityInputCache[i].ToString() + FString("\n"));
- }
-
- AbilityInputCacheTextBlock->SetText(FText::FromString(NewText));
- }
-}
diff --git a/Source/UHLDebug/Public/UHLDebug.h b/Source/UHLDebug/Public/UHLDebug.h
deleted file mode 100644
index a9ec7c0a..00000000
--- a/Source/UHLDebug/Public/UHLDebug.h
+++ /dev/null
@@ -1,14 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Modules/ModuleManager.h"
-
-
-class FUHLDebugModule : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-};
diff --git a/Source/UHLDebug/Public/UHLDebugModuleSubsystem.h b/Source/UHLDebug/Public/UHLDebugModuleSubsystem.h
deleted file mode 100644
index 55885c2e..00000000
--- a/Source/UHLDebug/Public/UHLDebugModuleSubsystem.h
+++ /dev/null
@@ -1,36 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Subsystems/GameInstanceSubsystem.h"
-#include "UI/UHLDebugWidget.h"
-#include "UHLDebugModuleSubsystem.generated.h"
-
-// TODO use ULocalPlayer
-UCLASS()
-class UHLDEBUG_API UUHLDebugModuleSubsystem : public ULocalPlayerSubsystem
-{
- GENERATED_BODY()
-
-public:
- UUHLDebugModuleSubsystem();
-
-protected:
- virtual void Initialize(FSubsystemCollectionBase& Collection) override;
- virtual void Deinitialize() override;
-
-private:
- UPROPERTY()
- TSoftClassPtr UHLDebugWidgetClass;
- UPROPERTY()
- UUHLDebugWidget* DebugWidgetInstance = nullptr;
-
- // TODO use ULocalPlayer
- APlayerController* GetPlayerController() const;
- UUHLAbilitySystemComponent* GetPlayerAbilitySystemComponent() const;
- UUHLDebugWidget* GetOrCreateUHLDebugWidget();
-
- UFUNCTION()
- void OnAbilityInputDebugCategoryChanged(bool bEnabled);
-};
diff --git a/Source/UHLDebug/Public/UI/UHLDebugWidget.h b/Source/UHLDebug/Public/UI/UHLDebugWidget.h
deleted file mode 100644
index 43a5b93e..00000000
--- a/Source/UHLDebug/Public/UI/UHLDebugWidget.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLAbilitySystemComponent.h"
-#include "Blueprint/UserWidget.h"
-#include "Components/VerticalBox.h"
-#include "UHLDebugWidget.generated.h"
-
-
-class UTextBlock;
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUG_API UUHLDebugWidget : public UUserWidget
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UHLDebugWidget", meta = (BindWidget))
- UTextBlock* AbilityInputCacheTextBlock;
-
- virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
-
- UFUNCTION(BlueprintCallable, Category="UHLDebugWidget")
- void ToggleAbilityInputCache(UUHLAbilitySystemComponent* ASC_In);
-
-private:
- bool bShowAbilityInputCacheList = false;
- TWeakObjectPtr ASC;
-};
diff --git a/Source/UHLDebug/UHLDebug.Build.cs b/Source/UHLDebug/UHLDebug.Build.cs
deleted file mode 100644
index 4a8c61d4..00000000
--- a/Source/UHLDebug/UHLDebug.Build.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-// Module that helps debugging UnrealHelperLibrary and can depend on all other modules
-// Don't mess with UHLDebugSystem - that completely independent system from UHL
-// and probably should be other plugin
-public class UHLDebug : ModuleRules
-{
- public UHLDebug(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- // ... add other public dependencies that you statically link with here ...
- "GameplayAbilities",
- "GameplayTags",
- "GameplayTasks",
- "EnhancedInput",
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "CoreUObject",
- "Engine",
-
- "Slate",
- "SlateCore",
- "UMG",
- "DeveloperSettings",
-
- "UnrealHelperLibrary",
- "UHLDebugSystem",
- "UHLGAS",
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLDebugSystem/Private/AA_WaitDebugCategoryChange.cpp b/Source/UHLDebugSystem/Private/AA_WaitDebugCategoryChange.cpp
deleted file mode 100644
index fb0aeb00..00000000
--- a/Source/UHLDebugSystem/Private/AA_WaitDebugCategoryChange.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "AA_WaitDebugCategoryChange.h"
-
-#include "UnrealEngine.h"
-#include "Engine/Engine.h"
-#include "Engine/World.h"
-#include "Engine/GameInstance.h"
-#include "Kismet/GameplayStatics.h"
-#include "UHLDebugSystemSubsystem.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AA_WaitDebugCategoryChange)
-
-UAA_WaitDebugCategoryChange* UAA_WaitDebugCategoryChange::WaitDebugCategoryChange(const UObject* WorldContext, FGameplayTag DebugCategoryTag, bool bCheckOnStart)
-{
- // We must have a valid contextual world for this action, so we don't even make it
- // unless we can resolve the UWorld from WorldContext.
- UWorld* ContextWorld = GEngine->GetWorldFromContextObject(WorldContext, EGetWorldErrorMode::ReturnNull);
- if(!IsValid(ContextWorld) || !ensureAlwaysMsgf(IsValid(WorldContext), TEXT("World Context was not valid.")))
- {
- return nullptr;
- }
-
- UAA_WaitDebugCategoryChange* NewAction = NewObject();
- NewAction->ContextWorld = ContextWorld;
- NewAction->DebugCategoryTagInternal = DebugCategoryTag;
- NewAction->bCheckOnStart = bCheckOnStart;
- NewAction->RegisterWithGameInstance(ContextWorld->GetGameInstance());
- return NewAction;
-}
-
-void UAA_WaitDebugCategoryChange::Activate()
-{
- UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld());
- if (IsValid(GameInstance))
- {
- UUHLDebugSystemSubsystem* UHLDebugSubsystem = GameInstance->GetSubsystem();
- UHLDebugSubsystem->OnDebugCategoryChanged.AddUniqueDynamic(this, &UAA_WaitDebugCategoryChange::OnDebugCategoryChange);
- if (bCheckOnStart)
- {
- OnDebugCategoryChange(DebugCategoryTagInternal, UHLDebugSubsystem->IsCategoryEnabled(DebugCategoryTagInternal));
- }
- }
-}
-
-void UAA_WaitDebugCategoryChange::OnDebugCategoryChange(FGameplayTag DebugCategoryTag, bool bEnabled)
-{
- if (DebugCategoryTag != DebugCategoryTagInternal) return;
-
- if (OnChange.IsBound())
- {
- OnChange.Broadcast(bEnabled);
- }
-
- if (bEnabled)
- {
- if (OnEnabled.IsBound())
- {
- OnEnabled.Broadcast(bEnabled);
- }
- }
- else
- {
- if (OnDisabled.IsBound())
- {
- OnDisabled.Broadcast(bEnabled);
- }
- }
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Abilities.cpp b/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Abilities.cpp
deleted file mode 100644
index 427fec56..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Abilities.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategories/DCC_AbilitySystem_Abilities.h"
-
-#include "Engine/World.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Abilities)
-
-void UDCC_AbilitySystem_Abilities::Activate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem"));
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory Ability"));
- return Super::Activate_Implementation(ContextObject);
-}
-
-void UDCC_AbilitySystem_Abilities::Deactivate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset"));
- Super::Deactivate_Implementation(ContextObject);
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Attributes.cpp b/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Attributes.cpp
deleted file mode 100644
index ac73ee2a..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Attributes.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategories/DCC_AbilitySystem_Attributes.h"
-
-#include "Engine/World.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Attributes)
-
-void UDCC_AbilitySystem_Attributes::Activate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem"));
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory Attributes"));
- return Super::Activate_Implementation(ContextObject);
-}
-
-void UDCC_AbilitySystem_Attributes::Deactivate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset"));
- Super::Deactivate_Implementation(ContextObject);
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Effects.cpp b/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Effects.cpp
deleted file mode 100644
index eef36977..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Effects.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategories/DCC_AbilitySystem_Effects.h"
-
-#include "Engine/World.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Effects)
-
-void UDCC_AbilitySystem_Effects::Activate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem"));
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory GameplayEffects"));
- return Super::Activate_Implementation(ContextObject);
-}
-
-void UDCC_AbilitySystem_Effects::Deactivate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset"));
- Super::Deactivate_Implementation(ContextObject);
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategories/DCC_Collisions.cpp b/Source/UHLDebugSystem/Private/DebugCategories/DCC_Collisions.cpp
deleted file mode 100644
index badf1450..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategories/DCC_Collisions.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategories/DCC_Collisions.h"
-
-#include "Engine/World.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_Collisions)
-
-void UDCC_Collisions::Activate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("ShowFlag.Collision 1"));
- Super::Activate_Implementation(ContextObject);
-}
-
-void UDCC_Collisions::Deactivate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("ShowFlag.Collision 0"));
- Super::Deactivate_Implementation(ContextObject);
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategories/DCC_InputSystem_EnhancedInput.cpp b/Source/UHLDebugSystem/Private/DebugCategories/DCC_InputSystem_EnhancedInput.cpp
deleted file mode 100644
index beb4a512..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategories/DCC_InputSystem_EnhancedInput.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategories/DCC_InputSystem_EnhancedInput.h"
-
-#include "Engine/World.h"
-#include "Kismet/KismetSystemLibrary.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_InputSystem_EnhancedInput)
-
-void UDCC_InputSystem_EnhancedInput::Activate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug enhancedinput"));
- Super::Activate_Implementation(ContextObject);
-}
-
-void UDCC_InputSystem_EnhancedInput::Deactivate_Implementation(UObject* ContextObject)
-{
- UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset"));
- Super::Deactivate_Implementation(ContextObject);
-}
diff --git a/Source/UHLDebugSystem/Private/DebugCategoryButtonWidget.cpp b/Source/UHLDebugSystem/Private/DebugCategoryButtonWidget.cpp
deleted file mode 100644
index 53197f95..00000000
--- a/Source/UHLDebugSystem/Private/DebugCategoryButtonWidget.cpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "DebugCategoryButtonWidget.h"
-
-#include "Engine/GameInstance.h"
-#include "Blueprint/WidgetTree.h"
-#include "Components/Button.h"
-#include "Components/ButtonSlot.h"
-#include "Components/CheckBox.h"
-#include "Components/HorizontalBox.h"
-#include "Components/HorizontalBoxSlot.h"
-#include "Components/TextBlock.h"
-#include "Kismet/GameplayStatics.h"
-#include "UHLDebugCategory.h"
-#include "UHLDebugSystemSubsystem.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(DebugCategoryButtonWidget)
-
-void UDebugCategoryButtonWidget::SetUp(const FUHLDebugCategory& UHLDebugCategory_In)
-{
- UHLDebugCategory = UHLDebugCategory_In;
- TextBlock->SetText(FText::FromString(UHLDebugCategory_In.Name));
- UpdateCheckboxState(UHLDebugCategory_In.GetIsEnabled());
- Button->SetBackgroundColor(UHLDebugCategory.Color);
- Button->OnClicked.AddUniqueDynamic(this, &UDebugCategoryButtonWidget::OnButtonClicked);
- UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld());
- if (GameInstance)
- {
- UUHLDebugSystemSubsystem* UHLDebugSubsystem = GameInstance->GetSubsystem();
- UHLDebugSubsystem->OnDebugCategoryChanged.AddUniqueDynamic(this, &UDebugCategoryButtonWidget::OnDebugCategoryChanged);
- }
-}
-
-void UDebugCategoryButtonWidget::UpdateCheckboxState(bool bEnabled_In)
-{
- CheckBox->SetCheckedState(bEnabled_In ? ECheckBoxState::Checked : ECheckBoxState::Unchecked);
-}
-
-bool UDebugCategoryButtonWidget::Initialize()
-{
- bool bIsWidgetInitialized = Super::Initialize();
-
- // more correct way to avoid error. than in original post.
- if(!HasAnyFlags(RF_ClassDefaultObject))
- {
- // root have to be initialized in Initialize function, otherwise it will not work, donno exactly why.
- Button = WidgetTree->ConstructWidget();
- WidgetTree->RootWidget = Button;
- }
- return bIsWidgetInitialized;
-}
-
-void UDebugCategoryButtonWidget::NativePreConstruct()
-{
- Super::NativeConstruct();
-
- if (!WidgetTree) return;
-
- HorizontalBox = WidgetTree->ConstructWidget();
- CheckBox = WidgetTree->ConstructWidget();
- TextBlock = WidgetTree->ConstructWidget();
- if (!HorizontalBox || !CheckBox || !TextBlock) return;
-
- TextBlock->SetShadowOffset(FVector2D(1.0f, 1.0f));
- TextBlock->SetShadowColorAndOpacity(FColor::FromHex("#000000FF"));
- TextBlock->SetVisibility(ESlateVisibility::HitTestInvisible);
- CheckBox->SetVisibility(ESlateVisibility::HitTestInvisible);
- CheckBox->SetIsEnabled(false);
- FCheckBoxStyle CheckBoxStyle = CheckBox->GetWidgetStyle();
- CheckBoxStyle.CheckedImage.TintColor = FColor::Black;
- CheckBoxStyle.ForegroundColor = FColor::White;
- CheckBoxStyle.CheckedForeground = FColor::White;
- CheckBoxStyle.HoveredForeground = FColor::White;
- CheckBoxStyle.PressedForeground = FColor::White;
- CheckBoxStyle.UndeterminedForeground = FColor::White;
- CheckBoxStyle.CheckedHoveredForeground = FColor::White;
- CheckBoxStyle.CheckedPressedForeground = FColor::White;
- CheckBox->SetWidgetStyle(CheckBoxStyle);
- HorizontalBox->SetVisibility(ESlateVisibility::HitTestInvisible);
-
- UButtonSlot* HorizontalBoxButtonSlot = Cast(Button->AddChild(HorizontalBox));
- UHorizontalBoxSlot* CheckboxHorizontalBoxSlot = Cast(HorizontalBox->AddChild(CheckBox));
- UHorizontalBoxSlot* TextBlockHorizontalBoxSlot = Cast(HorizontalBox->AddChild(TextBlock));
- if (!HorizontalBoxButtonSlot || !CheckboxHorizontalBoxSlot || !TextBlockHorizontalBoxSlot) return;
-
- HorizontalBoxButtonSlot->SetHorizontalAlignment(HAlign_Left);
- CheckboxHorizontalBoxSlot->SetPadding(FMargin(0, 0, 10, 0));
- TextBlockHorizontalBoxSlot->SetHorizontalAlignment(HAlign_Left);
- TextBlockHorizontalBoxSlot->SetVerticalAlignment(VAlign_Top);
-}
-
-void UDebugCategoryButtonWidget::OnButtonClicked()
-{
- if (OnMadeClick.IsBound())
- {
- OnMadeClick.Broadcast(this, UHLDebugCategory.Tags.First());
- }
-}
-
-void UDebugCategoryButtonWidget::OnDebugCategoryChanged(FGameplayTag DebugCategoryTag_In, bool bEnabled_In)
-{
- if (UHLDebugCategory.Tags.First() == DebugCategoryTag_In)
- {
- UpdateCheckboxState(bEnabled_In);
- }
-}
diff --git a/Source/UHLDebugSystem/Private/Development/UHLDebugSystemSettings.cpp b/Source/UHLDebugSystem/Private/Development/UHLDebugSystemSettings.cpp
deleted file mode 100644
index 8ef656b7..00000000
--- a/Source/UHLDebugSystem/Private/Development/UHLDebugSystemSettings.cpp
+++ /dev/null
@@ -1,254 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Development/UHLDebugSystemSettings.h"
-
-#include "Core/UHLGameplayTags.h"
-#include "UHLDebugCategory.h"
-#include "UHLDebugSystemSubsystem.h"
-#include "DebugCategories/DCC_AbilitySystem_Abilities.h"
-#include "DebugCategories/DCC_AbilitySystem_Attributes.h"
-#include "DebugCategories/DCC_AbilitySystem_Effects.h"
-#include "DebugCategories/DCC_Collisions.h"
-#include "DebugCategories/DCC_InputSystem_EnhancedInput.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugSystemSettings)
-
-void UUHLDebugSystemSettings::OnEnabledDebugCategoryEntryChanged(
- FGameplayTag ChangedDebugCategoryTag, bool bEnabled)
-{
- if (ChangedDebugCategoryTag != FGameplayTag::EmptyTag)
- {
- FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(ChangedDebugCategoryTag));
- });
- if (UHLDebugCategory != nullptr)
- {
-
- for (FGameplayTag BlockedTag : UHLDebugCategory->Blocks.GetGameplayTagArray())
- {
- for (TTuple& EnabledDebugCategory : EnabledDebugCategories)
- {
- if (!EnabledDebugCategory.Key.MatchesTag(ChangedDebugCategoryTag)
- && EnabledDebugCategory.Key.MatchesTag(BlockedTag))
- {
- EnabledDebugCategory.Value = false;
- }
- }
- }
-
- for (FGameplayTag RequiredDebugCategoryTag : UHLDebugCategory->RequiredDebugCategories.GetGameplayTagArray())
- {
- for (TTuple& EnabledDebugCategory : EnabledDebugCategories)
- {
- if (!EnabledDebugCategory.Key.MatchesTag(ChangedDebugCategoryTag)
- && EnabledDebugCategory.Key.MatchesTag(RequiredDebugCategoryTag))
- {
- EnabledDebugCategory.Value = true;
- }
- }
- }
-
- // UpdateEnabledDebugCategoriesList();
- }
- }
-
- EnabledDebugCategories[ChangedDebugCategoryTag] = bEnabled;
-}
-
-TArray UUHLDebugSystemSettings::GET_DEFAULT_UHL_DEBUG_CATEGORIES()
-{
- TArray DEFAULT_UHL_DEBUG_CATEGORIES = {};
-
- FUHLDebugCategory AbilitySystemAttributesDebugCategory = {};
- AbilitySystemAttributesDebugCategory.Name = "AbilitySystem Attributes";
- AbilitySystemAttributesDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem_Attributes };
- AbilitySystemAttributesDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem);
- AbilitySystemAttributesDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem);
- AbilitySystemAttributesDebugCategory.Components = { UDCC_AbilitySystem_Attributes::StaticClass() };
- AbilitySystemAttributesDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(AbilitySystemAttributesDebugCategory);
-
- FUHLDebugCategory AbilitySystemEffectsDebugCategory = {};
- AbilitySystemEffectsDebugCategory.Name = "AbilitySystem Effects";
- AbilitySystemEffectsDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem_Effects };
- AbilitySystemEffectsDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem);
- AbilitySystemEffectsDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem);
- AbilitySystemEffectsDebugCategory.Components = { UDCC_AbilitySystem_Effects::StaticClass() };
- AbilitySystemEffectsDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(AbilitySystemEffectsDebugCategory);
-
- FUHLDebugCategory AbilitySystemAbilitiesDebugCategory = {};
- AbilitySystemAbilitiesDebugCategory.Name = "AbilitySystem Abilities";
- AbilitySystemAbilitiesDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem_Abilities };
- AbilitySystemAbilitiesDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem);
- AbilitySystemAbilitiesDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem);
- AbilitySystemAbilitiesDebugCategory.Components = { UDCC_AbilitySystem_Abilities::StaticClass() };
- AbilitySystemAbilitiesDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(AbilitySystemAbilitiesDebugCategory);
-
- FUHLDebugCategory EnhancedInputSystemDebugCategory = {};
- EnhancedInputSystemDebugCategory.Name = "EnhancedInputSystem";
- EnhancedInputSystemDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem };
- EnhancedInputSystemDebugCategory.Blocks.AddTag(UHLGameplayTags::TAG_UHL_DebugCategory_AbilitySystem);
- EnhancedInputSystemDebugCategory.Components = { UDCC_InputSystem_EnhancedInput::StaticClass() };
- EnhancedInputSystemDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(EnhancedInputSystemDebugCategory);
-
- FUHLDebugCategory AbilityInputCacheDebugCategory = {};
- AbilityInputCacheDebugCategory.Name = "AbilityInputCache";
- AbilityInputCacheDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_InputSystem_AbilityInputCache };
- AbilityInputCacheDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(AbilityInputCacheDebugCategory);
-
- FUHLDebugCategory CollisionsDebugCategory = {};
- CollisionsDebugCategory.Name = "Collisions";
- CollisionsDebugCategory.Tags = FGameplayTagContainer{ UHLGameplayTags::TAG_UHL_DebugCategory_Collisions };
- EnhancedInputSystemDebugCategory.Components = { UDCC_Collisions::StaticClass() };
- CollisionsDebugCategory.bIsDefaultUHLDebugCategory = true;
- DEFAULT_UHL_DEBUG_CATEGORIES.Add(CollisionsDebugCategory);
-
- return DEFAULT_UHL_DEBUG_CATEGORIES;
-}
-
-#if WITH_EDITOR
-void UUHLDebugSystemSettings::PostInitProperties()
-{
- Super::PostInitProperties();
-
- UpdateDefaultUHLDebugCategories();
-
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- if (DebugCategory.ByDefaultEnabledInBuildTypes.Contains(UUnrealHelperLibraryBPL::GetBuildType()))
- {
- EnabledDebugCategories.Emplace(DebugCategory.Tags.First(), true);
- }
- }
-
- RecreateEnabledDebugCategoriesList();
-}
-
-void UUHLDebugSystemSettings::PreEditChange(FProperty* PropertyAboutToChange)
-{
- if (PropertyAboutToChange->GetName() == GET_MEMBER_NAME_CHECKED(UUHLDebugSystemSettings, EnabledDebugCategories))
- {
- LastEnabledDebugCategories = TMap(EnabledDebugCategories);
- }
-
- Super::PreEditChange(PropertyAboutToChange);
-}
-
-void UUHLDebugSystemSettings::PostEditChangeChainProperty(struct FPropertyChangedChainEvent& PropertyChangedEvent)
-{
- FName PropertyName = PropertyChangedEvent.GetPropertyName();
-
- bool bEditingEnabledCategoriesKey = PropertyName == "EnabledDebugCategories_Key";
- if (bEditingEnabledCategoriesKey || (EnabledDebugCategories.IsEmpty() && !DebugCategories.IsEmpty()))
- {
- RecreateEnabledDebugCategoriesList();
- return;
- }
-
- Super::PostEditChangeChainProperty(PropertyChangedEvent);
-
- bool bEditingEnabledDebugCategories =
- PropertyName == GET_MEMBER_NAME_CHECKED(UUHLDebugSystemSettings, EnabledDebugCategories)
- && !LastEnabledDebugCategories.IsEmpty()
- && !EnabledDebugCategories.IsEmpty()
- && LastEnabledDebugCategories.Num() == EnabledDebugCategories.Num();
-
- // disable other DebugCategories by "Blocks" tags
- if (bEditingEnabledDebugCategories)
- {
- bool NewValue = false;
- FGameplayTag ChangedDebugCategoryTag = FGameplayTag::EmptyTag;
- for (const TTuple& EnabledDebugCategory : EnabledDebugCategories)
- {
- if (LastEnabledDebugCategories[EnabledDebugCategory.Key] != EnabledDebugCategory.Value)
- {
- NewValue = EnabledDebugCategory.Value;
- ChangedDebugCategoryTag = EnabledDebugCategory.Key;
- }
- }
-
- OnEnabledDebugCategoryEntryChanged(ChangedDebugCategoryTag, NewValue);
- }
-
- if (PropertyName == GET_MEMBER_NAME_CHECKED(UUHLDebugSystemSettings, bExcludeDefaultUHLDebugCategories))
- {
- UpdateDefaultUHLDebugCategories();
- RecreateEnabledDebugCategoriesList();
- }
-
- if (PropertyName == GET_MEMBER_NAME_CHECKED(UUHLDebugSystemSettings, DebugCategories)
- || PropertyChangedEvent.PropertyChain.GetActiveMemberNode()->GetValue()->GetName() == GET_MEMBER_NAME_CHECKED(UUHLDebugSystemSettings, DebugCategories))
- {
- RecreateEnabledDebugCategoriesList();
- }
-}
-#endif
-
-void UUHLDebugSystemSettings::RecreateEnabledDebugCategoriesList()
-{
- TMap CopyOfEnabledDebugCategories = TMap(EnabledDebugCategories);
-
- EnabledDebugCategories.Empty();
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- for (FGameplayTag GameplayTag : DebugCategory.Tags.GetGameplayTagArray())
- {
- bool* KeyVal = CopyOfEnabledDebugCategories.Find(GameplayTag);
- EnabledDebugCategories.Add(GameplayTag, KeyVal ? *KeyVal : false);
- }
- }
-}
-
-void UUHLDebugSystemSettings::UpdateEnabledDebugCategoriesList()
-{
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- TArray Keys;
- EnabledDebugCategories.GetKeys(Keys);
-
- FGameplayTagContainer KeysContainer = FGameplayTagContainer::CreateFromArray(Keys);
- if (!KeysContainer.HasAll(DebugCategory.Tags))
- {
- for (FGameplayTag GameplayTag : DebugCategory.Tags.GetGameplayTagArray())
- {
- if (GameplayTag.MatchesAny(KeysContainer))
- {
- continue;
- }
- EnabledDebugCategories.Add(GameplayTag, false);
- }
- }
- }
-}
-
-void UUHLDebugSystemSettings::UpdateDefaultUHLDebugCategories()
-{
- if (bExcludeDefaultUHLDebugCategories)
- {
- DebugCategories.RemoveAll([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.bIsDefaultUHLDebugCategory;
- });
- }
- else
- {
- for (const FUHLDebugCategory& DefaultUHLDebugCategory : GET_DEFAULT_UHL_DEBUG_CATEGORIES())
- {
- FUHLDebugCategory* FoundDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& Category)
- {
- return Category.Tags == DefaultUHLDebugCategory.Tags;
- });
- if (!FoundDebugCategory)
- {
- DebugCategories.Add(DefaultUHLDebugCategory);
- }
- }
- }
-}
diff --git a/Source/UHLDebugSystem/Private/UHLDebugBlueprintLibrary.cpp b/Source/UHLDebugSystem/Private/UHLDebugBlueprintLibrary.cpp
deleted file mode 100644
index ffbafc44..00000000
--- a/Source/UHLDebugSystem/Private/UHLDebugBlueprintLibrary.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLDebugBlueprintLibrary.h"
-
-#include "GameplayTagsManager.h"
-#include "Misc/ConfigCacheIni.h"
-#include "Animation/AnimMontage.h"
-#include "DrawDebugHelpers.h"
-#include "UHLDebugSystemSubsystem.h"
-#include "Engine/World.h"
-#include "Engine/GameInstance.h"
-#include "Kismet/GameplayStatics.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugBlueprintLibrary)
-
-bool UUHLDebugBlueprintLibrary::IsUHLDebugCategoryEnabled(UObject* WorldContextObject, FGameplayTag DebugCategoryGameplayTag)
-{
- UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(WorldContextObject);
- if (!IsValid(GameInstance))
- {
- return false;
- }
-
- UUHLDebugSystemSubsystem* UHLDebugSubsystem = GameInstance->GetSubsystem();
- if (!IsValid(UHLDebugSubsystem))
- {
- return false;
- }
-
- return UHLDebugSubsystem->IsCategoryEnabled(DebugCategoryGameplayTag);
-}
diff --git a/Source/UHLDebugSystem/Private/UHLDebugCategory.cpp b/Source/UHLDebugSystem/Private/UHLDebugCategory.cpp
deleted file mode 100644
index 493d255c..00000000
--- a/Source/UHLDebugSystem/Private/UHLDebugCategory.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLDebugCategory.h"
-
-#include "Templates/SubclassOf.h"
-#include "UHLDebugCategoryComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugCategory)
-
-bool FUHLDebugCategory::TryEnable(UObject* ContextObj)
-{
- bool bResult = false;
-
- int32 ComponentsActivated = 0;
- int32 ComponentsRequiredToActivate = Components.Num();
- for (TSubclassOf ComponentClass : Components)
- {
- if (!ComponentClass)
- {
- ComponentsRequiredToActivate--;
- continue;
- };
-
- UUHLDebugCategoryComponent* Component = GetOrCreateDebugCategoryComponent(ComponentClass, ContextObj);
- if (Component->CanActivate(ContextObj))
- {
- Component->Activate(ContextObj);
- ComponentsActivated++;
- }
- }
- if (ComponentsActivated == ComponentsRequiredToActivate)
- {
- bResult = true;
- }
-
- bIsEnabled = true;
- return bResult;
-}
-
-void FUHLDebugCategory::TryDisable(UObject* ContextObj)
-{
- for (UUHLDebugCategoryComponent* InstancedComponent : InstancedComponents)
- {
- if (InstancedComponent)
- {
- InstancedComponent->Deactivate(ContextObj);
- }
- }
- bIsEnabled = false;
-}
-
-UUHLDebugCategoryComponent* FUHLDebugCategory::GetOrCreateDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj)
-{
- UUHLDebugCategoryComponent* Component = nullptr;
- UUHLDebugCategoryComponent** FoundComponent = GetDebugCategoryComponent(ComponentClass, ContextObj);
- if (!FoundComponent)
- {
- Component = NewObject(ContextObj, ComponentClass);
- InstancedComponents.Add(Component);
- }
- else
- {
- Component = *FoundComponent;
- }
-
- return Component;
-}
-
-UUHLDebugCategoryComponent** FUHLDebugCategory::GetDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj)
-{
- return InstancedComponents.FindByPredicate([=](UUHLDebugCategoryComponent* DebugCategoryComponent)
- {
- return DebugCategoryComponent->GetClass() == ComponentClass;
- });
-}
diff --git a/Source/UHLDebugSystem/Private/UHLDebugCategoryComponent.cpp b/Source/UHLDebugSystem/Private/UHLDebugCategoryComponent.cpp
deleted file mode 100644
index 6dde961b..00000000
--- a/Source/UHLDebugSystem/Private/UHLDebugCategoryComponent.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLDebugCategoryComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugCategoryComponent)
-
-bool UUHLDebugCategoryComponent::CanActivate_Implementation(UObject* ContextObject) const
-{
- return true;
-}
-
-void UUHLDebugCategoryComponent::Activate_Implementation(UObject* ContextObject)
-{
-}
-
-void UUHLDebugCategoryComponent::Deactivate_Implementation(UObject* ContextObject)
-{
-}
diff --git a/Source/UHLDebugSystem/Private/UHLDebugSystem.cpp b/Source/UHLDebugSystem/Private/UHLDebugSystem.cpp
deleted file mode 100644
index d484f6db..00000000
--- a/Source/UHLDebugSystem/Private/UHLDebugSystem.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLDebugSystem.h"
-
-#include "Misc/Paths.h"
-#include "GameplayTagsManager.h"
-#include "UHLConfigMigrationUtils.h"
-#include "Development/UHLDebugSystemSettings.h"
-
-#define LOCTEXT_NAMESPACE "FUHLDebugSystemModule"
-
-void FUHLDebugSystemModule::StartupModule()
-{
- UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get();
- // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
- TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags"));
-
- MigrateOldSettingsFromMainModule();
-}
-
-void FUHLDebugSystemModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-}
-
-void FUHLDebugSystemModule::MigrateOldSettingsFromMainModule()
-{
- UHLConfigMigrationUtils::MigrateConfigSectionIfNeeded(
- TEXT("/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings"),
- TEXT("/Script/UHLDebugSystem.UHLDebugSystemSettings"),
- TEXT("bMigrationFromOldSettingsDone"),
- GGameIni,
- GGameIni
- );
-
- UUHLDebugSystemSettings* Settings = GetMutableDefault();
- if (Settings)
- {
- Settings->ReloadConfig();
- // Settings->SaveConfig();
- }
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLDebugSystemModule, UHLDebugSystem)
diff --git a/Source/UHLDebugSystem/Private/UHLDebugSystemSubsystem.cpp b/Source/UHLDebugSystem/Private/UHLDebugSystemSubsystem.cpp
deleted file mode 100644
index df82852b..00000000
--- a/Source/UHLDebugSystem/Private/UHLDebugSystemSubsystem.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLDebugSystemSubsystem.h"
-
-#include "UnrealHelperLibrary.h"
-#include "GameFramework/Pawn.h"
-#include "GameFramework/Controller.h"
-#include "GameFramework/PlayerController.h"
-#include "Development/UHLDebugSystemSettings.h"
-#include "UnrealHelperLibraryTypes.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-#if WITH_EDITOR
-#include "Framework/Notifications/NotificationManager.h"
-#include "Widgets/Notifications/SNotificationList.h"
-#endif
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugSystemSubsystem)
-
-UUHLDebugSystemSubsystem::UUHLDebugSystemSubsystem()
-{
-}
-
-void UUHLDebugSystemSubsystem::Initialize(FSubsystemCollectionBase& Collection)
-{
- Super::Initialize(Collection);
-
- if (bSetupped) return;
- bSetupped = true;
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::Initialize] Start"));
-
- const UUHLDebugSystemSettings* DeveloperSettings = GetDefault();
- DebugCategories = DeveloperSettings->DebugCategories;
-
- for (const TTuple& EnabledDebugCategory : DeveloperSettings->EnabledDebugCategories)
- {
- const FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(EnabledDebugCategory.Key));
- });
- if (EnabledDebugCategory.Value == true && UHLDebugCategory != nullptr && !UHLDebugCategory->bRequiresPlayerControllerToEnable)
- {
- EnableDebugCategory(EnabledDebugCategory.Key, EnabledDebugCategory.Value);
- }
- };
-
- EUHLBuildType BuildType = UUnrealHelperLibraryBPL::GetBuildType();
- if (BuildType != EUHLBuildType::Editor)
- {
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::Initialize] BuildType not editor so check DebugCategories that should be enabled"));
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::Initialize] EnableDebugCategory %s"), *DebugCategory.Tags.First().ToString());
- if (DebugCategory.ByDefaultEnabledInBuildTypes.Contains(BuildType))
- {
- EnableDebugCategory(DebugCategory.Tags.First(), true);
- }
- }
- }
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::SetUp] Finish"));
-
- FWorldDelegates::OnPostWorldInitialization.AddUObject(this, &ThisClass::OnPostWorldInit);
- FWorldDelegates::OnWorldBeginTearDown.AddUObject(this, &ThisClass::OnWorldBeginTearDown);
-}
-
-void UUHLDebugSystemSubsystem::Deinitialize()
-{
- FWorldDelegates::OnPostWorldInitialization.RemoveAll(this);
-
- if (UWorld* World = GetWorld())
- {
- if (ActorSpawnedDelegateHandle.IsValid())
- {
- World->RemoveOnActorSpawnedHandler(ActorSpawnedDelegateHandle);
- }
- }
-
- for (FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- // if (DebugCategory.bForceComponentsDeactivateOnEnd)
- if (DebugCategory.GetIsEnabled())
- {
- DebugCategory.TryDisable(this);
- }
- }
-
- Super::Deinitialize();
-}
-
-void UUHLDebugSystemSubsystem::OnActorSpawned(AActor* SpawnedActor)
-{
- if (AController* Controller = Cast(SpawnedActor))
- {
- // Pawn spawned, check if it’s controlled by a player
- if (APlayerController* PC = Cast(Controller))
- {
- UE_LOG(LogTemp, Log, TEXT("Pawn %s began play, controlled by PlayerController %s"), *Controller->GetName(), *PC->GetName());
- // Handle the player/pawn here (e.g., subscribe to further events, spawn effects, etc.)
-
- // unsubscribe as fast as possible
- if (UWorld* World = GetWorld())
- {
- if (ActorSpawnedDelegateHandle.IsValid())
- {
- World->RemoveOnActorSpawnedHandler(ActorSpawnedDelegateHandle);
- }
- }
- SetUpCategoriesThatRequiresPlayerController();
- }
- }
-}
-
-void UUHLDebugSystemSubsystem::SetUpCategoriesThatRequiresPlayerController()
-{
- if (bSetUpCategoriesThatRequiresPlayerController) return;
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::SetUpCategoriesThatRequiresPlayerController] Start"));
- bSetUpCategoriesThatRequiresPlayerController = true;
-
- const UUHLDebugSystemSettings* DeveloperSettings = GetDefault();
-
- for (const TTuple& EnabledDebugCategory : DeveloperSettings->EnabledDebugCategories)
- {
- const FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(EnabledDebugCategory.Key));
- });
- if (EnabledDebugCategory.Value == true && UHLDebugCategory != nullptr && UHLDebugCategory->bRequiresPlayerControllerToEnable)
- {
- EnableDebugCategory(EnabledDebugCategory.Key, EnabledDebugCategory.Value);
- }
- };
-
- // activate debug categories that "bSetUpCategoriesThatRequiresPlayerController" and should be enabled in BuildType
- EUHLBuildType BuildType = UUnrealHelperLibraryBPL::GetBuildType();
- if (BuildType != EUHLBuildType::Editor)
- {
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::SetUpCategoriesThatRequiresPlayerController] BuildType not editor so check DebugCategories that should be enabled"));
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- if (DebugCategory.ByDefaultEnabledInBuildTypes.Contains(BuildType))
- {
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::SetUpCategoriesThatRequiresPlayerController] EnableDebugCategory %s"), *DebugCategory.Tags.First().ToString());
- EnableDebugCategory(DebugCategory.Tags.First(), true);
- }
- }
- }
-
- bIsSetuping = false;
- UE_LOG(LogUnrealHelperLibrary, Warning, TEXT("[UUHLDebugSubsystem::SetUpCategoriesThatRequiresPlayerController] Finish"));
-}
-
-bool UUHLDebugSystemSubsystem::IsCategoryEnabled(const FGameplayTag DebugCategoryTag) const
-{
- const FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(DebugCategoryTag));
- });
- if (UHLDebugCategory != nullptr)
- {
- return UHLDebugCategory->GetIsEnabled();
- }
- return false;
-}
-
-void UUHLDebugSystemSubsystem::EnableDebugCategory(const FGameplayTag DebugCategoryTag, bool bEnable)
-{
- bool bEnabled = bEnable;
-
- FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(DebugCategoryTag));
- });
- if (UHLDebugCategory == nullptr) return;
- if (UHLDebugCategory->bRequiresPlayerControllerToEnable && !bSetUpCategoriesThatRequiresPlayerController) return;
- if (UHLDebugCategory->GetIsEnabled() && bEnable) return;
- if (!UHLDebugCategory->GetIsEnabled() && !bEnable) return;
-
- if (bEnable)
- {
- // Disable blocked DebugCategories
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- if (DebugCategory != *UHLDebugCategory
- && !UHLDebugCategory->Blocks.IsEmpty()
- && DebugCategory.Tags.HasAny(UHLDebugCategory->Blocks))
- {
- EnableDebugCategory(DebugCategory.Tags.First(), false);
- }
- }
-
- // Enable required DebugCategories
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- if (DebugCategory != *UHLDebugCategory
- && !UHLDebugCategory->RequiredDebugCategories.IsEmpty()
- && DebugCategory.Tags.HasAny(UHLDebugCategory->RequiredDebugCategories))
- {
- EnableDebugCategory(DebugCategory.Tags.First(), true);
- }
- }
-
- bEnabled = UHLDebugCategory->TryEnable(this);
- }
- else
- {
- if (!bIsSetuping)
- // TODO remove
- // || (bIsSetuping && UHLDebugCategory->bForceComponentsDeactivateOnEnd))
- {
- // Check that its not required by some other DebugCategory
- bool bHasDependantDebugCategory = false;
- FUHLDebugCategory DependantDebugCategory;
- for (const FUHLDebugCategory& DebugCategory : DebugCategories)
- {
- if (DebugCategory != *UHLDebugCategory
- && !DebugCategory.RequiredDebugCategories.IsEmpty()
- && DebugCategory.RequiredDebugCategories.HasAny(UHLDebugCategory->Tags))
- {
- bHasDependantDebugCategory = true;
- DependantDebugCategory = DebugCategory;
- // EnableDebugCategory(DebugCategory.Tags.First(), true);
- }
- }
- if (bHasDependantDebugCategory)
- {
- DependantDebugCategory.TryDisable(this);
-
- #if WITH_EDITOR
- // Create the notification info
- FText ToastText = FText::Format(FTextFormat::FromString(TEXT("UHLDebugSystem: Dependant DebugCategory {0} also disabled")), FText::FromString(DependantDebugCategory.Name));
- FNotificationInfo Info(ToastText);
- Info.bFireAndForget = true; // auto‑expire
- Info.FadeOutDuration = 0.5f; // smooth fade
- Info.ExpireDuration = 5.0f; // seconds on‑screen
- Info.bUseThrobber = false; // no spinning icon
- Info.bUseLargeFont = false;
- Info.bUseSuccessFailIcons = false; // we’ll show a warning icon manually
-
- // Optionally give it a warning icon on the left:
- static const FName WarningIconName = TEXT("Icons.Warning");
- Info.Image = FCoreStyle::Get().GetBrush(WarningIconName);
-
- // Fire it off
- FSlateNotificationManager::Get().AddNotification(Info);
- #endif
- }
-
- UHLDebugCategory->TryDisable(this);
- }
- }
-
- for (FGameplayTag GameplayTag : UHLDebugCategory->Tags.GetGameplayTagArray())
- {
- OnDebugCategoryChanged.Broadcast(GameplayTag, bEnabled);
- }
-}
-
-void UUHLDebugSystemSubsystem::ToggleDebugCategory(const FGameplayTag DebugCategoryTag)
-{
- EnableDebugCategory(DebugCategoryTag, !IsCategoryEnabled(DebugCategoryTag));
-}
-
-const FUHLDebugCategory& UUHLDebugSystemSubsystem::GetDebugCategoryByTag(const FGameplayTag DebugCategoryTag) const
-{
- const FUHLDebugCategory* UHLDebugCategory = DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(DebugCategoryTag));
- });
- return *UHLDebugCategory;
-}
-
-void UUHLDebugSystemSubsystem::OnPostWorldInit(UWorld* InWorld, const UWorld::InitializationValues IVS)
-{
- if (InWorld->IsGameWorld())
- {
- FOnActorSpawned::FDelegate ActorSpawnedDelegate = FOnActorSpawned::FDelegate::CreateUObject(this, &UUHLDebugSystemSubsystem::OnActorSpawned);
- ActorSpawnedDelegateHandle = InWorld->AddOnActorSpawnedHandler(ActorSpawnedDelegate);
- }
-}
-
-void UUHLDebugSystemSubsystem::OnWorldBeginTearDown(UWorld* World)
-{
- World->RemoveOnActorSpawnedHandler(ActorSpawnedDelegateHandle);
-}
\ No newline at end of file
diff --git a/Source/UHLDebugSystem/Private/UI/UHLDebugCategoriesListWidget.cpp b/Source/UHLDebugSystem/Private/UI/UHLDebugCategoriesListWidget.cpp
deleted file mode 100644
index f7e4df26..00000000
--- a/Source/UHLDebugSystem/Private/UI/UHLDebugCategoriesListWidget.cpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UI/UHLDebugCategoriesListWidget.h"
-
-#include "Engine/GameInstance.h"
-#include "Blueprint/WidgetTree.h"
-#include "Components/ButtonSlot.h"
-#include "Components/ScrollBoxSlot.h"
-#include "Development/UHLDebugSystemSettings.h"
-#include "Kismet/GameplayStatics.h"
-#include "DebugCategoryButtonWidget.h"
-#include "UHLDebugSystemSubsystem.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugCategoriesListWidget)
-
-bool UUHLDebugCategoriesListWidget::Initialize()
-{
- bool bIsWidgetInitialized = Super::Initialize();
-
- if(!HasAnyFlags(RF_ClassDefaultObject))
- {
- // root have to be initialized in Initialize function, otherwise it will not work, donno exactly why.
- ScrollBox = WidgetTree->ConstructWidget();
- ScrollBox->SetConsumeMouseWheel(EConsumeMouseWheel::Always);
- ScrollBox->SetVisibility(ESlateVisibility::Visible);
- WidgetTree->RootWidget = ScrollBox;
- }
-
- return bIsWidgetInitialized;
-}
-
-void UUHLDebugCategoriesListWidget::NativeConstruct()
-{
- Super::NativeConstruct();
-
- ScrollBox->ClearChildren();
-
- UHLDebugSubsystem = UGameplayStatics::GetGameInstance(GetWorld())->GetSubsystem();
-
- const TArray& UHLDebugCategories = UHLDebugSubsystem->GetDebugCategories();
- for (const FUHLDebugCategory& UHLDebugCategory : UHLDebugCategories)
- {
- UDebugCategoryButtonWidget* UHLDebugCategoryButton = WidgetTree->ConstructWidget();
- UScrollBoxSlot* ScrollBoxSlot = Cast(ScrollBox->AddChild(UHLDebugCategoryButton));
- UHLDebugCategoryButton->SetUp(UHLDebugCategory);
- UHLDebugCategoryButton->OnMadeClick.AddUniqueDynamic(this, &UUHLDebugCategoriesListWidget::OnButtonClicked);
-
- ScrollBoxSlot->SetPadding(FMargin(0, 0, 0, 10));
- ScrollBoxSlot->SetHorizontalAlignment(EHorizontalAlignment::HAlign_Fill);
- }
-}
-
-void UUHLDebugCategoriesListWidget::NativePreConstruct()
-{
- Super::NativePreConstruct();
- const UUHLDebugSystemSettings* DeveloperSettings = GetDefault();
- for (TTuple EnabledDebugCategory : DeveloperSettings->EnabledDebugCategories)
- {
- UDebugCategoryButtonWidget* UHLDebugCategoryButton = WidgetTree->ConstructWidget();
- UScrollBoxSlot* ScrollBoxSlot = Cast(ScrollBox->AddChild(UHLDebugCategoryButton));
-
- const FUHLDebugCategory* UHLDebugCategory = DeveloperSettings->DebugCategories.FindByPredicate([=](const FUHLDebugCategory& DebugCategory)
- {
- return DebugCategory.Tags.HasAnyExact(FGameplayTagContainer(EnabledDebugCategory.Key));
- });
- if (UHLDebugCategory != nullptr)
- {
- UHLDebugCategoryButton->SetUp(*UHLDebugCategory);
- ScrollBoxSlot->SetPadding(FMargin(0, 0, 0, 10));
- }
- }
-}
-
-void UUHLDebugCategoriesListWidget::OnButtonClicked(UDebugCategoryButtonWidget* Button, FGameplayTag DebugCategoryGameplayTag)
-{
- if (!Button) return;
-
- UHLDebugSubsystem->ToggleDebugCategory(DebugCategoryGameplayTag);
- Button->UpdateCheckboxState(UHLDebugSubsystem->IsCategoryEnabled(DebugCategoryGameplayTag));
-}
diff --git a/Source/UHLDebugSystem/Public/AA_WaitDebugCategoryChange.h b/Source/UHLDebugSystem/Public/AA_WaitDebugCategoryChange.h
deleted file mode 100644
index d39580d6..00000000
--- a/Source/UHLDebugSystem/Public/AA_WaitDebugCategoryChange.h
+++ /dev/null
@@ -1,48 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameplayTagContainer.h"
-#include "Kismet/BlueprintAsyncActionBase.h"
-#include "AA_WaitDebugCategoryChange.generated.h"
-
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FWaitDebugCategoryChanged, bool, bEnabled);
-
-UCLASS(BlueprintType, meta=(ExposedAsyncProxy = AsyncAction))
-class UHLDEBUGSYSTEM_API UAA_WaitDebugCategoryChange : public UBlueprintAsyncActionBase
-{
- GENERATED_BODY()
-
-public:
- // TODO add updating bool value from Blueprint by reference
- // UFUNCTION(BlueprintCallable, DisplayName="WaitDebugCategoryChange", meta=(WorldContext="WorldContext", BlueprintInternalUseOnly="true", AutoCreateRefTerm="bIsDebugEnabledValueRef", AdvancedDisplay="bIsDebugEnabledValueRef"))
- // static UAA_WaitDebugCategoryChange* WaitDebugCategoryChange(const UObject* WorldContext, FGameplayTag DebugCategoryTag, bool bCheckOnStart, const bool& bIsDebugEnabledValueRef);
-
- // WARNING for better experience tags are filtered add child to "UHL.DebugCategory" or "DebugCategory"
- UFUNCTION(BlueprintCallable, Category="UnrealHelperLibrary", meta=(WorldContext="WorldContext", BlueprintInternalUseOnly="true", Keywords = "UnrealHelperLibrary debug UHL debugCategory debugging"))
- static UAA_WaitDebugCategoryChange* WaitDebugCategoryChange(const UObject* WorldContext, UPARAM(meta=(Categories="UHL.DebugCategory,DebugCategory"))FGameplayTag DebugCategoryTag, bool bCheckOnStart = true);
-
- UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange")
- FWaitDebugCategoryChanged OnChange;
- UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange")
- FWaitDebugCategoryChanged OnEnabled;
- UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange")
- FWaitDebugCategoryChanged OnDisabled;
-
- virtual void Activate() override;
-
- virtual UWorld* GetWorld() const override
- {
- return ContextWorld.IsValid() ? ContextWorld.Get() : nullptr;
- }
-
-private:
- TWeakObjectPtr ContextWorld = nullptr;
-
- FGameplayTag DebugCategoryTagInternal = FGameplayTag::EmptyTag;
- bool bCheckOnStart = true;
-
- UFUNCTION()
- void OnDebugCategoryChange(FGameplayTag DebugCategoryTag, bool bEnabled);
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Abilities.h b/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Abilities.h
deleted file mode 100644
index 0115994d..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Abilities.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "DCC_AbilitySystem_Abilities.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Abilities : public UUHLDebugCategoryComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void Activate_Implementation(UObject* ContextObject) override;
- virtual void Deactivate_Implementation(UObject* ContextObject) override;
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Attributes.h b/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Attributes.h
deleted file mode 100644
index 97c6fc37..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Attributes.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "DCC_AbilitySystem_Attributes.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Attributes : public UUHLDebugCategoryComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void Activate_Implementation(UObject* ContextObject) override;
- virtual void Deactivate_Implementation(UObject* ContextObject) override;
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Effects.h b/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Effects.h
deleted file mode 100644
index ef385da2..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Effects.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "DCC_AbilitySystem_Effects.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Effects : public UUHLDebugCategoryComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void Activate_Implementation(UObject* ContextObject) override;
- virtual void Deactivate_Implementation(UObject* ContextObject) override;
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategories/DCC_Collisions.h b/Source/UHLDebugSystem/Public/DebugCategories/DCC_Collisions.h
deleted file mode 100644
index 322c36c5..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategories/DCC_Collisions.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "DCC_Collisions.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDCC_Collisions : public UUHLDebugCategoryComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void Activate_Implementation(UObject* ContextObject) override;
- virtual void Deactivate_Implementation(UObject* ContextObject) override;
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategories/DCC_InputSystem_EnhancedInput.h b/Source/UHLDebugSystem/Public/DebugCategories/DCC_InputSystem_EnhancedInput.h
deleted file mode 100644
index a3b3f155..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategories/DCC_InputSystem_EnhancedInput.h
+++ /dev/null
@@ -1,20 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "DCC_InputSystem_EnhancedInput.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDCC_InputSystem_EnhancedInput : public UUHLDebugCategoryComponent
-{
- GENERATED_BODY()
-
-public:
- virtual void Activate_Implementation(UObject* ContextObject) override;
- virtual void Deactivate_Implementation(UObject* ContextObject) override;
-};
diff --git a/Source/UHLDebugSystem/Public/DebugCategoryButtonWidget.h b/Source/UHLDebugSystem/Public/DebugCategoryButtonWidget.h
deleted file mode 100644
index cd36b7af..00000000
--- a/Source/UHLDebugSystem/Public/DebugCategoryButtonWidget.h
+++ /dev/null
@@ -1,53 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameplayTagContainer.h"
-#include "UHLDebugCategory.h"
-#include "Blueprint/UserWidget.h"
-#include "DebugCategoryButtonWidget.generated.h"
-
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDebugCategoryButtonClick, UDebugCategoryButtonWidget*, Button, FGameplayTag, DebugCategoryTag);
-
-class UUHLDebugSystemSubsystem;
-struct FUHLDebugCategory;
-class UTextBlock;
-class UCheckBox;
-class UHorizontalBox;
-class UButton;
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UDebugCategoryButtonWidget : public UUserWidget
-{
- GENERATED_BODY()
-
-public:
- void SetUp(const FUHLDebugCategory& UHLDebugCategory_In);
- void UpdateCheckboxState(bool bEnabled_In);
-
- FDebugCategoryButtonClick OnMadeClick;
-
-protected:
- virtual bool Initialize() override;
- virtual void NativePreConstruct() override;
-
-private:
- UPROPERTY()
- UButton* Button;
- UPROPERTY()
- UHorizontalBox* HorizontalBox;
- UPROPERTY()
- UCheckBox* CheckBox;
- UPROPERTY()
- UTextBlock* TextBlock;
- UPROPERTY()
- FUHLDebugCategory UHLDebugCategory;
-
- UFUNCTION()
- void OnButtonClicked();
- UFUNCTION()
- void OnDebugCategoryChanged(FGameplayTag DebugCategoryTag_In, bool bEnabled_In);
-};
diff --git a/Source/UHLDebugSystem/Public/Development/UHLDebugSystemSettings.h b/Source/UHLDebugSystem/Public/Development/UHLDebugSystemSettings.h
deleted file mode 100644
index f09a79c8..00000000
--- a/Source/UHLDebugSystem/Public/Development/UHLDebugSystemSettings.h
+++ /dev/null
@@ -1,59 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameplayTagContainer.h"
-#include "Misc/App.h"
-#include "UHLDebugSystemSubsystem.h"
-#include "UHLDebugSystemSettings.generated.h"
-
-/**
- *
- */
-UCLASS(config="Game", defaultconfig, PrioritizeCategories="DebugCategories", DisplayName="UHL Debug System")
-class UHLDEBUGSYSTEM_API UUHLDebugSystemSettings : public UDeveloperSettings
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(EditAnywhere, Category="DebugCategories", NoClear, meta=(FullyExpand=true, ForceInlineRow /**, ReadOnlyKeys **/))
- TMap EnabledDebugCategories = {};
-
- // don't use/show default UHLDebugCategories
- UPROPERTY(config, EditAnywhere, Category="DebugCategoriesSettings")
- bool bExcludeDefaultUHLDebugCategories = false;
-
- UPROPERTY(config, EditAnywhere, Category="DebugCategoriesSettings", meta=(TitleProperty="Name", NoElementDuplicate))
- TArray DebugCategories = {};
-
- UPROPERTY(config)
- bool bMigrationFromOldSettingsDone = false;
-
- // TODO: choosing debug subsystem class??? user can extend debug subsystem with own things?
- // TSubclassOf UHLDebugSubsystemClass;
-
- void OnEnabledDebugCategoryEntryChanged(FGameplayTag ChangedDebugCategoryTag, bool bEnabled);
-
- static TArray GET_DEFAULT_UHL_DEBUG_CATEGORIES();
-
-protected:
-//~UDeveloperSettings interface
- virtual FName GetCategoryName() const override { return FApp::GetProjectName(); };
-//~End of UDeveloperSettings interface
-
-#if WITH_EDITOR
- virtual void PostInitProperties() override;
- virtual void PreEditChange(FProperty* PropertyAboutToChange) override;
- virtual void PostEditChangeChainProperty(struct FPropertyChangedChainEvent& PropertyChangedEvent) override;
-#endif
-
-private:
- TMap LastEnabledDebugCategories;
-
- void RecreateEnabledDebugCategoriesList();
- void UpdateEnabledDebugCategoriesList();
- void UpdateDefaultUHLDebugCategories();
-
-
-};
diff --git a/Source/UHLDebugSystem/Public/UHLDebugBlueprintLibrary.h b/Source/UHLDebugSystem/Public/UHLDebugBlueprintLibrary.h
deleted file mode 100644
index 2180a7b9..00000000
--- a/Source/UHLDebugSystem/Public/UHLDebugBlueprintLibrary.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "GameplayEffect.h"
-#include "AssetRegistry/AssetData.h"
-#include "Kismet/BlueprintFunctionLibrary.h"
-#include "UHLDebugBlueprintLibrary.generated.h"
-
-UCLASS()
-class UHLDEBUGSYSTEM_API UUHLDebugBlueprintLibrary : public UBlueprintFunctionLibrary
-{
- GENERATED_BODY()
-
-public:
- /** DebugSubsystem **/
- UFUNCTION(
- BlueprintPure, Category = "UnrealHelperLibrary|Debug", meta = (Categories = "UHL.DebugCategory,DebugCategory", WorldContext = "WorldContextObject", Keywords = "UnrealHelperLibrary debug"))
- static bool IsUHLDebugCategoryEnabled(UObject* WorldContextObject, FGameplayTag DebugCategoryGameplayTag);
- /** ~DebugSubsystem **/
-};
diff --git a/Source/UHLDebugSystem/Public/UHLDebugCategory.h b/Source/UHLDebugSystem/Public/UHLDebugCategory.h
deleted file mode 100644
index c66e2836..00000000
--- a/Source/UHLDebugSystem/Public/UHLDebugCategory.h
+++ /dev/null
@@ -1,88 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.h"
-#include "GameplayTagContainer.h"
-#include "UnrealHelperLibraryTypes.h"
-#include "UHLDebugCategory.generated.h"
-
-
-USTRUCT(BlueprintType)
-struct FUHLDebugCategory
-{
- GENERATED_BODY()
-
- // TODO:
- // UPROPERTY(EditAnywhere, BlueprintReadWrite)
- // bool bActive = true;
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory")
- FString Name = "";
-
- // if DebugCategory requires PlayerController it can't be enabled before "SetUpCategoriesThatRequiresPlayerController" being called
- // Mostly you want to add "SetUpCategoriesThatRequiresPlayerController" in your "PlayerController.BeginPlay"
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory")
- bool bRequiresPlayerControllerToEnable = true;
-
- // Tags associated with this debug category, like GameplayAbilities category can be activated/deactivated by tag
- // WARNING - for better experience tags are filtered add child to "UHL.DebugCategory" or "DebugCategory"
- // WARNING 2 - NATIVE tags are not supported due to "plugin/module" restrictions, use FGameplayTag::RequestGameplayTag
- // and gameplay tags ini files
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- FGameplayTagContainer Tags = {};
-
- // What DebugCategories required to be enabled for this DebugCategory. On enabling this DebugCategory it will try to enable required DebgugCategories disable other debug categories that match "Required" tags
- // WARNING for better experience tags are filtered add child to "UHL.DebugCategory" or "DebugCategory"
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- FGameplayTagContainer RequiredDebugCategories = {};
-
- // What DebugCategories this DebugCategory blocks. On enabling this DebugCategory it will disable other debug categories that match "Blocks" tags
- // WARNING for better experience tags are filtered add child to "UHL.DebugCategory" or "DebugCategory"
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- FGameplayTagContainer Blocks = {}; // blocks other debug categories activation with specified tags
- // TODO BlockedBy - what categories blocks it
- // UPROPERTY(EditAnywhere, BlueprintReadWrite, meta=(Categories = "UHL.DebugCategory"))
- FGameplayTagContainer BlockedBy = {};
-
- /** defines what to do when DebugCategory enabling, works a bit similar to GameplayAbilities and GameplayEffects components.
- Example - I want component that enables AbilitySystem debug, I write DebugCategoryComponent(C++/BP) and add it here,
- so when DebugCategory enables that simple component "activates", when DebugCategory
- disabled component "deactivates", such simple **/
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", meta=(ForceShowPluginContent))
- TArray> Components = {};
- // for UI, background color and so on
- // ~"FColor::MakeRandomColor()" will lead to non-critical error
- // ~unreal don't support random colors from native code.
- // ~They should be deterministic but there is no option
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", AdvancedDisplay, meta = (IgnoreForMemberInitializationTest))
- FLinearColor Color = FColor::MakeRandomColor();
- UPROPERTY()
- bool bIsDefaultUHLDebugCategory = false;
-
- // "Editor" will mean that its will be enabled in "EnabledDebugCategories" by default for all devs on EditorStartup
- // Others means that DebugCategory will be enabled on start
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "UHLDebugCategory", AdvancedDisplay)
- TArray ByDefaultEnabledInBuildTypes = {};
-
- bool TryEnable(UObject* ContextObj);
- void TryDisable(UObject* ContextObj);
- bool GetIsEnabled() const { return bIsEnabled; };
-
- bool operator==(const FUHLDebugCategory& Other) const
- {
- return Name == Other.Name;
- // not sure checking tags that might change is good idea
- // return ShortName == Other.ShortName && Tags == Other.Tags;
- }
-
-private:
- bool bIsEnabled = false;
-
- UPROPERTY()
- TArray InstancedComponents = {};
-
- UUHLDebugCategoryComponent* GetOrCreateDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj);
- UUHLDebugCategoryComponent** GetDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj);
-};
diff --git a/Source/UHLDebugSystem/Public/UHLDebugCategoryComponent.h b/Source/UHLDebugSystem/Public/UHLDebugCategoryComponent.h
deleted file mode 100644
index 6400e515..00000000
--- a/Source/UHLDebugSystem/Public/UHLDebugCategoryComponent.h
+++ /dev/null
@@ -1,21 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLDebugCategoryComponent.generated.h"
-
-// TODO force activation with "MMB" click
-UCLASS(Abstract, Blueprintable)
-class UHLDEBUGSYSTEM_API UUHLDebugCategoryComponent : public UObject
-{
- GENERATED_BODY()
-
-public:
- UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem")
- void Activate(UObject* ContextObject);
- UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem")
- void Deactivate(UObject* ContextObject);
- UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem")
- bool CanActivate(UObject* ContextObject) const;
-};
diff --git a/Source/UHLDebugSystem/Public/UHLDebugSystem.h b/Source/UHLDebugSystem/Public/UHLDebugSystem.h
deleted file mode 100644
index 4daeeb97..00000000
--- a/Source/UHLDebugSystem/Public/UHLDebugSystem.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Modules/ModuleManager.h"
-
-
-class FUHLDebugSystemModule final : public IModuleInterface
-{
-public:
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-
-private:
- void MigrateOldSettingsFromMainModule();
-};
diff --git a/Source/UHLDebugSystem/Public/UHLDebugSystemSubsystem.h b/Source/UHLDebugSystem/Public/UHLDebugSystemSubsystem.h
deleted file mode 100644
index 4ddf1350..00000000
--- a/Source/UHLDebugSystem/Public/UHLDebugSystemSubsystem.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-
-#include "CoreGlobals.h"
-#include "Engine/Engine.h"
-#include "Engine/World.h"
-#include "EngineUtils.h"
-#include "GameplayTagContainer.h"
-#include "UHLDebugCategory.h"
-#include "Subsystems/GameInstanceSubsystem.h"
-#include "UHLDebugSystemSubsystem.generated.h"
-
-
-DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnUHLDebugCategoryChanged, FGameplayTag, DebugCategoryTag, bool, bEnabled);
-
-UCLASS()
-class UHLDEBUGSYSTEM_API UUHLDebugSystemSubsystem : public UGameInstanceSubsystem
-{
- GENERATED_BODY()
-
-public:
- UUHLDebugSystemSubsystem();
-
- FOnUHLDebugCategoryChanged OnDebugCategoryChanged;
-
- // TODO filter gameplayTags, allow using only values from DebugCategories `meta=(Categories="")`
- // probably "Godreaper.DebugCategories." required, or "ProjectName.DebugCategories"...
- UFUNCTION(Exec, BlueprintCallable, Category="UHLDebugSubsystem", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- bool IsCategoryEnabled(const FGameplayTag DebugCategoryTag) const;
-
- UFUNCTION(Exec, BlueprintCallable, Category="UHLDebugSubsystem", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- void EnableDebugCategory(const FGameplayTag DebugCategoryTag, bool bEnable);
-
- UFUNCTION(Exec, BlueprintCallable, Category="UHLDebugSubsystem", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- void ToggleDebugCategory(const FGameplayTag DebugCategoryTag);
-
- UFUNCTION(BlueprintCallable, Category="UHLDebugSubsystem", meta=(Categories = "UHL.DebugCategory,DebugCategory"))
- const FUHLDebugCategory& GetDebugCategoryByTag(const FGameplayTag DebugCategoryTag) const;
-
- const TArray& GetDebugCategories() const { return DebugCategories; }
-
-protected:
- virtual void Initialize(FSubsystemCollectionBase& Collection) override;
- virtual void Deinitialize() override;
-
-private:
- bool bSetupped = false;
- bool bSetUpCategoriesThatRequiresPlayerController = false;
- bool bIsSetuping = true;
-
- UPROPERTY()
- TArray DebugCategories = {};
-
- FDelegateHandle ActorSpawnedDelegateHandle;
-
- // waiting for world initialize to wait PlayerController spawned for InitDebugCategories
- void OnPostWorldInit(UWorld* InWorld, const UWorld::InitializationValues IVS);
-
- // waiting for world teardown to not waiting for PlayerController spawn until next world inited
- UFUNCTION()
- void OnWorldBeginTearDown(UWorld* World);
-
- // waiting for PlayerController spawned to InitDebugCategories that requires PlayerController
- UFUNCTION()
- void OnActorSpawned(AActor* SpawnedActor);
-
- // should be called when player controller available, e.g. in PlayerController.BeginPlay
- void SetUpCategoriesThatRequiresPlayerController();
-};
diff --git a/Source/UHLDebugSystem/Public/UI/UHLDebugCategoriesListWidget.h b/Source/UHLDebugSystem/Public/UI/UHLDebugCategoriesListWidget.h
deleted file mode 100644
index cf5de541..00000000
--- a/Source/UHLDebugSystem/Public/UI/UHLDebugCategoriesListWidget.h
+++ /dev/null
@@ -1,32 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "GameplayTagContainer.h"
-#include "Components/ScrollBox.h"
-#include "UHLDebugCategoriesListWidget.generated.h"
-
-class UUHLDebugSystemSubsystem;
-class UDebugCategoryButtonWidget;
-class UCanvasPanel;
-/**
- *
- */
-UCLASS()
-class UHLDEBUGSYSTEM_API UUHLDebugCategoriesListWidget : public UUserWidget
-{
- GENERATED_BODY()
-
-protected:
- virtual bool Initialize() override;
- virtual void NativeConstruct() override;
- virtual void NativePreConstruct() override;
-
-private:
- UPROPERTY()
- UScrollBox* ScrollBox;
- TWeakObjectPtr UHLDebugSubsystem;
- UFUNCTION()
- void OnButtonClicked(UDebugCategoryButtonWidget* Button, FGameplayTag DebugCategoryGameplayTag);
-};
diff --git a/Source/UHLDebugSystem/UHLDebugSystem.Build.cs b/Source/UHLDebugSystem/UHLDebugSystem.Build.cs
deleted file mode 100644
index 97dfa81c..00000000
--- a/Source/UHLDebugSystem/UHLDebugSystem.Build.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-// DebugSystem based on GameplayTags that completely separate from other UHL modules
-// should be completely independent of UHL and probably will be other plugin
-public class UHLDebugSystem : ModuleRules
-{
- public UHLDebugSystem(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "CoreUObject",
- "Engine",
-
- // ... add other public dependencies that you statically link with here ...
- "GameplayAbilities",
- "GameplayTags",
- "GameplayTasks",
- "EnhancedInput",
-
- // TODO remove if possible used only for DebugPrints and EUHLBuildType
- "UnrealHelperLibrary",
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "Slate",
- "SlateCore",
- "UMG",
- "AnimGraphRuntime",
- "DeveloperSettings",
-
- // Should not use any other UHL modules
-
- "UHLModulesHelper",
- // ... add private dependencies that you statically link with here ...
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLDebugSystemEditor/Private/UHLDebugSystemEditor.cpp b/Source/UHLDebugSystemEditor/Private/UHLDebugSystemEditor.cpp
deleted file mode 100644
index 999ed66a..00000000
--- a/Source/UHLDebugSystemEditor/Private/UHLDebugSystemEditor.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLDebugSystemEditor.h"
-
-#include "FileHelpers.h"
-#include "Development/UHLDebugSystemSettings.h"
-#include "ToolMenus.h"
-#include "Kismet/GameplayStatics.h"
-
-static const FName UHLDebugSystemEditorTabName("UHLDebugSystemEditor");
-
-#define LOCTEXT_NAMESPACE "FUHLDebugSystemEditorModule"
-
-namespace UHLDebugSystemEditorFunctionLibrary
-{
- static bool HasPlayWorld() { return GEditor->PlayWorld != nullptr; }
-
- static bool HasNoPlayWorld() { return !HasPlayWorld(); }
-
- static bool IsOptionEnabled(const FGameplayTag DebugCategoryTag)
- {
- if (HasPlayWorld())
- {
- UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GEditor->PlayWorld);
- if (!GameInstance) return false;
-
- UUHLDebugSystemSubsystem* DebugSubsystem = GameInstance->GetSubsystem();
- if (!DebugSubsystem) return false;
-
- return DebugSubsystem->IsCategoryEnabled(DebugCategoryTag);
- }
- else
- {
- const UUHLDebugSystemSettings* Settings = GetDefault();
- bool bEnabled = Settings->EnabledDebugCategories[DebugCategoryTag];
- return bEnabled;
- }
- }
-
- static void ToggleDebugCategory_Clicked(const FGameplayTag DebugCategoryTag)
- {
- if (HasPlayWorld())
- {
- UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GEditor->PlayWorld);
- if (GameInstance)
- {
- UUHLDebugSystemSubsystem* DebugSubsystem = GameInstance->GetSubsystem();
- if (DebugSubsystem)
- {
- DebugSubsystem->ToggleDebugCategory(DebugCategoryTag);
- }
- }
- }
-
- UUHLDebugSystemSettings* Settings = GetMutableDefault();
- bool bEnabled = Settings->EnabledDebugCategories[DebugCategoryTag];
- Settings->EnabledDebugCategories.Emplace(DebugCategoryTag, !bEnabled);
- Settings->OnEnabledDebugCategoryEntryChanged(DebugCategoryTag, !bEnabled);
-
- // if this controls editor UI, you may need to force a menu refresh:
- // FSlateApplication::Get().DismissAllMenus();
- // ExtendToolbar(); // or however you re-populate your menu
- }
-
- static TSharedRef GetDebugCategoriesStateDropdown()
- {
- FMenuBuilder MenuBuilder(true, nullptr);
-
- MenuBuilder.BeginSection(NAME_None, FText::FromString("DebugCategories"));
- for (const FUHLDebugCategory& DebugCategory : GetDefault()->DebugCategories)
- {
- const FText DisplayName = FText::FromString(DebugCategory.Tags.First().ToString());
- MenuBuilder.AddMenuEntry(
- DisplayName,
- FText::Format(LOCTEXT("DebugCategoryDescription", "{0}"), FText::FromString(DebugCategory.Name)),
- FSlateIcon(),
- FUIAction(
- FExecuteAction::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::ToggleDebugCategory_Clicked, DebugCategory.Tags.First()),
- FCanExecuteAction(),
- // FCanExecuteAction::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::HasNoPlayWorld),
- FIsActionChecked::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::IsOptionEnabled, DebugCategory.Tags.First()),
- FIsActionButtonVisible()
- // FIsActionButtonVisible::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::HasNoPlayWorld)
- ),
- NAME_None,
- EUserInterfaceActionType::ToggleButton
- );
- }
- MenuBuilder.EndSection();
-
- return MenuBuilder.MakeWidget();
- }
-
- static bool CanShowDebugCategories()
- {
- return !GetDefault()->EnabledDebugCategories.IsEmpty();
- }
-
- static void RegisterGameEditorMenus()
- {
- UToolMenu* Menu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");
- FToolMenuSection& Section = Menu->AddSection("PlayGameExtensions", TAttribute(),
- FToolMenuInsert("Play", EToolMenuInsertType::Default));
-
- FToolMenuEntry ToolMenuEntry = FToolMenuEntry::InitComboButton(
- "DebugCategoriesState",
- FUIAction(
- FExecuteAction(),
- // FCanExecuteAction::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::HasNoPlayWorld),
- FCanExecuteAction(),
- FIsActionChecked(),
- FIsActionButtonVisible::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::CanShowDebugCategories)),
- FOnGetContent::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::GetDebugCategoriesStateDropdown),
- LOCTEXT("UHLDebugSystemEditor_Label", "Debug Categories"),
- LOCTEXT("UHLDebugSystemEditor_ToolTip", "Enabling/Disabling debug categories fast"),
- FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Tools")
- );
- ToolMenuEntry.StyleNameOverride = "CalloutToolbar";
- Section.AddEntry(ToolMenuEntry);
- }
-}
-
-void FUHLDebugSystemEditorModule::StartupModule()
-{
- if (FSlateApplication::IsInitialized())
- {
- UToolMenus::RegisterStartupCallback(
- FSimpleMulticastDelegate::FDelegate::CreateStatic(&UHLDebugSystemEditorFunctionLibrary::RegisterGameEditorMenus));
- }
-}
-
-void FUHLDebugSystemEditorModule::ShutdownModule()
-{
- UToolMenus::UnRegisterStartupCallback(this);
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLDebugSystemEditorModule, UHLDebugSystemEditor)
diff --git a/Source/UHLDebugSystemEditor/Public/UHLDebugSystemEditor.h b/Source/UHLDebugSystemEditor/Public/UHLDebugSystemEditor.h
deleted file mode 100644
index 6223f7cd..00000000
--- a/Source/UHLDebugSystemEditor/Public/UHLDebugSystemEditor.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-
-class FToolBarBuilder;
-class FMenuBuilder;
-
-class FUHLDebugSystemEditorModule : public IModuleInterface
-{
-public:
-
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-};
diff --git a/Source/UHLDebugSystemEditor/UHLDebugSystemEditor.Build.cs b/Source/UHLDebugSystemEditor/UHLDebugSystemEditor.Build.cs
deleted file mode 100644
index 37e97807..00000000
--- a/Source/UHLDebugSystemEditor/UHLDebugSystemEditor.Build.cs
+++ /dev/null
@@ -1,70 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class UHLDebugSystemEditor : ModuleRules
-{
- public UHLDebugSystemEditor(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "CoreUObject",
- "Engine",
- "PropertyEditor",
- "Blutility",
- "UMG",
- // ... add other public dependencies that you statically link with here ...
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "Projects",
- "InputCore",
- "EditorFramework",
- "UnrealEd",
- "ToolMenus",
- "Slate",
- "SlateCore",
- "UnrealEd",
- "DeveloperSettings",
-
- "EditorWidgets",
-
- "GameplayTags",
- "GameplayTagsEditor",
-
- "UHLDebugSystem",
- // ... add private dependencies that you statically link with here ...
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLEditor/Private/Development/UHLEditorSettings.cpp b/Source/UHLEditor/Private/Development/UHLEditorSettings.cpp
deleted file mode 100644
index efedb204..00000000
--- a/Source/UHLEditor/Private/Development/UHLEditorSettings.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Development/UHLEditorSettings.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLEditorSettings)
\ No newline at end of file
diff --git a/Source/UHLEditor/Private/UHLEditor.cpp b/Source/UHLEditor/Private/UHLEditor.cpp
deleted file mode 100644
index 01dac294..00000000
--- a/Source/UHLEditor/Private/UHLEditor.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLEditor.h"
-#include "UHLEditorStyle.h"
-#include "UHLEditorCommands.h"
-#include "Misc/MessageDialog.h"
-#include "ToolMenus.h"
-#include "UHLEditorBlueprintThumbnailRenderer.h"
-#include "ThumbnailRendering/ThumbnailManager.h"
-
-static const FName UHLDebugSystemEditorTabName("UHLEditor");
-
-#define LOCTEXT_NAMESPACE "FUHLEditorModule"
-
-void FUHLEditorModule::StartupModule()
-{
- // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module
-
- FUHLEditorStyle::Initialize();
- FUHLEditorStyle::ReloadTextures();
-
- FUHLEditorCommands::Register();
-
- PluginCommands = MakeShareable(new FUICommandList);
-
- PluginCommands->MapAction(
- FUHLEditorCommands::Get().PluginAction,
- FExecuteAction::CreateRaw(this, &FUHLEditorModule::PluginButtonClicked),
- FCanExecuteAction());
-
- UToolMenus::RegisterStartupCallback(FSimpleMulticastDelegate::FDelegate::CreateRaw(this, &FUHLEditorModule::RegisterMenus));
-
- UThumbnailManager::Get().UnregisterCustomRenderer(UBlueprint::StaticClass());
- UThumbnailManager::Get().RegisterCustomRenderer(UBlueprint::StaticClass(), UUHLEditorBlueprintThumbnailRenderer::StaticClass());
-}
-
-void FUHLEditorModule::ShutdownModule()
-{
- // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading,
- // we call this function before unloading the module.
-
- UToolMenus::UnRegisterStartupCallback(this);
-
- UToolMenus::UnregisterOwner(this);
-
- FUHLEditorStyle::Shutdown();
-
- FUHLEditorCommands::Unregister();
-}
-
-void FUHLEditorModule::PluginButtonClicked()
-{
- // Put your "OnButtonClicked" stuff here
- FText DialogText = FText::Format(
- LOCTEXT("PluginButtonDialogText", "Add code to {0} in {1} to override this button's actions"),
- FText::FromString(TEXT("FUHLEditorModule::PluginButtonClicked()")),
- FText::FromString(TEXT("UHLEditor.cpp"))
- );
- FMessageDialog::Open(EAppMsgType::Ok, DialogText);
-}
-
-void FUHLEditorModule::RegisterMenus()
-{
- // Owner will be used for cleanup in call to UToolMenus::UnregisterOwner
- FToolMenuOwnerScoped OwnerScoped(this);
-
- {
- UToolMenu* Menu = UToolMenus::Get()->ExtendMenu("LevelEditor.MainMenu.Window");
- {
- FToolMenuSection& Section = Menu->FindOrAddSection("WindowLayout");
- Section.AddMenuEntryWithCommandList(FUHLEditorCommands::Get().PluginAction, PluginCommands);
- }
- }
-
- {
- UToolMenu* ToolbarMenu = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar");
- {
- FToolMenuSection& Section = ToolbarMenu->FindOrAddSection("PluginTools");
- {
- FToolMenuEntry& Entry = Section.AddEntry(FToolMenuEntry::InitToolBarButton(FUHLEditorCommands::Get().PluginAction));
- Entry.SetCommandList(PluginCommands);
- }
- }
- }
-}
-
-#undef LOCTEXT_NAMESPACE
-
-IMPLEMENT_MODULE(FUHLEditorModule, UHLEditor)
diff --git a/Source/UHLEditor/Private/UHLEditorBlueprintThumbnailRenderer.cpp b/Source/UHLEditor/Private/UHLEditorBlueprintThumbnailRenderer.cpp
deleted file mode 100644
index d75dbfc5..00000000
--- a/Source/UHLEditor/Private/UHLEditorBlueprintThumbnailRenderer.cpp
+++ /dev/null
@@ -1,110 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLEditorBlueprintThumbnailRenderer.h"
-
-#include "CanvasItem.h"
-#include "CanvasTypes.h"
-#include "UHLEditorCustomThumbnail.h"
-#include "ThumbnailRendering/ThumbnailManager.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLEditorBlueprintThumbnailRenderer)
-
-void UUHLEditorBlueprintThumbnailRenderer::GetThumbnailSize(UObject* Object, float Zoom, uint32& OutWidth, uint32& OutHeight) const
-{
- UBlueprint* Blueprint = Cast(Object);
-
- if (Blueprint)
- {
- if (UTexture2D* Texture = GetTextureFromGeneratedClass(Blueprint->GeneratedClass))
- {
- OutWidth = FMath::TruncToInt(Zoom * (float)Texture->GetSurfaceWidth());
- OutHeight = FMath::TruncToInt(Zoom * (float)Texture->GetSurfaceHeight());
- }
- }
- Super::GetThumbnailSize(Object, Zoom, OutWidth, OutHeight);
-}
-
-void UUHLEditorBlueprintThumbnailRenderer::Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget* RenderTarget, FCanvas* Canvas, bool bAdditionalViewFamily)
-{
- UBlueprint* Blueprint = Cast(Object);
- if (Blueprint)
- {
- if (UTexture2D* Texture2D = GetTextureFromGeneratedClass(Blueprint->GeneratedClass))
- {
- const bool bUseTranslucentBlend = Texture2D && Texture2D->HasAlphaChannel() && ((Texture2D->LODGroup == TEXTUREGROUP_UI) || (Texture2D->LODGroup == TEXTUREGROUP_Pixels2D));
- TRefCountPtr BatchedElementParameters;
- if (bUseTranslucentBlend)
- {
- // If using alpha, draw a checkerboard underneath first.
- const int32 CheckerDensity = 8;
- TObjectPtr Checker = UThumbnailManager::Get().CheckerboardTexture;
- Canvas->DrawTile(
- 0.0f, 0.0f, Width, Height, // Dimensions
- 0.0f, 0.0f, CheckerDensity, CheckerDensity, // UVs
- FLinearColor::White, Checker->GetResource()); // Tint & Texture
- }
- // Use A canvas tile item to draw
- FCanvasTileItem CanvasTile(FVector2D(X, Y), Texture2D->GetResource(), FVector2D(Width, Height), FLinearColor::White);
- CanvasTile.BlendMode = bUseTranslucentBlend ? SE_BLEND_Translucent : SE_BLEND_Opaque;
- CanvasTile.BatchedElementParameters = BatchedElementParameters;
- CanvasTile.Draw(Canvas);
- if (Texture2D && Texture2D->IsCurrentlyVirtualTextured())
- {
- auto VTChars = TEXT("VT");
- int32 VTWidth = 0;
- int32 VTHeight = 0;
- StringSize(GEngine->GetLargeFont(), VTWidth, VTHeight, VTChars);
- float PaddingX = Width / 128.0f;
- float PaddingY = Height / 128.0f;
- float ScaleX = Width / 64.0f; //Text is 1/64'th of the size of the thumbnails
- float ScaleY = Height / 64.0f;
- // VT overlay
- FCanvasTextItem TextItem(FVector2D(Width - PaddingX - VTWidth * ScaleX, Height - PaddingY - VTHeight * ScaleY), FText::FromString(VTChars), GEngine->GetLargeFont(),
- FLinearColor::White);
- TextItem.EnableShadow(FLinearColor::Black);
- TextItem.Scale = FVector2D(ScaleX, ScaleY);
- TextItem.Draw(Canvas);
- }
- return;
- }
- }
- Super::Draw(Object, X, Y, Width, Height, RenderTarget, Canvas, bAdditionalViewFamily);
-}
-
-bool UUHLEditorBlueprintThumbnailRenderer::CanVisualizeAsset(UObject* Object)
-{
- UBlueprint* Blueprint = Cast(Object);
-
- if (Blueprint && GetTextureFromGeneratedClass(Blueprint->GeneratedClass) != nullptr)
- {
- return true;
- }
- return Super::CanVisualizeAsset(Object);
-}
-
-UTexture2D* UUHLEditorBlueprintThumbnailRenderer::GetTextureFromGeneratedClass(UClass* Class) const
-{
- if (Class)
- {
- if (Class->ImplementsInterface(UUHLEditorCustomThumbnail::StaticClass()))
- {
- if (UObject* CDO = Class->GetDefaultObject())
- {
- IUHLEditorCustomThumbnail* CustomThumbnailInterface = Cast(CDO);
- if (CustomThumbnailInterface)
- {
- return CustomThumbnailInterface->Execute_GetCustomThumbnailIcon(CDO);
- }
- }
- }
- // else if (Class->IsChildOf(UBuff::StaticClass()))
- // {
- // if (UBuff* CDO = Class->GetDefaultObject())
- // {
- // return CDO->GetIcon();
- // }
- // }
- }
- return nullptr;
-}
diff --git a/Source/UHLEditor/Private/UHLEditorCommands.cpp b/Source/UHLEditor/Private/UHLEditorCommands.cpp
deleted file mode 100644
index d21cb5d1..00000000
--- a/Source/UHLEditor/Private/UHLEditorCommands.cpp
+++ /dev/null
@@ -1,12 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLEditorCommands.h"
-
-#define LOCTEXT_NAMESPACE "FUHLEditorModule"
-
-void FUHLEditorCommands::RegisterCommands()
-{
- UI_COMMAND(PluginAction, "UHLEditorCommands", "Execute UHLEditorCommands action", EUserInterfaceActionType::Button, FInputChord());
-}
-
-#undef LOCTEXT_NAMESPACE
diff --git a/Source/UHLEditor/Private/UHLEditorCustomThumbnail.cpp b/Source/UHLEditor/Private/UHLEditorCustomThumbnail.cpp
deleted file mode 100644
index 03be988b..00000000
--- a/Source/UHLEditor/Private/UHLEditorCustomThumbnail.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UHLEditorCustomThumbnail.h"
-
-// Add default functionality here for any IUHLEditorCustomThumbnail functions that are not pure virtual.
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLEditorCustomThumbnail)
-
-UTexture2D* IUHLEditorCustomThumbnail::GetCustomThumbnailIcon_Implementation() const
-{
- return nullptr;
-}
\ No newline at end of file
diff --git a/Source/UHLEditor/Private/UHLEditorStyle.cpp b/Source/UHLEditor/Private/UHLEditorStyle.cpp
deleted file mode 100644
index d892fdad..00000000
--- a/Source/UHLEditor/Private/UHLEditorStyle.cpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLEditorStyle.h"
-#include "UHLEditor.h"
-#include "AssetRegistry/AssetRegistryModule.h"
-#include "Development/UHLEditorSettings.h"
-#include "Framework/Application/SlateApplication.h"
-#include "Styling/SlateStyleRegistry.h"
-#include "Slate/SlateGameResources.h"
-#include "Interfaces/IPluginManager.h"
-#include "Styling/SlateStyleMacros.h"
-
-#define RootToContentDir Style->RootToContentDir
-
-TSharedPtr FUHLEditorStyle::StyleInstance = nullptr;
-
-void FUHLEditorStyle::Initialize()
-{
- if (!StyleInstance.IsValid())
- {
- StyleInstance = Create();
- FSlateStyleRegistry::RegisterSlateStyle(*StyleInstance);
- }
-}
-
-void FUHLEditorStyle::Shutdown()
-{
- FSlateStyleRegistry::UnRegisterSlateStyle(*StyleInstance);
- ensure(StyleInstance.IsUnique());
- StyleInstance.Reset();
-}
-
-FName FUHLEditorStyle::GetStyleSetName()
-{
- static FName StyleSetName(TEXT("UHLEditorStyle"));
- return StyleSetName;
-}
-
-
-const FVector2D Icon16x16(16.0f, 16.0f);
-const FVector2D Icon20x20(20.0f, 20.0f);
-
-TSharedRef< FSlateStyleSet > FUHLEditorStyle::Create()
-{
- TSharedRef< FSlateStyleSet > Style = MakeShareable(new FSlateStyleSet("UHLEditorStyle"));
- Style->SetContentRoot(IPluginManager::Get().FindPlugin("UnrealHelperLibrary")->GetBaseDir() / TEXT("Resources"));
- // Style->SetContentRoot(FPaths::ProjectContentDir());
-
- const UUHLEditorSettings* DeveloperSettings = GetDefault();
- for (FUHLEditorCustomClassIconDescription CustomClassIcon : DeveloperSettings->CustomClassIcons)
- {
- // FAssetRegistryModule& AssetRegistryModule = FModuleManager::LoadModuleChecked("AssetRegistry");
- FString Path = CustomClassIcon.Texture2D.GetLongPackageName();
- UObject* IconImageObject = LoadObject(nullptr, *Path);
-
- if (IsValid(IconImageObject))
- {
- UTexture2D* IconImage = Cast(IconImageObject);
- // FSlateDynamicImageBrush* DynamicImageBrush = new FSlateDynamicImageBrush(IconImage, Icon20x20, FName("CapsuleHitRegistrator"));
- FSlateImageBrush* ImageBrush = new FSlateImageBrush(IconImage, Icon20x20);
-
- TArray> AllClasses = CustomClassIcon.Classes;
- // support deprecated value
- if (IsValid(CustomClassIcon.Class))
- {
- AllClasses.Add(CustomClassIcon.Class);
- }
- for (const TSubclassOf Class : AllClasses)
- {
- if (!Class) continue;
- FString ClassName = Class->GetName();
- // Modify the class icons to use our new awesome icons
- FString IconStyleName = FString::Printf(TEXT("ClassIcon.%s"), *ClassName);
- Style->Set(FName(IconStyleName), ImageBrush);
- }
- }
- }
-
- Style->Set("UHLEditor.PluginAction", new IMAGE_BRUSH_SVG(TEXT("PlaceholderButtonIcon"), Icon20x20));
- return Style;
-}
-
-void FUHLEditorStyle::ReloadTextures()
-{
- if (FSlateApplication::IsInitialized())
- {
- FSlateApplication::Get().GetRenderer()->ReloadTextureResources();
- }
-}
-
-const ISlateStyle& FUHLEditorStyle::Get()
-{
- return *StyleInstance;
-}
diff --git a/Source/UHLEditor/Private/UI/EditorUtility/EUW_UHL_Utils.cpp b/Source/UHLEditor/Private/UI/EditorUtility/EUW_UHL_Utils.cpp
deleted file mode 100644
index cf472ff6..00000000
--- a/Source/UHLEditor/Private/UI/EditorUtility/EUW_UHL_Utils.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "UI/EditorUtility/EUW_UHL_Utils.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(EUW_UHL_Utils)
\ No newline at end of file
diff --git a/Source/UHLEditor/Public/Development/UHLEditorSettings.h b/Source/UHLEditor/Public/Development/UHLEditorSettings.h
deleted file mode 100644
index bef8665c..00000000
--- a/Source/UHLEditor/Public/Development/UHLEditorSettings.h
+++ /dev/null
@@ -1,35 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UHLEditorSettings.generated.h"
-
-USTRUCT(BlueprintType)
-struct FUHLEditorCustomClassIconDescription
-{
- GENERATED_BODY()
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription")
- TSoftObjectPtr Texture2D;
-
- // deprecated, TODO: remove
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription", meta=(DeprecatedProperty, DeprecationMessage="Deprecated use Classes"))
- TSubclassOf Class;
-
- UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription")
- TArray> Classes;
-};
-
-/**
- *
- */
-UCLASS(Config="Editor", DefaultConfig, meta = (DisplayName="UHL Editor"))
-class UHLEDITOR_API UUHLEditorSettings : public UDeveloperSettings
-{
- GENERATED_BODY()
-
-public:
- UPROPERTY(config, EditAnywhere, Category="Custom Class Icons", meta=(FullyExpand))
- TArray CustomClassIcons;
-};
diff --git a/Source/UHLEditor/Public/UHLEditor.h b/Source/UHLEditor/Public/UHLEditor.h
deleted file mode 100644
index fe63c6f0..00000000
--- a/Source/UHLEditor/Public/UHLEditor.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Modules/ModuleManager.h"
-
-class FToolBarBuilder;
-class FMenuBuilder;
-
-class FUHLEditorModule : public IModuleInterface
-{
-public:
-
- /** IModuleInterface implementation */
- virtual void StartupModule() override;
- virtual void ShutdownModule() override;
-
- /** This function will be bound to Command. */
- void PluginButtonClicked();
-
-private:
-
- void RegisterMenus();
-
-
-private:
- TSharedPtr PluginCommands;
-};
diff --git a/Source/UHLEditor/Public/UHLEditorBlueprintThumbnailRenderer.h b/Source/UHLEditor/Public/UHLEditorBlueprintThumbnailRenderer.h
deleted file mode 100644
index 04182941..00000000
--- a/Source/UHLEditor/Public/UHLEditorBlueprintThumbnailRenderer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "ThumbnailRendering/BlueprintThumbnailRenderer.h"
-#include "UHLEditorBlueprintThumbnailRenderer.generated.h"
-
-/**
- *
- */
-UCLASS()
-class UHLEDITOR_API UUHLEditorBlueprintThumbnailRenderer : public UBlueprintThumbnailRenderer
-{
- GENERATED_BODY()
-protected:
-
- UUHLEditorBlueprintThumbnailRenderer(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
- {}
-
- // UThumbnailRenderer implementation
- virtual void GetThumbnailSize(UObject* Object, float Zoom, uint32& OutWidth, uint32& OutHeight) const override;
- virtual void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget*, FCanvas* Canvas, bool bAdditionalViewFamily) override;
- virtual bool CanVisualizeAsset(UObject* Object) override;
-protected:
-
- UTexture2D* GetTextureFromGeneratedClass(UClass* Class) const;
-};
diff --git a/Source/UHLEditor/Public/UHLEditorCommands.h b/Source/UHLEditor/Public/UHLEditorCommands.h
deleted file mode 100644
index e5edb779..00000000
--- a/Source/UHLEditor/Public/UHLEditorCommands.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Framework/Commands/Commands.h"
-#include "UHLEditorStyle.h"
-
-class FUHLEditorCommands : public TCommands
-{
-public:
-
- FUHLEditorCommands()
- : TCommands(TEXT("UHLEditor"), NSLOCTEXT("Contexts", "UHLEditor", "UHLEditor Plugin"), NAME_None, FUHLEditorStyle::GetStyleSetName())
- {
- }
-
- // TCommands<> interface
- virtual void RegisterCommands() override;
-
-public:
- TSharedPtr< FUICommandInfo > PluginAction;
-};
diff --git a/Source/UHLEditor/Public/UHLEditorCustomThumbnail.h b/Source/UHLEditor/Public/UHLEditorCustomThumbnail.h
deleted file mode 100644
index 05fe2b89..00000000
--- a/Source/UHLEditor/Public/UHLEditorCustomThumbnail.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "UObject/Interface.h"
-#include "UHLEditorCustomThumbnail.generated.h"
-
-// This class does not need to be modified.
-UINTERFACE(MinimalAPI, meta = (Blueprintable))
-class UUHLEditorCustomThumbnail : public UInterface
-{
- GENERATED_BODY()
-};
-
-/**
- *
- */
-class UHLEDITOR_API IUHLEditorCustomThumbnail
-{
- GENERATED_BODY()
-
- // Add interface functions to this class. This is the class that will be inherited to implement this interface.
-public:
-
-/** IUHLEditorCustomThumbnail **/
- UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category="Custom Thumbnail")
- UTexture2D* GetCustomThumbnailIcon() const;
- virtual UTexture2D* GetCustomThumbnailIcon_Implementation() const;
-/** ~IUHLEditorCustomThumbnail **/
-};
diff --git a/Source/UHLEditor/Public/UHLEditorStyle.h b/Source/UHLEditor/Public/UHLEditorStyle.h
deleted file mode 100644
index 78c3096e..00000000
--- a/Source/UHLEditor/Public/UHLEditorStyle.h
+++ /dev/null
@@ -1,31 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "Styling/SlateStyle.h"
-
-class FUHLEditorStyle
-{
-public:
-
- static void Initialize();
-
- static void Shutdown();
-
- /** reloads textures used by slate renderer */
- static void ReloadTextures();
-
- /** @return The Slate style set for the Shooter game */
- static const ISlateStyle& Get();
-
- static FName GetStyleSetName();
-
-private:
-
- static TSharedRef< class FSlateStyleSet > Create();
-
-private:
-
- static TSharedPtr< class FSlateStyleSet > StyleInstance;
-};
\ No newline at end of file
diff --git a/Source/UHLEditor/Public/UI/EditorUtility/EUW_UHL_Utils.h b/Source/UHLEditor/Public/UI/EditorUtility/EUW_UHL_Utils.h
deleted file mode 100644
index 6d3ed0ce..00000000
--- a/Source/UHLEditor/Public/UI/EditorUtility/EUW_UHL_Utils.h
+++ /dev/null
@@ -1,17 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "CoreMinimal.h"
-#include "EditorUtilityWidget.h"
-#include "EUW_UHL_Utils.generated.h"
-
-/**
- *
- */
-UCLASS(Blueprintable)
-class UHLEDITOR_API UEUW_UHL_Utils : public UEditorUtilityWidget
-{
- GENERATED_BODY()
-
-};
diff --git a/Source/UHLEditor/UHLEditor.Build.cs b/Source/UHLEditor/UHLEditor.Build.cs
deleted file mode 100644
index f9a476ae..00000000
--- a/Source/UHLEditor/UHLEditor.Build.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-using UnrealBuildTool;
-
-public class UHLEditor : ModuleRules
-{
- public UHLEditor(ReadOnlyTargetRules Target) : base(Target)
- {
- PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
-
- PublicIncludePaths.AddRange(
- new string[] {
- // ... add public include paths required here ...
- }
- );
-
-
- PrivateIncludePaths.AddRange(
- new string[] {
- // ... add other private include paths required here ...
- }
- );
-
-
- PublicDependencyModuleNames.AddRange(
- new string[]
- {
- "Core",
- "CoreUObject",
- "Engine",
- "PropertyEditor",
- "Blutility",
- "UMG",
- "BehaviorTreeEditor",
- // ... add other public dependencies that you statically link with here ...
- }
- );
-
-
- PrivateDependencyModuleNames.AddRange(
- new string[]
- {
- "Projects",
- "InputCore",
- "EditorFramework",
- "UnrealEd",
- "ToolMenus",
- "Slate",
- "SlateCore",
- "UnrealEd",
- "DeveloperSettings",
-
- "UnrealHelperLibrary",
- "UHLModulesHelper",
-
- "EditorWidgets",
-
- "GameplayTags",
- "GameplayTagsEditor",
- // ... add private dependencies that you statically link with here ...
- }
- );
-
-
- DynamicallyLoadedModuleNames.AddRange(
- new string[]
- {
- // ... add any modules that your module loads dynamically here ...
- }
- );
- }
-}
diff --git a/Source/UHLGAS/Private/Abilities/UHLGameplayAbility.cpp b/Source/UHLGAS/Private/Abilities/UHLGameplayAbility.cpp
deleted file mode 100644
index d7d58c71..00000000
--- a/Source/UHLGAS/Private/Abilities/UHLGameplayAbility.cpp
+++ /dev/null
@@ -1,276 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Abilities/UHLGameplayAbility.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemGlobals.h"
-#include "UHLAbilitySystemComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLGameplayAbility)
-
-UUHLGameplayAbility::UUHLGameplayAbility(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- ReplicationPolicy = EGameplayAbilityReplicationPolicy::ReplicateNo;
- InstancingPolicy = EGameplayAbilityInstancingPolicy::InstancedPerActor;
- NetExecutionPolicy = EGameplayAbilityNetExecutionPolicy::LocalPredicted;
- NetSecurityPolicy = EGameplayAbilityNetSecurityPolicy::ClientOrServer;
-}
-
-UUHLAbilitySystemComponent* UUHLGameplayAbility::GetUHLAbilitySystemComponentFromActorInfo() const
-{
- if (!ensure(CurrentActorInfo))
- {
- return nullptr;
- }
- checkf(CastChecked(CurrentActorInfo->AbilitySystemComponent.Get()), TEXT("UUHLGameplayAbility::GetUHLAbilitySystemComponentFromActorInfo can be used only on characters with UHLAbilitySystemComponent"));
- return StaticCast(CurrentActorInfo->AbilitySystemComponent.Get());
-}
-
-bool UUHLGameplayAbility::K2_CommitAbilityDuration(bool BroadcastCommitEvent)
-{
- ensure(CurrentActorInfo);
- if (BroadcastCommitEvent)
- {
- if (UAbilitySystemComponent* AbilitySystemComponent =
- GetAbilitySystemComponentFromActorInfo_Ensured())
- {
- AbilitySystemComponent->NotifyAbilityCommit(this);
- }
- }
- return CommitAbilityDuration(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo);
-}
-
-void UUHLGameplayAbility::TryActivateAbilityOnSpawn(const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilitySpec& Spec) const
-{
- // Try to activate if activation policy is on spawn.
- if (ActorInfo && !Spec.IsActive() && (ActivationPolicy == EUHLAbilityActivationPolicy::OnSpawn))
- {
- UAbilitySystemComponent* ASC = ActorInfo->AbilitySystemComponent.Get();
- const AActor* AvatarActor = ActorInfo->AvatarActor.Get();
-
- // If avatar actor is torn off or about to die, don't try to activate until we get the new one.
- if (ASC && AvatarActor && !AvatarActor->GetTearOff() && (AvatarActor->GetLifeSpan() <= 0.0f))
- {
- const bool bIsLocalExecution = (NetExecutionPolicy == EGameplayAbilityNetExecutionPolicy::LocalPredicted) || (NetExecutionPolicy == EGameplayAbilityNetExecutionPolicy::LocalOnly);
- const bool bIsServerExecution = (NetExecutionPolicy == EGameplayAbilityNetExecutionPolicy::ServerOnly) || (NetExecutionPolicy == EGameplayAbilityNetExecutionPolicy::ServerInitiated);
-
- const bool bClientShouldActivate = ActorInfo->IsLocallyControlled() && bIsLocalExecution;
- const bool bServerShouldActivate = ActorInfo->IsNetAuthority() && bIsServerExecution;
-
- if (bClientShouldActivate || bServerShouldActivate)
- {
- ASC->TryActivateAbility(Spec.Handle);
- }
- }
- }
-}
-
-void UUHLGameplayAbility::CommitExecute(
- const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
- const FGameplayAbilityActivationInfo ActivationInfo)
-{
- Super::CommitExecute(Handle, ActorInfo, ActivationInfo);
- CommitAbilityDuration(Handle, ActorInfo, ActivationInfo);
-}
-
-bool UUHLGameplayAbility::CommitAbilityDuration(
- const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
- const FGameplayAbilityActivationInfo ActivationInfo,
- FGameplayTagContainer* OptionalRelevantTags)
-{
- if (!CheckAbilityDuration(Handle, ActorInfo, OptionalRelevantTags))
- {
- return false;
- }
- ApplyDuration(Handle, ActorInfo, ActivationInfo);
- return true;
-}
-
-void UUHLGameplayAbility::ApplyDuration(
- const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
- const FGameplayAbilityActivationInfo ActivationInfo)
-{
- UGameplayEffect* AbilityDurationGE = GetAbilityDurationGameplayEffect();
- UAbilitySystemComponent* ASC = GetAbilitySystemComponentFromActorInfo();
- if (AbilityDurationGE && ASC)
- {
- FActiveGameplayEffectHandle EffectHandle = ApplyGameplayEffectToOwner(
- Handle,
- ActorInfo,
- ActivationInfo,
- AbilityDurationGE,
- GetAbilityLevel(Handle, ActorInfo));
-
- ASC->OnGameplayEffectRemoved_InfoDelegate(EffectHandle)->AddUObject(
- this,
- &UUHLGameplayAbility::OnDurationEnd);
- }
-}
-
-bool UUHLGameplayAbility::CheckAbilityDuration(
- const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
- OUT FGameplayTagContainer* OptionalRelevantTags) const
-{
- if (!ensure(ActorInfo))
- {
- return true;
- }
-
- const FGameplayTagContainer* AbilityDurationTag = GetAbilityDurationTags();
- if (AbilityDurationTag && !AbilityDurationTag->IsEmpty())
- {
- if (UAbilitySystemComponent* AbilitySystemComponent = ActorInfo->AbilitySystemComponent.
- Get())
- {
- if (AbilitySystemComponent->HasAnyMatchingGameplayTags(*AbilityDurationTag))
- {
- if (OptionalRelevantTags)
- {
- // const FGameplayTag& FailAbilityDurationTag = UAbilitySystemGlobals::Get().
- // ActivateFailCooldownTag;
- // if (FailAbilityDurationTag.IsValid())
- // {
- // OptionalRelevantTags->AddTag(FailAbilityDurationTag);
- // }
-
- // Let the caller know which tags were blocking
- OptionalRelevantTags->AppendMatchingTags(
- AbilitySystemComponent->GetOwnedGameplayTags(),
- *AbilityDurationTag);
- }
-
- return false;
- }
- }
- }
- return true;
-}
-
-void UUHLGameplayAbility::OnDurationEnd_Implementation(
- const FGameplayEffectRemovalInfo& GameplayEffectRemovalInfo)
-{
- if (bEndAbilityOnDurationExpired)
- {
- K2_EndAbility();
- }
-}
-
-const FGameplayTagContainer* UUHLGameplayAbility::GetAbilityDurationTags() const
-{
- UGameplayEffect* CDGE = GetAbilityDurationGameplayEffect();
- return CDGE ? &CDGE->GetGrantedTags() : nullptr;
-}
-
-UGameplayEffect* UUHLGameplayAbility::GetAbilityDurationGameplayEffect() const
-{
- if (AbilityDurationGameplayEffectClass)
- {
- return AbilityDurationGameplayEffectClass->GetDefaultObject();
- }
- return nullptr;
-}
-
-bool UUHLGameplayAbility::CommitCheck(
- const FGameplayAbilitySpecHandle Handle, const FGameplayAbilityActorInfo* ActorInfo,
- const FGameplayAbilityActivationInfo ActivationInfo,
- FGameplayTagContainer* OptionalRelevantTags)
-{
- if (!CheckAbilityDuration(Handle, ActorInfo, OptionalRelevantTags))
- {
- return false;
- }
- return Super::CommitCheck(Handle, ActorInfo, ActivationInfo, OptionalRelevantTags);
-}
-
-void UUHLGameplayAbility::CancelAbility(
- const FGameplayAbilitySpecHandle Handle,
- const FGameplayAbilityActorInfo* ActorInfo,
- const FGameplayAbilityActivationInfo ActivationInfo,
- bool bReplicateCancelAbility)
-{
- if (!bCancelManually)
- {
- Super::CancelAbility(Handle, ActorInfo, ActivationInfo, bReplicateCancelAbility);
- return;
- }
-
- // Intercept and mark cancel requested
- bCancelRequested = true;
-
- // Blueprint hook for custom cancel handling
- ReceiveCancelRequested();
-
-#if WITH_EDITOR
- // Schedule an editor-only reminder if ReleaseCancellation() isn't called within 60 seconds
- if (UWorld* World = GetWorld())
- {
- World->GetTimerManager().SetTimer(
- EditorWarningHandle,
- this,
- &ThisClass::CheckCancelReminder,
- 60.0f,
- false
- );
- }
-#endif
-}
-
-#if WITH_EDITOR
-void UUHLGameplayAbility::CheckCancelReminder()
-{
- if (bCancelRequested && IsActive())
- {
- if (GEngine)
- {
- GEngine->AddOnScreenDebugMessage(
- -1,
- 5.0f,
- FColor::Yellow,
- TEXT("Warning: ReleaseCancellation() was not called for this ability within 60 seconds.")
- );
- }
- }
-}
-#endif
-
-void UUHLGameplayAbility::ReleaseCancellation()
-{
- if (bCancelManually && bCancelRequested && IsActive())
- {
-#if WITH_EDITOR
- // Clear any pending editor warning
- if (UWorld* World = GetWorld())
- {
- World->GetTimerManager().ClearTimer(EditorWarningHandle);
- }
-#endif
- // Perform actual cancel
- Super::CancelAbility(CurrentSpecHandle, CurrentActorInfo, CurrentActivationInfo, true);
- bCancelRequested = false;
-
- // Blueprint hook after cancel completed
- ReceiveCancelCompleted();
- }
-}
-
-void UUHLGameplayAbility::OnGiveAbility(const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilitySpec& Spec)
-{
- Super::OnGiveAbility(ActorInfo, Spec);
-
- K2_OnAbilityAdded();
-
- TryActivateAbilityOnSpawn(ActorInfo, Spec);
-}
-
-void UUHLGameplayAbility::OnRemoveAbility(const FGameplayAbilityActorInfo* ActorInfo, const FGameplayAbilitySpec& Spec)
-{
- K2_OnAbilityRemoved();
- Super::OnRemoveAbility(ActorInfo, Spec);
-}
-
-void UUHLGameplayAbility::OnPawnAvatarSet()
-{
- K2_OnPawnAvatarSet();
-}
diff --git a/Source/UHLGAS/Private/Animations/Notifies/ANS_ActivateAbility.cpp b/Source/UHLGAS/Private/Animations/Notifies/ANS_ActivateAbility.cpp
deleted file mode 100644
index 555e35a7..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/ANS_ActivateAbility.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/ANS_ActivateAbility.h"
-
-#include "Engine/World.h"
-#include "Animation/AnimMontage.h"
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemInterface.h"
-#include "Components/SkeletalMeshComponent.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_ActivateAbility)
-
-FString UANS_ActivateAbility::GetNotifyName_Implementation() const
-{
- return FString("ActivateAbility ") + GameplayAbilityTag.ToString();
-}
-
-void UANS_ActivateAbility::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
-
- if (!GameplayAbilityTag.IsValid())
- {
- UUnrealHelperLibraryBPL::DebugPrintString(MeshComp->GetWorld(), FString::Printf(TEXT("%s GameplayAbilityTag not set"), *this->GetName()));
- return;
- }
-
- ActorWithASC = Cast(MeshComp->GetOwner());
- if (ActorWithASC.IsValid())
- {
- ActorWithASC->GetAbilitySystemComponent()->TryActivateAbilitiesByTag(FGameplayTagContainer(GameplayAbilityTag), bAllowRemoteActivation);
- }
-}
-
-void UANS_ActivateAbility::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyEnd(MeshComp, Animation, EventReference);
-
- if (!GameplayAbilityTag.IsValid())
- {
- UUnrealHelperLibraryBPL::DebugPrintString(MeshComp->GetWorld(), FString::Printf(TEXT("%s GameplayAbilityTag not set"), *this->GetName()));
- return;
- }
-
- CancelAbility();
-}
-
-void UANS_ActivateAbility::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted)
-{
- if (!bDeactivateOnMontageBlendingOut || !Montage)
- {
- return;
- }
-
- if (ActorWithASC.IsValid())
- {
- CancelAbility();
- }
-}
-
-void UANS_ActivateAbility::CancelAbility()
-{
- if (ActorWithASC.IsValid())
- {
- const FGameplayTagContainer Tags = FGameplayTagContainer(GameplayAbilityTag);
- ActorWithASC->GetAbilitySystemComponent()->CancelAbilities(&Tags);
- }
-}
diff --git a/Source/UHLGAS/Private/Animations/Notifies/ANS_CatchToAbilityInputCache.cpp b/Source/UHLGAS/Private/Animations/Notifies/ANS_CatchToAbilityInputCache.cpp
deleted file mode 100644
index f25f810b..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/ANS_CatchToAbilityInputCache.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/ANS_CatchToAbilityInputCache.h"
-
-#include "AbilitySystemInterface.h"
-#include "UHLAbilitySystemComponent.h"
-#include "Components/SkeletalMeshComponent.h"
-#include "Core/UHLGameplayTags.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_CatchToAbilityInputCache)
-
-void UANS_CatchToAbilityInputCache::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
-
- AActor* Actor = MeshComp->GetOwner();
- if (!IsValid(Actor)) return;
-
- checkf(Actor->Implements(), TEXT("ANS_CatchToAbilityInputCache can be used only on characters nested from UHL AbilitySystem"));
-
- IAbilitySystemInterface* AbilitySystemInterface = Cast(Actor);
- if (AbilitySystemInterface == nullptr) return;
-
- ASC = Cast(AbilitySystemInterface->GetAbilitySystemComponent());
- checkf(ASC, TEXT("ANS_CatchToAbilityInputCache can be used only on characters nested from UHL AbilitySystem"));
-
- ASC->AddLooseGameplayTag(UHLGameplayTags::TAG_UHL_AbilityInputCache_Catching);
-}
-
-void UANS_CatchToAbilityInputCache::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyEnd(MeshComp, Animation, EventReference);
-
- if (!IsValid(ASC)) return;
-
- ASC->RemoveLooseGameplayTagCompletly(UHLGameplayTags::TAG_UHL_AbilityInputCache_Catching);
-}
diff --git a/Source/UHLGAS/Private/Animations/Notifies/ANS_CheckAbilityInputCache.cpp b/Source/UHLGAS/Private/Animations/Notifies/ANS_CheckAbilityInputCache.cpp
deleted file mode 100644
index cbfd4422..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/ANS_CheckAbilityInputCache.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/ANS_CheckAbilityInputCache.h"
-
-#include "AbilitySystemInterface.h"
-#include "UHLAbilitySystemComponent.h"
-#include "Components/SkeletalMeshComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_CheckAbilityInputCache)
-
-void UANS_CheckAbilityInputCache::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
-
- AActor* Actor = MeshComp->GetOwner();
- if (!IsValid(Actor)) return;
-
- checkf(Actor->Implements(), TEXT("ANS_CheckAbilityInputCache can be used only on characters nested from UHL AbilitySystem"));
-
- IAbilitySystemInterface* AbilitySystemInterface = Cast(Actor);
- if (AbilitySystemInterface == nullptr) return;
-
- ASC = Cast(AbilitySystemInterface->GetAbilitySystemComponent());
- checkf(ASC, TEXT("ANS_CheckAbilityInputCache can be used only on characters nested from UHL AbilitySystem"));
-
- SavedTargetTags = TargetTags;
-}
-
-void UANS_CheckAbilityInputCache::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference);
-
- if (!IsValid(ASC))
- {
- return;
- }
-
- // if (bUseCheckCacheOnlyWithThisTags)
- // {
- // if (SavedTargetTags.IsEmpty())
- // {
- // NotifyEnd(MeshComp, Animation, EventReference);
- // return;
- // }
- //
- // TArray RemovedTags {};
- // for (const FGameplayTag& Tag : SavedTargetTags)
- // {
- // if (!ASC->GetAbilityInputCache()->GetAbilityInputCache().Contains(Tag)) continue;
- // ASC->GetAbilityInputCache()->CheckCache();
- // if (bCacheOnce)
- // {
- // RemovedTags.Add(Tag);
- // }
- // }
- //
- // for (const FGameplayTag& Tag : RemovedTags)
- // {
- // SavedTargetTags.RemoveTag(Tag);
- // }
- // }
- // else
- // {
- ASC->GetAbilityInputCache()->CheckCache();
- // }
-}
-
-void UANS_CheckAbilityInputCache::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyEnd(MeshComp, Animation, EventReference);
-
- if (bClearCacheOnEnd && IsValid(ASC))
- {
- ASC->GetAbilityInputCache()->ClearCache();
- }
-}
diff --git a/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_GlobalTimeDilation.cpp b/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_GlobalTimeDilation.cpp
deleted file mode 100644
index ac06e50d..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_GlobalTimeDilation.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/ANS_UHLGAS_GlobalTimeDilation.h"
-
-#include "Animation/AnimMontage.h"
-#include "Components/SkeletalMeshComponent.h"
-#include "Kismet/GameplayStatics.h"
-
-
-void UANS_UHLGAS_GlobalTimeDilation::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference)
-{
- Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference);
-
- float GlobalTimeDilationCurveValue = 1.0f;
- MeshComp->GetAnimInstance()->GetCurveValueWithDefault("GlobalTimeDilation", 1.0f, GlobalTimeDilationCurveValue);
-
- UGameplayStatics::SetGlobalTimeDilation(MeshComp->GetOwner(), GlobalTimeDilationCurveValue);
-}
-
-void UANS_UHLGAS_GlobalTimeDilation::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted)
-{
- Super::OnMontageBlendingOut(Montage, bInterrupted);
-
- UObject* Outer = Montage->GetOuter();
- UGameplayStatics::SetGlobalTimeDilation(Outer, 1.0f);
-}
-
diff --git a/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_TimedNiagaraEffect.cpp b/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_TimedNiagaraEffect.cpp
deleted file mode 100644
index 2d35d9df..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/ANS_UHLGAS_TimedNiagaraEffect.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/ANS_UHLGAS_TimedNiagaraEffect.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemGlobals.h"
-
-void UANS_UHLGAS_TimedNiagaraEffect::NotifyBegin(
- USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration,
- const FAnimNotifyEventReference& EventReference)
-{
- AActor* Owner = MeshComp->GetOwner();
- if (!Owner) return;
-
- if (CanActivateNiagara(Owner))
- {
- Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference);
- }
-}
-
-bool UANS_UHLGAS_TimedNiagaraEffect::GetAbilitySystemChecksRequired() const
-{
- return ActivationRequiredTags.Num() > 0
- || ActivationBlockedTags.Num() > 0;
-}
-
-bool UANS_UHLGAS_TimedNiagaraEffect::CanActivateNiagara(AActor* Owner) const
-{
- if (bIgnoreTagRequirementsInPreview && Owner->GetWorld()->IsPreviewWorld()) return true;
- if (!GetAbilitySystemChecksRequired()) return true;
-
- UAbilitySystemComponent* ASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(Owner);
- if (!ASC) return false;
-
- const FGameplayTagContainer OwnedTags = ASC->GetOwnedGameplayTags();
- if (OwnedTags.HasAll(ActivationRequiredTags) && !OwnedTags.HasAny(ActivationBlockedTags))
- {
- return true;
- }
-
- return false;
-}
\ No newline at end of file
diff --git a/Source/UHLGAS/Private/Animations/Notifies/AN_FireGameplayEvent.cpp b/Source/UHLGAS/Private/Animations/Notifies/AN_FireGameplayEvent.cpp
deleted file mode 100644
index 7a27db5e..00000000
--- a/Source/UHLGAS/Private/Animations/Notifies/AN_FireGameplayEvent.cpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Animations/Notifies/AN_FireGameplayEvent.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemGlobals.h"
-#include "Components/SkeletalMeshComponent.h"
-#include "Abilities/GameplayAbilityTypes.h"
-
-#if WITH_EDITOR
-void UAN_FireGameplayEvent::PostEditChangeProperty(
- struct FPropertyChangedEvent& PropertyChangedEvent)
-{
- Super::PostEditChangeProperty(PropertyChangedEvent);
-
- if (PropertyChangedEvent.Property != nullptr &&
- PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UAN_FireGameplayEvent, EventTag))
- {
- if (UAnimSequenceBase* AnimSeq = Cast(GetOuter()))
- {
- AnimSeq->Modify();
- }
- }
-}
-#endif
-
-FString UAN_FireGameplayEvent::GetNotifyName_Implementation() const
-{
- return FString("FireGameplayEvent->") + EventTag.ToString();
-}
-
-void UAN_FireGameplayEvent::Notify(
- USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation,
- const FAnimNotifyEventReference& EventReference)
-{
- Super::Notify(MeshComp, Animation, EventReference);
-
- if (!MeshComp) return;
-
- AActor* TargetActor = MeshComp->GetOwner();
- if (!TargetActor) return;
-
- UAbilitySystemComponent* TargetASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(TargetActor);
-
- FGameplayEventData EventData;
- EventData.Target = TargetActor;
- EventData.Instigator = TargetActor;
- EventData.EventMagnitude = EventMagnitude;
- EventData.OptionalObject = OptionalObject;
- EventData.OptionalObject2 = OptionalObject2;
- EventData.TargetTags = TargetTags;
- EventData.InstigatorTags = InstigatorTags;
- TargetASC->HandleGameplayEvent(EventTag, &EventData);
-}
\ No newline at end of file
diff --git a/Source/UHLGAS/Private/AttributeSets/UHLAttributeSet.cpp b/Source/UHLGAS/Private/AttributeSets/UHLAttributeSet.cpp
deleted file mode 100644
index 5f506ef1..00000000
--- a/Source/UHLGAS/Private/AttributeSets/UHLAttributeSet.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "AttributeSets/UHLAttributeSet.h"
-
-#include "UHLAbilitySystemComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAttributeSet)
-
-UUHLAttributeSet::UUHLAttributeSet()
-{
-}
-
-UWorld* UUHLAttributeSet::GetWorld() const
-{
- const UObject* Outer = GetOuter();
- check(Outer);
-
- return Outer->GetWorld();
-}
-
-UUHLAbilitySystemComponent* UUHLAttributeSet::GetUHLAbilitySystemComponent() const
-{
- return Cast(GetOwningAbilitySystemComponent());
-}
diff --git a/Source/UHLGAS/Private/Core/UHLAbilitySystemInterface.cpp b/Source/UHLGAS/Private/Core/UHLAbilitySystemInterface.cpp
deleted file mode 100644
index bebb796c..00000000
--- a/Source/UHLGAS/Private/Core/UHLAbilitySystemInterface.cpp
+++ /dev/null
@@ -1,5 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Core/UHLAbilitySystemInterface.h"
-
diff --git a/Source/UHLGAS/Private/Data/PayloadWithInstancedStructs.cpp b/Source/UHLGAS/Private/Data/PayloadWithInstancedStructs.cpp
deleted file mode 100644
index 3a532afd..00000000
--- a/Source/UHLGAS/Private/Data/PayloadWithInstancedStructs.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#pragma once
-
-#include "Data/PayloadWithInstancedStructs.h"
-
-UPayloadWithInstancedStructs::UPayloadWithInstancedStructs(
- TArray InstancedStructs_In)
-{
- InstancedStructs = InstancedStructs_In;
-}
\ No newline at end of file
diff --git a/Source/UHLGAS/Private/Development/UHLGASSettings.cpp b/Source/UHLGAS/Private/Development/UHLGASSettings.cpp
deleted file mode 100644
index ea5ace8c..00000000
--- a/Source/UHLGAS/Private/Development/UHLGASSettings.cpp
+++ /dev/null
@@ -1,6 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Development/UHLGASSettings.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLGASSettings)
\ No newline at end of file
diff --git a/Source/UHLGAS/Private/Input/AbilityInputCache.cpp b/Source/UHLGAS/Private/Input/AbilityInputCache.cpp
deleted file mode 100644
index 1caf78e9..00000000
--- a/Source/UHLGAS/Private/Input/AbilityInputCache.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "Input/AbilityInputCache.h"
-
-#include "UHLAbilitySystemComponent.h"
-#include "UHLGASBlueprintLibrary.h"
-#include "Abilities/UHLGameplayAbility.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AbilityInputCache)
-
-DEFINE_LOG_CATEGORY(Log_UHL_AbilityInputCache);
-
-void UAbilityInputCache::SetUp(UUHLAbilitySystemComponent* ASC_In)
-{
- if (!ASC_In) return;
-
- ASC = ASC_In;
-}
-
-bool UAbilityInputCache::AddTagToCache(FGameplayTag AbilityTag_In)
-{
- // not required to be unique
- AbilityInputCache.Add(AbilityTag_In);
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("Add ability to InputCache - %s"), *AbilityTag_In.ToString());
- return true;
-}
-
-bool UAbilityInputCache::AddTagsToCache(TArray AbilityTags_In, bool bReverse)
-{
- if (AbilityTags_In.IsEmpty()) return false;
-
- if (bReverse)
- {
- for (int32 i = AbilityTags_In.Num() - 1; i >= 0; i--)
- {
- AddTagToCache(AbilityTags_In[i]);
- }
- }
- else
- {
- for (int32 i = 0; i < AbilityTags_In.Num(); i++)
- {
- AddTagToCache(AbilityTags_In[i]);
- }
- }
-
- return true;
-}
-
-// should cancel all abilities that also cached but not fired
-void UAbilityInputCache::CheckCache()
-{
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("Check AbilityInputCache"));
-
- if (AbilityInputCache.IsEmpty())
- {
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("AbilityInputCache is empty"));
- return;
- };
-
- if (ASC.IsValid())
- {
- bool bActivatedAtLeastOneTag = false;
- for (int32 i = AbilityInputCache.Num() - 1; i >= 0; i--)
- {
- FGameplayTag AbilityTagToActivate = AbilityInputCache[i];
- if (AbilityTagToActivate.IsValid())
- {
- // 1) активировать некст абилку и уповать на то что rollattack не активируется потому что условия не подходят
-
- // 2) [средне хуйевый] сделать добавление в разные типы кэшей, тогда будет кэш Default/Normal/RollCache,
- // - Default - кэш содержащий все действия, если нет приоритезации cache'а, то из Default берется действие
- // - Normal - обычные атаки и действия(кувырок, прыжок)
- // - RollCache - roll атаки и действия(кувырок, прыжок)
- // в check cache
- // говорю приоритезируй RollCache, он берет и достает кувырочную атаку либо сам roll, либо чет еще что в RollCache'е есть
- // т.е. у каждой абилки есть несколько кешей в которые она заносится - Default/Normal/RollCache/JumpCache
- // мб тогда наоборот добавлять действие во все cache'ы, а указывать в абилке только те кэши
- // в которые ее добавлять не надо, ExcludeFromCaches TArray и список кэшей в которые абилку
- // включать не стоит, минусы - контр-интуитивно, плюсы - "типо меньше работы"
-
- // [хуйня варик] 3) prioritize abilities matching tag и тогда в кувырке я смогу сказать приоритезируй
- // атаку кувырочную, а не обычную удобненько, а как эта приоритезация должна работать, вот есть такой стэк
- // - Roll
- // - MeleeAttack.RightHand
- // - MeleeAttack.Roll
- // если говорю приоритезируй атаку MeleeAttack.Roll, то возьмет не Roll, а MeleeAttack.Roll - хуйня варик
-
- // 4) [вроде оч гибкий] CacheInputActivationRequiredTags/CacheInputBlockedTags - запретить если чел не в кувырке добавлять некоторые абилки в cache
- // пример есть Roll атака, если мы не в Roll'е тогда зачем ее добавлять в Cache воообще, нужно не только
- // bCacheInput чекать, но и вот эти теги присутствуют/отсутствуют.
- // Единственная проблема вот я кувырок и ЛКМ почти одновременно нажал че произойдет?
- // успеет ли tag кувырка наложится прежде чем я
-
- // TODO should we get another Ability from cache to activate
- // if failed to activation of last ability failed ??? mb it should be an option
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("InputCache checked found ability to activate - %s!"), *AbilityTagToActivate.ToString());
-
- // FGameplayAbilitySpec AbilitySpec;
- // UUHLGASBlueprintLibrary::FindAbilitySpecByTagUsingASC(ASC.Get(), AbilityTagToActivate, AbilitySpec);
- // if (AbilitySpec.IsActive())
- // {
- // const UUHLGameplayAbility* AbilityCDO = Cast(AbilitySpec.Ability);
- // if (AbilityCDO->bIgnoreActivatedState)
- // {
- // // ASC->CancelAbilityHandle(AbilitySpec.Handle);
- // // bool bCanceledSuccessfully = ASC->TryCancelAbilityWithTag(AbilityTagToActivate);
- // // bCanceledSuccessfully;
- // }
- // }
-
- bool bActivated = ASC->TryActivateAbilityWithTag(AbilityTagToActivate);
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("Activation %s - %s!"), bActivated ? TEXT("successful") : TEXT("failed"), *AbilityTagToActivate.ToString());
-
- if (bActivated)
- {
- bActivatedAtLeastOneTag = true;
- break;
- }
- }
- }
-
- // possibly is shit, ANS_CheckAbilityInputCache clears cache on end (forgot how its related)
- if (bActivatedAtLeastOneTag)
- {
- ClearCache();
- UE_LOG(Log_UHL_AbilityInputCache, Log, TEXT("AbilityInputCache activated at least on tag from cache - clean"));
- }
- }
-}
-
-void UAbilityInputCache::ClearCache()
-{
- AbilityInputCache.Empty();
-}
-
-// void UAbilityInputCache::RemoveTagFromCache(FGameplayTag AbilityTag_In)
-// {
-// AbilityInputCache.Remove(AbilityTag_In);
-// }
diff --git a/Source/UHLGAS/Private/Input/UHLInputComponent.cpp b/Source/UHLGAS/Private/Input/UHLInputComponent.cpp
deleted file mode 100644
index e94de885..00000000
--- a/Source/UHLGAS/Private/Input/UHLInputComponent.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Input/UHLInputComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLInputComponent)
-
-UUHLInputComponent::UUHLInputComponent(const FObjectInitializer& ObjectInitializer)
-{
-}
diff --git a/Source/UHLGAS/Private/Input/UHLInputConfig.cpp b/Source/UHLGAS/Private/Input/UHLInputConfig.cpp
deleted file mode 100644
index 2a71bf76..00000000
--- a/Source/UHLGAS/Private/Input/UHLInputConfig.cpp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "Input/UHLInputConfig.h"
-// #include "LyraLogChannels.h"
-// #include "InputMappingContext.h"
-// #include "Settings/LyraSettingsLocal.h"
-// #include "Player/LyraLocalPlayer.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLInputConfig)
-
-UUHLInputConfig::UUHLInputConfig(const FObjectInitializer& ObjectInitializer) {}
-
-// const UInputAction* UGCInputConfig::FindNativeInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const
-// {
-// for (const FGCInputAction& Action : NativeInputActions)
-// {
-// if (Action.InputAction && (Action.InputTag == InputTag))
-// {
-// return Action.InputAction;
-// }
-// }
-//
-// if (bLogNotFound)
-// {
-// UE_LOG(LogTemp, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
-// }
-//
-// return nullptr;
-// }
-
-// const UInputAction* UGCInputConfig::FindAbilityInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const
-// {
-// for (const FGCInputActionAbilities& Action : AbilityInputActions)
-// {
-// if (Action.InputAction && (Action.AbilityTag == InputTag))
-// {
-// return Action.InputAction;
-// }
-// }
-//
-// if (bLogNotFound)
-// {
-// UE_LOG(LogTemp, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this));
-// }
-//
-// return nullptr;
-// }
diff --git a/Source/UHLGAS/Private/Tasks/AA_TryActivateAbilityAndWait.cpp b/Source/UHLGAS/Private/Tasks/AA_TryActivateAbilityAndWait.cpp
deleted file mode 100644
index 1faa8978..00000000
--- a/Source/UHLGAS/Private/Tasks/AA_TryActivateAbilityAndWait.cpp
+++ /dev/null
@@ -1,139 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/AA_TryActivateAbilityAndWait.h"
-
-#include "AbilitySystemBlueprintLibrary.h"
-#include "AbilitySystemComponent.h"
-#include "UHLGASBlueprintLibrary.h"
-#include "Abilities/GameplayAbility.h"
-#include "Data/PayloadWithInstancedStructs.h"
-#include "Utils/UnrealHelperLibraryBPL.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AA_TryActivateAbilityAndWait)
-
-void UAA_TryActivateAbilityAndWait::OnAbilityActivate(UGameplayAbility* ActivatedAbility)
-{
- if (!IncludeTriggeredAbilities && ActivatedAbility->IsTriggered())
- {
- return;
- }
-
- const FGameplayTagContainer& AbilityTags = ActivatedAbility->GetAssetTags();
- if (WithTag.IsValid() && !AbilityTags.HasTag(WithTag))
- {
- // Failed tag check
- return;
- }
-
- if (ShouldBroadcastDelegates())
- {
- OnActivate.Broadcast(ActivatedAbility);
- }
-
- // if (TriggerOnce)
- // {
- // EndAction();
- // }
-}
-
-void UAA_TryActivateAbilityAndWait::OnAbilityDeactivate(UGameplayAbility* ActivatedAbility)
-{
- const FGameplayTagContainer& AbilityTags = ActivatedAbility->GetAssetTags();
- if (WithTag.IsValid() && !AbilityTags.HasTag(WithTag))
- {
- // Failed tag check
- return;
- }
-
- if (ShouldBroadcastDelegates())
- {
- OnEndAbility.Broadcast(ActivatedAbility);
- }
-
- if (TriggerOnce)
- {
- EndAction();
- }
-}
-
-UAA_TryActivateAbilityAndWait* UAA_TryActivateAbilityAndWait::TryActivateAbilityAndWait(AActor* TargetActor,
- FGameplayTag InWithTag, bool bUsingEvent_In, const TArray& PayloadInfo, bool InIncludeTriggeredAbilities, bool bAllowRemoteActivation, bool InTriggerOnce)
-{
- UAA_TryActivateAbilityAndWait* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->WithTag = InWithTag;
- MyObj->bUsingEvent = bUsingEvent_In;
- MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
- MyObj->TriggerOnce = InTriggerOnce;
- MyObj->bAllowRemoteActivation = bAllowRemoteActivation;
- MyObj->PayloadInfo = PayloadInfo;
- return MyObj;
-}
-
-// UAA_TryActivateAbilityAndWait* UAA_TryActivateAbilityAndWait::WaitForAbilityDeactivateWithTagRequirements(
-// AActor* TargetActor, FGameplayTagRequirements TagRequirements, bool InIncludeTriggeredAbilities,
-// bool InTriggerOnce)
-// {
-// UAA_TryActivateAbilityAndWait* MyObj = NewObject();
-// MyObj->SetAbilityActor(TargetActor);
-// MyObj->TagRequirements = TagRequirements;
-// MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
-// MyObj->TriggerOnce = InTriggerOnce;
-// return MyObj;
-// }
-//
-// UAA_TryActivateAbilityAndWait* UAA_TryActivateAbilityAndWait::WaitForAbilityDeactivate_Query(
-// AActor* TargetActor, FGameplayTagQuery Query, bool InIncludeTriggeredAbilities, bool InTriggerOnce)
-// {
-// UAA_TryActivateAbilityAndWait* MyObj = NewObject();
-// MyObj->SetAbilityActor(TargetActor);
-// MyObj->Query = Query;
-// MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
-// MyObj->TriggerOnce = InTriggerOnce;
-// return MyObj;
-// }
-
-void UAA_TryActivateAbilityAndWait::Activate()
-{
- Super::Activate();
-
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- OnAbilityActivateDelegateHandle = ASC->AbilityActivatedCallbacks.AddUObject(this, &UAA_TryActivateAbilityAndWait::OnAbilityActivate);
- OnAbilityActivateDelegateHandle = ASC->AbilityEndedCallbacks.AddUObject(this, &UAA_TryActivateAbilityAndWait::OnAbilityDeactivate);
-
- bool bActivated = false;
- if (bUsingEvent)
- {
- UPayloadWithInstancedStructs* Payload = NewObject();
- Payload->InstancedStructs = PayloadInfo;
- FGameplayEventData EventData;
- EventData.OptionalObject = Payload;
- int32 ActivatedAbilitiesCount = ASC->HandleGameplayEvent(WithTag, &EventData);
- bActivated = (ActivatedAbilitiesCount > 0);
- }
- else
- {
- bActivated = UUHLGASBlueprintLibrary::TryActivateAbilityWithTag(ASC, WithTag, bAllowRemoteActivation);
- }
- if (!bActivated)
- {
- EndAction();
- }
- }
- else
- {
- EndAction();
- }
-}
-
-void UAA_TryActivateAbilityAndWait::EndAction()
-{
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- ASC->AbilityActivatedCallbacks.Remove(OnAbilityActivateDelegateHandle);
- }
- Super::EndAction();
-}
-
diff --git a/Source/UHLGAS/Private/Tasks/AA_UHLGAS_WaitAbilityActivate.cpp b/Source/UHLGAS/Private/Tasks/AA_UHLGAS_WaitAbilityActivate.cpp
deleted file mode 100644
index 71366fbd..00000000
--- a/Source/UHLGAS/Private/Tasks/AA_UHLGAS_WaitAbilityActivate.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/AA_UHLGAS_WaitAbilityActivate.h"
-#include "AbilitySystemGlobals.h"
-#include "AbilitySystemComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AA_UHLGAS_WaitAbilityActivate)
-
-void UAA_UHLGAS_WaitAbilityActivate::OnAbilityActivate(UGameplayAbility* ActivatedAbility)
-{
- if (!IncludeTriggeredAbilities && ActivatedAbility->IsTriggered())
- {
- return;
- }
-
- const FGameplayTagContainer& AbilityTags = ActivatedAbility->GetAssetTags();
-
- if (TagRequirements.IsEmpty())
- {
- if ((WithTag.IsValid() && !AbilityTags.HasTag(WithTag)) ||
- (WithoutTag.IsValid() && AbilityTags.HasTag(WithoutTag)))
- {
- // Failed tag check
- return;
- }
- }
- else
- {
- if (!TagRequirements.RequirementsMet(AbilityTags))
- {
- // Failed tag check
- return;
- }
- }
-
- if (Query.IsEmpty() == false)
- {
- if (Query.Matches(AbilityTags) == false)
- {
- // Failed query
- return;
- }
- }
-
- if (ShouldBroadcastDelegates())
- {
- OnActivate.Broadcast(ActivatedAbility);
- }
-
- if (TriggerOnce)
- {
- EndAction();
- }
-}
-
-UAA_UHLGAS_WaitAbilityActivate* UAA_UHLGAS_WaitAbilityActivate::WaitForAbilityActivate(AActor* TargetActor,
- FGameplayTag InWithTag, FGameplayTag InWithoutTag, bool InIncludeTriggeredAbilities, bool InTriggerOnce)
-{
- UAA_UHLGAS_WaitAbilityActivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->WithTag = InWithTag;
- MyObj->WithoutTag = InWithoutTag;
- MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-UAA_UHLGAS_WaitAbilityActivate* UAA_UHLGAS_WaitAbilityActivate::WaitForAbilityActivateWithTagRequirements(
- AActor* TargetActor, FGameplayTagRequirements TagRequirements, bool InIncludeTriggeredAbilities,
- bool InTriggerOnce)
-{
- UAA_UHLGAS_WaitAbilityActivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->TagRequirements = TagRequirements;
- MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-UAA_UHLGAS_WaitAbilityActivate* UAA_UHLGAS_WaitAbilityActivate::WaitForAbilityActivate_Query(
- AActor* TargetActor, FGameplayTagQuery Query, bool InIncludeTriggeredAbilities, bool InTriggerOnce)
-{
- UAA_UHLGAS_WaitAbilityActivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->Query = Query;
- MyObj->IncludeTriggeredAbilities = InIncludeTriggeredAbilities;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-void UAA_UHLGAS_WaitAbilityActivate::Activate()
-{
- Super::Activate();
-
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- OnAbilityActivateDelegateHandle = ASC->AbilityActivatedCallbacks.AddUObject(this, &UAA_UHLGAS_WaitAbilityActivate::OnAbilityActivate);
- }
- else
- {
- EndAction();
- }
-}
-
-void UAA_UHLGAS_WaitAbilityActivate::EndAction()
-{
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- ASC->AbilityActivatedCallbacks.Remove(OnAbilityActivateDelegateHandle);
- }
- Super::EndAction();
-}
-
diff --git a/Source/UHLGAS/Private/Tasks/AA_WaitAbilityDeactivate.cpp b/Source/UHLGAS/Private/Tasks/AA_WaitAbilityDeactivate.cpp
deleted file mode 100644
index 1fbb026c..00000000
--- a/Source/UHLGAS/Private/Tasks/AA_WaitAbilityDeactivate.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/AA_WaitAbilityDeactivate.h"
-#include "AbilitySystemGlobals.h"
-#include "AbilitySystemComponent.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AA_WaitAbilityDeactivate)
-
-void UAA_WaitAbilityDeactivate::OnAbilityDeactivate(UGameplayAbility* DeactivatedAbility)
-{
- const FGameplayTagContainer& AbilityTags = DeactivatedAbility->GetAssetTags();
-
- if (TagRequirements.IsEmpty())
- {
- if ((WithTag.IsValid() && !AbilityTags.HasTag(WithTag)) ||
- (WithoutTag.IsValid() && AbilityTags.HasTag(WithoutTag)))
- {
- // Failed tag check
- return;
- }
- }
- else
- {
- if (!TagRequirements.RequirementsMet(AbilityTags))
- {
- // Failed tag check
- return;
- }
- }
-
- if (Query.IsEmpty() == false)
- {
- if (Query.Matches(AbilityTags) == false)
- {
- // Failed query
- return;
- }
- }
-
- if (ShouldBroadcastDelegates())
- {
- OnDeactivate.Broadcast(DeactivatedAbility);
- }
-
- if (TriggerOnce)
- {
- EndAction();
- }
-}
-
-UAA_WaitAbilityDeactivate* UAA_WaitAbilityDeactivate::WaitForAbilityDeactivate(AActor* TargetActor,
- FGameplayTag InWithTag, FGameplayTag InWithoutTag, bool InTriggerOnce)
-{
- UAA_WaitAbilityDeactivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->WithTag = InWithTag;
- MyObj->WithoutTag = InWithoutTag;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-UAA_WaitAbilityDeactivate* UAA_WaitAbilityDeactivate::WaitForAbilityDeactivateWithTagRequirements(
- AActor* TargetActor, FGameplayTagRequirements TagRequirements, bool InTriggerOnce)
-{
- UAA_WaitAbilityDeactivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->TagRequirements = TagRequirements;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-UAA_WaitAbilityDeactivate* UAA_WaitAbilityDeactivate::WaitForAbilityDeactivate_Query(
- AActor* TargetActor, FGameplayTagQuery Query, bool InTriggerOnce)
-{
- UAA_WaitAbilityDeactivate* MyObj = NewObject();
- MyObj->SetAbilityActor(TargetActor);
- MyObj->Query = Query;
- MyObj->TriggerOnce = InTriggerOnce;
- return MyObj;
-}
-
-void UAA_WaitAbilityDeactivate::Activate()
-{
- Super::Activate();
-
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- OnAbilityDeactivateDelegateHandle = ASC->AbilityEndedCallbacks.AddUObject(this, &UAA_WaitAbilityDeactivate::OnAbilityDeactivate);
- }
- else
- {
- EndAction();
- }
-}
-
-void UAA_WaitAbilityDeactivate::EndAction()
-{
- if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
- {
- ASC->AbilityEndedCallbacks.Remove(OnAbilityDeactivateDelegateHandle);
- }
- Super::EndAction();
-}
-
diff --git a/Source/UHLGAS/Private/Tasks/AA_WaitAttributeChangeRatioThreshold.cpp b/Source/UHLGAS/Private/Tasks/AA_WaitAttributeChangeRatioThreshold.cpp
deleted file mode 100644
index a198b207..00000000
--- a/Source/UHLGAS/Private/Tasks/AA_WaitAttributeChangeRatioThreshold.cpp
+++ /dev/null
@@ -1,148 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/AA_WaitAttributeChangeRatioThreshold.h"
-
-#include "AbilitySystemComponent.h"
-#include "AbilitySystemGlobals.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AA_WaitAttributeChangeRatioThreshold)
-
-UAA_WaitAttributeChangeRatioThreshold::UAA_WaitAttributeChangeRatioThreshold(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- bTriggerOnce = false;
- bMatchedComparisonLastAttributeChange = false;
- LastAttributeNumeratorValue = 1.f;
- LastAttributeDenominatorValue = 1.f;
-}
-
-UAA_WaitAttributeChangeRatioThreshold* UAA_WaitAttributeChangeRatioThreshold::WaitForAttributeChangeRatioThreshold(AActor* TargetActor, FGameplayAttribute AttributeNumerator, FGameplayAttribute AttributeDenominator, TEnumAsByte ComparisonType, float ComparisonValue, bool bTriggerOnce, AActor* OptionalExternalOwner)
-{
- UAA_WaitAttributeChangeRatioThreshold* MyTask = NewObject();
- MyTask->SetAbilityActor(TargetActor);
- MyTask->AttributeNumerator = AttributeNumerator;
- MyTask->AttributeDenominator = AttributeDenominator;
- MyTask->ComparisonType = ComparisonType;
- MyTask->ComparisonValue = ComparisonValue;
- MyTask->bTriggerOnce = bTriggerOnce;
- MyTask->ExternalOwner = OptionalExternalOwner ? UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(OptionalExternalOwner) : nullptr;
-
- return MyTask;
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::Activate()
-{
- if (UAbilitySystemComponent* ASC = GetFocusedASC())
- {
- LastAttributeNumeratorValue = ASC->GetNumericAttribute(AttributeNumerator);
- LastAttributeDenominatorValue = ASC->GetNumericAttribute(AttributeDenominator);
- bMatchedComparisonLastAttributeChange = DoesValuePassComparison(LastAttributeNumeratorValue, LastAttributeDenominatorValue);
-
- // Broadcast OnChange immediately with current value
- if (ShouldBroadcastDelegates())
- {
- OnChange.Broadcast(bMatchedComparisonLastAttributeChange, LastAttributeDenominatorValue != 0.f ? LastAttributeNumeratorValue/LastAttributeDenominatorValue : 0.f);
- }
-
- OnNumeratorAttributeChangeDelegateHandle = ASC->GetGameplayAttributeValueChangeDelegate(AttributeNumerator).AddUObject(this, &UAA_WaitAttributeChangeRatioThreshold::OnNumeratorAttributeChange);
- OnDenominatorAttributeChangeDelegateHandle = ASC->GetGameplayAttributeValueChangeDelegate(AttributeDenominator).AddUObject(this, &UAA_WaitAttributeChangeRatioThreshold::OnDenominatorAttributeChange);
- }
- else
- {
- EndAction();
- }
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::EndAction()
-{
- if (UAbilitySystemComponent* ASC = GetFocusedASC())
- {
- ASC->GetGameplayAttributeValueChangeDelegate(AttributeNumerator).Remove(OnNumeratorAttributeChangeDelegateHandle);
- ASC->GetGameplayAttributeValueChangeDelegate(AttributeDenominator).Remove(OnDenominatorAttributeChangeDelegateHandle);
- }
-
- Super::EndAction();
-}
-
-UAbilitySystemComponent* UAA_WaitAttributeChangeRatioThreshold::GetFocusedASC() const
-{
- return ExternalOwner ? ToRawPtr(ExternalOwner) : GetAbilitySystemComponent();
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::OnAttributeChange()
-{
- UWorld* World = GetAbilitySystemComponent()->GetWorld();
- if (World && !CheckAttributeTimer.IsValid())
- {
- // Trigger OnRatioChange check at the end of this frame/next so that any individual attribute change
- // has time for the other attribute to update (in case they're linked)
- World->GetTimerManager().SetTimer(CheckAttributeTimer, this, &UAA_WaitAttributeChangeRatioThreshold::OnRatioChange, 0.001f, false);
- }
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::OnRatioChange()
-{
- CheckAttributeTimer.Invalidate();
-
- bool bPassedComparison = DoesValuePassComparison(LastAttributeNumeratorValue, LastAttributeDenominatorValue);
- if (bPassedComparison != bMatchedComparisonLastAttributeChange)
- {
- bMatchedComparisonLastAttributeChange = bPassedComparison;
- if (ShouldBroadcastDelegates())
- {
- OnChange.Broadcast(bMatchedComparisonLastAttributeChange, LastAttributeDenominatorValue != 0.f ? LastAttributeNumeratorValue/LastAttributeDenominatorValue : 0.f);
- }
- if (bTriggerOnce)
- {
- EndAction();
- }
- }
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::OnNumeratorAttributeChange(const FOnAttributeChangeData& CallbackData)
-{
- LastAttributeNumeratorValue = CallbackData.NewValue;
- OnAttributeChange();
-}
-
-void UAA_WaitAttributeChangeRatioThreshold::OnDenominatorAttributeChange(const FOnAttributeChangeData& CallbackData)
-{
- LastAttributeDenominatorValue = CallbackData.NewValue;
- OnAttributeChange();
-}
-
-bool UAA_WaitAttributeChangeRatioThreshold::DoesValuePassComparison(float ValueNumerator, float ValueDenominator) const
-{
- if (ValueDenominator == 0.f)
- {
- return bMatchedComparisonLastAttributeChange;
- }
-
- const float CurrentRatio = ValueNumerator / ValueDenominator;
- bool bPassedComparison = true;
- switch (ComparisonType)
- {
- case EWaitAttributeChangeComparison::ExactlyEqualTo:
- bPassedComparison = (CurrentRatio == ComparisonValue);
- break;
- case EWaitAttributeChangeComparison::GreaterThan:
- bPassedComparison = (CurrentRatio > ComparisonValue);
- break;
- case EWaitAttributeChangeComparison::GreaterThanOrEqualTo:
- bPassedComparison = (CurrentRatio >= ComparisonValue);
- break;
- case EWaitAttributeChangeComparison::LessThan:
- bPassedComparison = (CurrentRatio < ComparisonValue);
- break;
- case EWaitAttributeChangeComparison::LessThanOrEqualTo:
- bPassedComparison = (CurrentRatio <= ComparisonValue);
- break;
- case EWaitAttributeChangeComparison::NotEqualTo:
- bPassedComparison = (CurrentRatio != ComparisonValue);
- break;
- default:
- break;
- }
- return bPassedComparison;
-}
diff --git a/Source/UHLGAS/Private/Tasks/AT_InterpolateToPosition.cpp b/Source/UHLGAS/Private/Tasks/AT_InterpolateToPosition.cpp
deleted file mode 100644
index 48e2b2fc..00000000
--- a/Source/UHLGAS/Private/Tasks/AT_InterpolateToPosition.cpp
+++ /dev/null
@@ -1,299 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-
-#include "Tasks/AT_InterpolateToPosition.h"
-
-#include "Components/CapsuleComponent.h"
-#include "Curves/CurveVector.h"
-#include "Curves/CurveFloat.h"
-#include "Engine/World.h"
-#include "GameFramework/Character.h"
-#include "GameFramework/CharacterMovementComponent.h"
-#include "Kismet/KismetSystemLibrary.h"
-#include "Net/UnrealNetwork.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(AT_InterpolateToPosition)
-
-UAT_InterpolateToPosition::UAT_InterpolateToPosition(const FObjectInitializer& ObjectInitializer)
- : Super(ObjectInitializer)
-{
- bTickingTask = true;
- bSimulatedTask = true;
- bIsFinished = false;
-}
-
-UAT_InterpolateToPosition* UAT_InterpolateToPosition::InterpolateToPosition(
- FHitResult& OutHit,
- UGameplayAbility* OwningAbility,
- const FName TaskInstanceName,
- FVector Location,
- const FRotator Rotation,
- float Duration,
- UCurveFloat* OptionalInterpolationCurve,
- UCurveVector* OptionalVectorInterpolationCurve,
- AActor* OptionalActorToInterpolate,
- const bool bIsIgnoreHit,
- const float DistanceOffset,
- const bool bUseCapsuleTrace
-)
-{
- UAT_InterpolateToPosition* MyObj = NewAbilityTask(OwningAbility, TaskInstanceName);
-
- MyObj->ActorToInterpolate = OptionalActorToInterpolate != nullptr ? OptionalActorToInterpolate : MyObj->GetAvatarActor();
- if (MyObj->ActorToInterpolate != nullptr)
- {
- MyObj->StartLocation = MyObj->ActorToInterpolate->GetActorLocation();
- MyObj->StartRotation = MyObj->ActorToInterpolate->GetActorRotation();
- }
-
- if (!bIsIgnoreHit)
- {
- bool bBlockingHit = false;
- if (bUseCapsuleTrace)
- {
- const ACharacter* Character = Cast(MyObj->ActorToInterpolate);
- if (IsValid(Character))
- {
- const float Radius = Character->GetCapsuleComponent()->GetUnscaledCapsuleRadius();
- const float HalfHeight = Character->GetCapsuleComponent()->GetUnscaledCapsuleHalfHeight();
-
- bBlockingHit = CheckCapsuleHit(
- MyObj->GetWorld(),
- MyObj->ActorToInterpolate->GetActorLocation(),
- Location,
- Radius,
- HalfHeight,
- {MyObj->ActorToInterpolate},
- OutHit
- );
- }
- }
- else
- {
- bBlockingHit = CheckHit(
- MyObj->GetWorld(),
- MyObj->ActorToInterpolate->GetActorLocation(),
- Location,
- {MyObj->ActorToInterpolate},
- OutHit
- );
- }
-
- if (bBlockingHit)
- {
- const FVector Start = MyObj->ActorToInterpolate->GetActorLocation();
- const FVector CurrentEnd = GetCurrentEndLocation(
- Start,
- OutHit.Location,
- DistanceOffset
- );
-
- Duration = GetCurrentDuration(Duration, Start, Location, CurrentEnd);
- Location = CurrentEnd;
- }
- }
-
- MyObj->TargetLocation = Location;
- MyObj->TargetRotation = Rotation;
- MyObj->DurationOfMovement = FMath::Max(Duration, 0.001f); // Avoid negative or divide-by-zero cases
- MyObj->TimeMoveStarted = MyObj->GetWorld()->GetTimeSeconds();
- MyObj->TimeMoveWillEnd = MyObj->TimeMoveStarted + MyObj->DurationOfMovement;
- MyObj->LerpCurve = OptionalInterpolationCurve;
- MyObj->LerpCurveVector = OptionalVectorInterpolationCurve;
-
- return MyObj;
-}
-
-void UAT_InterpolateToPosition::InitSimulatedTask(UGameplayTasksComponent& InGameplayTasksComponent)
-{
- Super::InitSimulatedTask(InGameplayTasksComponent);
-
- TimeMoveStarted = GetWorld()->GetTimeSeconds();
- TimeMoveWillEnd = TimeMoveStarted + DurationOfMovement;
-}
-
-void UAT_InterpolateToPosition::Activate()
-{
- Super::Activate();
-}
-
-void UAT_InterpolateToPosition::TickTask(float DeltaTime)
-{
- if (bIsFinished)
- {
- return;
- }
-
- Super::TickTask(DeltaTime);
- AActor* MyActor = ActorToInterpolate;
- if (MyActor)
- {
- const ACharacter* MyCharacter = Cast(MyActor);
- if (MyCharacter)
- {
- UCharacterMovementComponent* CharMoveComp = Cast(MyCharacter->GetMovementComponent());
- if (CharMoveComp)
- {
- CharMoveComp->SetMovementMode(MOVE_Custom, 0);
- }
- }
-
- const float CurrentTime = GetWorld()->GetTimeSeconds();
-
- if (CurrentTime >= TimeMoveWillEnd)
- {
- bIsFinished = true;
-
- // Teleport in attempt to find a valid collision spot
- MyActor->TeleportTo(TargetLocation, MyActor->GetActorRotation());
- if (!bIsSimulating)
- {
- MyActor->ForceNetUpdate();
- if (ShouldBroadcastAbilityTaskDelegates())
- {
- OnTargetLocationReached.Broadcast();
- }
- EndTask();
- }
- }
- else
- {
- FVector NewLocation;
- FRotator NewRotation;
-
- float MoveFraction = (CurrentTime - TimeMoveStarted) / DurationOfMovement;
- if (LerpCurveVector)
- {
- const FVector ComponentInterpolationFraction = LerpCurveVector->GetVectorValue(MoveFraction);
- NewLocation = FMath::Lerp(StartLocation, TargetLocation, ComponentInterpolationFraction);
- NewRotation = FRotator::ZeroRotator; // TODO: make it work, here its initialized to remove warning
- }
- else
- {
- if (LerpCurve)
- {
- MoveFraction = LerpCurve->GetFloatValue(MoveFraction);
- }
-
- NewLocation = FMath::Lerp(StartLocation, TargetLocation, MoveFraction);
- NewRotation = FMath::Lerp(StartRotation, TargetRotation, MoveFraction);
- }
-
- MyActor->SetActorLocation(NewLocation);
- MyActor->SetActorRotation(NewRotation);
- }
- }
- else
- {
- bIsFinished = true;
- EndTask();
- }
-}
-
-void UAT_InterpolateToPosition::PreDestroyFromReplication()
-{
- bIsFinished = true;
- EndTask();
-}
-
-void UAT_InterpolateToPosition::GetLifetimeReplicatedProps(TArray< FLifetimeProperty > & OutLifetimeProps) const
-{
- DOREPLIFETIME(UAT_InterpolateToPosition, StartLocation);
- DOREPLIFETIME(UAT_InterpolateToPosition, StartRotation);
- DOREPLIFETIME(UAT_InterpolateToPosition, TargetLocation);
- DOREPLIFETIME(UAT_InterpolateToPosition, StartRotation);
- DOREPLIFETIME(UAT_InterpolateToPosition, DurationOfMovement);
- DOREPLIFETIME(UAT_InterpolateToPosition, LerpCurve);
- DOREPLIFETIME(UAT_InterpolateToPosition, LerpCurveVector);
-}
-
-void UAT_InterpolateToPosition::OnDestroy(bool bInOwnerFinished)
-{
- AActor* MyActor = ActorToInterpolate;
- if (MyActor)
- {
- ACharacter* MyCharacter = Cast(MyActor);
- if (MyCharacter)
- {
- UCharacterMovementComponent* CharMoveComp = Cast(MyCharacter->GetMovementComponent());
- if (CharMoveComp && CharMoveComp->MovementMode == MOVE_Custom)
- {
- CharMoveComp->SetMovementMode(MOVE_Walking);
- }
- }
- }
-
- Super::OnDestroy(bInOwnerFinished);
-}
-
-bool UAT_InterpolateToPosition::CheckHit(
- const UWorld* World,
- const FVector& Start,
- const FVector& End,
- const TArray& ActorsToIgnore,
- FHitResult& OutHit
-)
-{
- return UKismetSystemLibrary::LineTraceSingle(
- World,
- Start,
- End,
- ETraceTypeQuery::TraceTypeQuery1,
- false,
- ActorsToIgnore,
- EDrawDebugTrace::None,
- OutHit,
- true
- );
-}
-
-bool UAT_InterpolateToPosition::CheckCapsuleHit(
- const UWorld* World,
- const FVector& Start,
- const FVector& End,
- const float Radius,
- const float HalfHeight,
- const TArray& ActorsToIgnore,
- FHitResult& OutHit
-)
-{
- return UKismetSystemLibrary::CapsuleTraceSingle(
- World,
- Start,
- End,
- Radius,
- HalfHeight,
- ETraceTypeQuery::TraceTypeQuery1,
- false,
- ActorsToIgnore,
- EDrawDebugTrace::None,
- OutHit,
- true
- );
-}
-
-FVector UAT_InterpolateToPosition::GetCurrentEndLocation(
- const FVector& Start,
- const FVector& End,
- const float DistanceOffset
-)
-{
- FVector Result {};
- const FVector Direction = End - Start;
- float Distance = FVector::Dist(Start, End);
-
- Distance = FMath::Max(Distance + DistanceOffset, 0.f);
- Result = Start + Direction.GetSafeNormal() * Distance;
-
- return Result;
-}
-
-float UAT_InterpolateToPosition::GetCurrentDuration(const float Duration, const FVector& Start, const FVector& End, const FVector& CurrentEnd)
-{
- float Result = Duration;
- const float OriginalDistance = (End - Start).Size();
- const float NewDistance = (CurrentEnd - Start).Size();
- Result = Duration * (NewDistance / OriginalDistance);
-
- return Result;
-}
diff --git a/Source/UHLGAS/Private/UHLAbilitySet.cpp b/Source/UHLGAS/Private/UHLAbilitySet.cpp
deleted file mode 100644
index cd201fb5..00000000
--- a/Source/UHLGAS/Private/UHLAbilitySet.cpp
+++ /dev/null
@@ -1,181 +0,0 @@
-// Pavel Penkov 2025 All Rights Reserved.
-
-#include "UHLAbilitySet.h"
-
-#include "AbilitySystemComponent.h"
-#include "GameplayAbilitySpec.h"
-#include "UHLGAS.h"
-
-#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAbilitySet)
-
-void FUHLAbilitySet_GrantedHandles::SetAbilitySetTags(const FGameplayTagContainer& AbilitySetTagContainer) { AbilitySetTags = AbilitySetTagContainer; }
-
-void FUHLAbilitySet_GrantedHandles::AddAbilitySpecHandle(const FGameplayAbilitySpecHandle& Handle)
-{
- if (Handle.IsValid())
- {
- AbilitySpecHandles.Add(Handle);
- }
-}
-
-void FUHLAbilitySet_GrantedHandles::AddGameplayEffectHandle(const FActiveGameplayEffectHandle& Handle)
-{
- if (Handle.IsValid())
- {
- GameplayEffectHandles.Add(Handle);
- }
-}
-
-void FUHLAbilitySet_GrantedHandles::AddAttributeSet(UAttributeSet* Set) { GrantedAttributeSets.Add(Set); }
-
-void FUHLAbilitySet_GrantedHandles::TakeFromAbilitySystem(UAbilitySystemComponent* ASC)
-{
- check(ASC);
-
- if (!ASC->IsOwnerActorAuthoritative())
- {
- // Must be authoritative to give or take ability sets.
- return;
- }
-
- for (const FGameplayAbilitySpecHandle& Handle : AbilitySpecHandles)
- {
- if (Handle.IsValid())
- {
- ASC->ClearAbility(Handle);
- }
- }
-
- for (const FActiveGameplayEffectHandle& Handle : GameplayEffectHandles)
- {
- if (Handle.IsValid())
- {
- ASC->RemoveActiveGameplayEffect(Handle);
- }
- }
-
- for (UAttributeSet* Set : GrantedAttributeSets)
- {
- ASC->RemoveSpawnedAttribute(Set);
- }
-
- AbilitySetTags.Reset();
- AbilitySpecHandles.Reset();
- GameplayEffectHandles.Reset();
- GrantedAttributeSets.Reset();
-}
-
-UUHLAbilitySet::UUHLAbilitySet(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) {}
-
-void UUHLAbilitySet::GiveToAbilitySystem(UAbilitySystemComponent* ASC, FUHLAbilitySet_GrantedHandles* OutGrantedHandles, UObject* SourceObject) const
-{
- check(ASC);
-
- if (!ASC->IsOwnerActorAuthoritative())
- {
- // Must be authoritative to give or take ability sets.
- return;
- }
-
- // Save AbilitySetTags to handles
- OutGrantedHandles->SetAbilitySetTags(AbilitySetTags);
-
- // Grant the simple gameplay abilities.
- for (int32 AbilityIndex = 0; AbilityIndex < GrantedSimpleGameplayAbilities.Num(); ++AbilityIndex)
- {
- TSubclassOf AbilityToGrant = GrantedSimpleGameplayAbilities[AbilityIndex];
-
- if (!IsValid(AbilityToGrant))
- {
- UE_LOG(LogUHLAbilitySystem, Error, TEXT("GrantedSimpleGameplayAbilities[%d] on ability set [%s] is not valid."), AbilityIndex, *GetNameSafe(this));
- continue;
- }
-
- UGameplayAbility* AbilityCDO = AbilityToGrant->GetDefaultObject