├── .github └── workflows │ └── package-plugin.yml ├── .gitignore ├── .markdownlint.json ├── Config ├── DefaultUnrealHelperLibrary.ini ├── FilterPlugin.ini └── Tags │ └── UnrealHeaderLibraryTags.ini ├── Content ├── AI │ ├── BB_UHL_Base.uasset │ ├── BP_UHL_TestBlueprint.uasset │ ├── BT_UHL_AI_Nodes.uasset │ ├── BehaviorTrees │ │ ├── BT_UHL_CheckGASGameplayTagsOnActor.uasset │ │ ├── BT_UHL_GameplayFocus.uasset │ │ ├── BT_UHL_GameplayFocus_Comparison.uasset │ │ ├── BT_UHL_InAngle.uasset │ │ ├── BT_UHL_InAngle_OverrideDebugLinesDistance.uasset │ │ ├── BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset │ │ ├── BT_UHL_InAngle_Vector.uasset │ │ ├── BT_UHL_InRange.uasset │ │ ├── BT_UHL_InRange_CapsuleToCapsule.uasset │ │ ├── BT_UHL_InRange_CapsuleToCapsule_Moving.uasset │ │ ├── BT_UHL_InRange_Vector.uasset │ │ ├── BT_UHL_InvokeGameplayAbility.uasset │ │ ├── BT_UHL_InvokeGameplayAbility_StressTest.uasset │ │ ├── BT_UHL_PlayAnimMontage.uasset │ │ ├── BT_UHL_PlayAnimMontage_StressTest.uasset │ │ ├── BT_UHL_RandomChance.uasset │ │ ├── BT_UHL_RandomChance_Scalable.uasset │ │ ├── BT_UHL_RandomLoop.uasset │ │ ├── BT_UHL_RandomSelector.uasset │ │ ├── BT_UHL_RandomTimelimit.uasset │ │ └── BT_UHL_SetBBValue.uasset │ └── Tasks │ │ └── BTT_TeleportToStartPoint.uasset ├── AbilitySystem │ └── Abilities │ │ ├── GA_UHL_InvokeGameplayAbility_Test1.uasset │ │ └── GA_UHL_InvokeGameplayAbility_Test2.uasset ├── BP_UHL_BlueprintNode.uasset ├── Characters │ ├── Base │ │ ├── Animations │ │ │ ├── AM_TH_BS_Attack_1.uasset │ │ │ ├── AM_TH_BS_Attack_2.uasset │ │ │ ├── AS_TH_BS_Attack_1.uasset │ │ │ └── AS_TH_BS_Attack_2.uasset │ │ └── BP_UHL_BaseCharacter.uasset │ ├── Enemy │ │ ├── ABP_UHL_Enemy.uasset │ │ ├── BP_UHL_Enemy.uasset │ │ ├── BP_UHL_Enemy_BlueprintsOnly.uasset │ │ ├── BP_UHL_Enemy_GameplayFocus.uasset │ │ ├── BP_UHL_Enemy_InAngle.uasset │ │ ├── BP_UHL_Enemy_Sight_360.uasset │ │ └── M_GameplayFocus.uasset │ └── Player │ │ ├── AbilitySet_DefaultCharacter.uasset │ │ ├── AbilitySet_Test.uasset │ │ ├── AbilitySet_UHL_DefaultCharacter.uasset │ │ ├── BP_UHL_Player.uasset │ │ ├── DA_AbilitySet.uasset │ │ └── DA_AbilitySystem_UHL_Player.uasset ├── Core │ ├── GM_UnrealHelperLibrary.uasset │ └── PC_UnrealHelperLibrary.uasset ├── Data │ ├── CT_RandomChance_Scalable.uasset │ └── DT_Abilities.uasset ├── Gyms │ ├── Angles │ │ ├── BP_Dummy.uasset │ │ ├── BP_GetPointAtRelativeAngle.uasset │ │ ├── BP_GetPointAtRelativeAngleBetweenActors.uasset │ │ ├── BP_GetPointAtRelativeDirection.uasset │ │ ├── BP_GetPointAtRelativeDirectionBetweenActors.uasset │ │ ├── BP_GetRelativeAngle.uasset │ │ ├── BP_RelativeAngle.uasset │ │ └── Gym_UHL_Angles.umap │ ├── Gym_UHL_AI.umap │ ├── Gym_UHL_Angles.umap │ ├── Gym_UHL_GAS.umap │ ├── Gym_UHL_InvokeGameplayAbility.umap │ └── Gym_UHL_PlayAnimMontage_StressTest.umap ├── Input │ ├── Actions │ │ ├── IA_DebugMenu.uasset │ │ ├── IA_Jump.uasset │ │ ├── IA_LookMouse.uasset │ │ ├── IA_LookStick.uasset │ │ └── IA_Move.uasset │ └── Configs │ │ ├── IMC_UHL_GamePad_Default.uasset │ │ └── IMC_UHL_KBM_Default.uasset ├── Subsystems │ └── DebugSubsystem │ │ ├── DCC_AbilitySystem_Default.uasset │ │ └── DCC_ShowDebugReset.uasset ├── Tools │ ├── ConvertToORM │ │ ├── ExampleTextures │ │ │ ├── DefaultMaterial_AO.uasset │ │ │ ├── DefaultMaterial_metallic.uasset │ │ │ └── DefaultMaterial_roughness.uasset │ │ └── TG_ConvertToORM.uasset │ └── EUW_UHL_Utils.uasset └── UI │ ├── SB_DrawDebugBar_Test.uasset │ ├── UI_DebugMenu.uasset │ ├── UI_UHL_DebugWidget.uasset │ └── WBP_DrawDebugBar_Test.uasset ├── LICENSE ├── README.md ├── Resources ├── Icon128.png └── PlaceholderButtonIcon.svg ├── Source ├── CommonMaps │ ├── CommonMaps.Build.cs │ ├── Private │ │ ├── CommonMaps.cpp │ │ └── CommonMapsDeveloperSettings.cpp │ └── Public │ │ ├── CommonMaps.h │ │ └── CommonMapsDeveloperSettings.h ├── UHLAI │ ├── Private │ │ ├── Components │ │ │ └── UHLAIPerceptionComponent.cpp │ │ ├── Composite │ │ │ └── BTC_RandomSelector.cpp │ │ ├── Core │ │ │ ├── UHLAIActorSettings.cpp │ │ │ ├── UHLAIDebugSettings.cpp │ │ │ ├── UHLBlackboardValueType.cpp │ │ │ └── UHLMathOperations.cpp │ │ ├── Data │ │ │ └── TurnSettings.cpp │ │ ├── Decorators │ │ │ ├── BTD_Base.cpp │ │ │ ├── BTD_CheckGASGameplayTagsOnActor.cpp │ │ │ ├── BTD_GameplayEffectCooldown.cpp │ │ │ ├── BTD_InAngle.cpp │ │ │ ├── BTD_InRange.cpp │ │ │ ├── BTD_LoopRandomCount.cpp │ │ │ ├── BTD_RandomChance.cpp │ │ │ └── BTD_TimeLimitRandom.cpp │ │ ├── Services │ │ │ └── BTS_GameplayFocus.cpp │ │ ├── Tasks │ │ │ ├── BTT_ClearFocus.cpp │ │ │ ├── BTT_DebugPrintBBValue.cpp │ │ │ ├── BTT_DebugPrintString.cpp │ │ │ ├── BTT_FireGameplayEvent.cpp │ │ │ ├── BTT_InvokeGameplayAbility.cpp │ │ │ ├── BTT_PlayAnimMontage.cpp │ │ │ ├── BTT_SetBBValue.cpp │ │ │ └── BTT_TurnTo.cpp │ │ ├── UHLAI.cpp │ │ ├── UHLAIBlueprintLibrary.cpp │ │ ├── UHLAIBlueprintLibrary.h │ │ └── UHLValueOrBBKey_GameplayTag.cpp │ ├── Public │ │ ├── Components │ │ │ └── UHLAIPerceptionComponent.h │ │ ├── Composite │ │ │ └── BTC_RandomSelector.h │ │ ├── Core │ │ │ ├── UHLAIActorSettings.h │ │ │ ├── UHLAIDebugSettings.h │ │ │ ├── UHLBlackboardValueType.h │ │ │ └── UHLMathOperations.h │ │ ├── Data │ │ │ └── TurnSettings.h │ │ ├── Decorators │ │ │ ├── BTD_Base.h │ │ │ ├── BTD_CheckGASGameplayTagsOnActor.h │ │ │ ├── BTD_GameplayEffectCooldown.h │ │ │ ├── BTD_InAngle.h │ │ │ ├── BTD_InRange.h │ │ │ ├── BTD_LoopRandomCount.h │ │ │ ├── BTD_RandomChance.h │ │ │ └── BTD_TimeLimitRandom.h │ │ ├── Services │ │ │ └── BTS_GameplayFocus.h │ │ ├── Tasks │ │ │ ├── BTT_ClearFocus.h │ │ │ ├── BTT_DebugPrintBBValue.h │ │ │ ├── BTT_DebugPrintString.h │ │ │ ├── BTT_FireGameplayEvent.h │ │ │ ├── BTT_InvokeGameplayAbility.h │ │ │ ├── BTT_PlayAnimMontage.h │ │ │ ├── BTT_SetBBValue.h │ │ │ └── BTT_TurnTo.h │ │ ├── UHLAI.h │ │ └── UHLValueOrBBKey_GameplayTag.h │ └── UHLAI.Build.cs ├── UHLAIEditor │ ├── Private │ │ ├── UHLAIEditor.cpp │ │ └── UHLAIEditorValueOrBBKeyDetails.cpp │ ├── Public │ │ ├── UHLAIEditor.h │ │ └── UHLAIEditorValueOrBBKeyDetails.h │ └── UHLAIEditor.Build.cs ├── UHLCharacter │ ├── Private │ │ ├── AttributeSets │ │ │ └── UHLBaseCharacterAttributeSet.cpp │ │ ├── Characters │ │ │ ├── UHLBaseCharacter.cpp │ │ │ └── UHLBaseCharacterWithASC.cpp │ │ ├── Controllers │ │ │ └── UHLPlayerController.cpp │ │ └── UHLCharacter.cpp │ ├── Public │ │ ├── AttributeSets │ │ │ └── UHLBaseCharacterAttributeSet.h │ │ ├── Characters │ │ │ ├── UHLBaseCharacter.h │ │ │ └── UHLBaseCharacterWithASC.h │ │ ├── Controllers │ │ │ └── UHLPlayerController.h │ │ └── UHLCharacter.h │ └── UHLCharacter.Build.cs ├── UHLDebug │ ├── Private │ │ ├── UHLDebug.cpp │ │ ├── UHLDebugModuleSubsystem.cpp │ │ └── UI │ │ │ └── UHLDebugWidget.cpp │ ├── Public │ │ ├── UHLDebug.h │ │ ├── UHLDebugModuleSubsystem.h │ │ └── UI │ │ │ └── UHLDebugWidget.h │ └── UHLDebug.Build.cs ├── UHLDebugSystem │ ├── Private │ │ ├── AA_WaitDebugCategoryChange.cpp │ │ ├── DebugCategories │ │ │ ├── DCC_AbilitySystem_Abilities.cpp │ │ │ ├── DCC_AbilitySystem_Attributes.cpp │ │ │ ├── DCC_AbilitySystem_Effects.cpp │ │ │ ├── DCC_Collisions.cpp │ │ │ └── DCC_InputSystem_EnhancedInput.cpp │ │ ├── DebugCategoryButtonWidget.cpp │ │ ├── Development │ │ │ └── UHLDebugSystemSettings.cpp │ │ ├── UHLDebugBlueprintLibrary.cpp │ │ ├── UHLDebugCategory.cpp │ │ ├── UHLDebugCategoryComponent.cpp │ │ ├── UHLDebugSystem.cpp │ │ ├── UHLDebugSystemSubsystem.cpp │ │ └── UI │ │ │ └── UHLDebugCategoriesListWidget.cpp │ ├── Public │ │ ├── AA_WaitDebugCategoryChange.h │ │ ├── DebugCategories │ │ │ ├── DCC_AbilitySystem_Abilities.h │ │ │ ├── DCC_AbilitySystem_Attributes.h │ │ │ ├── DCC_AbilitySystem_Effects.h │ │ │ ├── DCC_Collisions.h │ │ │ └── DCC_InputSystem_EnhancedInput.h │ │ ├── DebugCategoryButtonWidget.h │ │ ├── Development │ │ │ └── UHLDebugSystemSettings.h │ │ ├── UHLDebugBlueprintLibrary.h │ │ ├── UHLDebugCategory.h │ │ ├── UHLDebugCategoryComponent.h │ │ ├── UHLDebugSystem.h │ │ ├── UHLDebugSystemSubsystem.h │ │ └── UI │ │ │ └── UHLDebugCategoriesListWidget.h │ └── UHLDebugSystem.Build.cs ├── UHLDebugSystemEditor │ ├── Private │ │ └── UHLDebugSystemEditor.cpp │ ├── Public │ │ └── UHLDebugSystemEditor.h │ └── UHLDebugSystemEditor.Build.cs ├── UHLEditor │ ├── Private │ │ ├── Development │ │ │ └── UHLEditorSettings.cpp │ │ ├── UHLEditor.cpp │ │ ├── UHLEditorBlueprintThumbnailRenderer.cpp │ │ ├── UHLEditorCommands.cpp │ │ ├── UHLEditorCustomThumbnail.cpp │ │ ├── UHLEditorStyle.cpp │ │ └── UI │ │ │ └── EditorUtility │ │ │ └── EUW_UHL_Utils.cpp │ ├── Public │ │ ├── Development │ │ │ └── UHLEditorSettings.h │ │ ├── UHLEditor.h │ │ ├── UHLEditorBlueprintThumbnailRenderer.h │ │ ├── UHLEditorCommands.h │ │ ├── UHLEditorCustomThumbnail.h │ │ ├── UHLEditorStyle.h │ │ └── UI │ │ │ └── EditorUtility │ │ │ └── EUW_UHL_Utils.h │ └── UHLEditor.Build.cs ├── UHLGAS │ ├── Private │ │ ├── Abilities │ │ │ └── UHLGameplayAbility.cpp │ │ ├── Animations │ │ │ └── Notifies │ │ │ │ ├── ANS_ActivateAbility.cpp │ │ │ │ ├── ANS_CatchToAbilityInputCache.cpp │ │ │ │ ├── ANS_CheckAbilityInputCache.cpp │ │ │ │ ├── ANS_GlobalTimeDilation.cpp │ │ │ │ └── AN_FireGameplayEvent.cpp │ │ ├── AttributeSets │ │ │ └── UHLAttributeSet.cpp │ │ ├── Core │ │ │ └── UHLAbilitySystemInterface.cpp │ │ ├── Development │ │ │ └── UHLGASSettings.cpp │ │ ├── Input │ │ │ ├── AbilityInputCache.cpp │ │ │ ├── UHLInputComponent.cpp │ │ │ └── UHLInputConfig.cpp │ │ ├── Tasks │ │ │ ├── AA_TryActivateAbilityAndWait.cpp │ │ │ ├── AA_WaitAbilityActivate.cpp │ │ │ └── AT_InterpolateToPosition.cpp │ │ ├── UHLAbilitySet.cpp │ │ ├── UHLAbilitySystemComponent.cpp │ │ ├── UHLAbilitySystemConfig.cpp │ │ ├── UHLGAS.cpp │ │ └── UHLGASBlueprintLibrary.cpp │ ├── Public │ │ ├── Abilities │ │ │ └── UHLGameplayAbility.h │ │ ├── Animations │ │ │ └── Notifies │ │ │ │ ├── ANS_ActivateAbility.h │ │ │ │ ├── ANS_CatchToAbilityInputCache.h │ │ │ │ ├── ANS_CheckAbilityInputCache.h │ │ │ │ ├── ANS_GlobalTimeDilation.h │ │ │ │ └── AN_FireGameplayEvent.h │ │ ├── AttributeSets │ │ │ └── UHLAttributeSet.h │ │ ├── Core │ │ │ └── UHLAbilitySystemInterface.h │ │ ├── Development │ │ │ └── UHLGASSettings.h │ │ ├── Input │ │ │ ├── AbilityInputCache.h │ │ │ ├── UHLInputComponent.h │ │ │ └── UHLInputConfig.h │ │ ├── Tasks │ │ │ ├── AA_TryActivateAbilityAndWait.h │ │ │ ├── AA_WaitAbilityActivate.h │ │ │ └── AT_InterpolateToPosition.h │ │ ├── UHLAbilitySet.h │ │ ├── UHLAbilitySystemComponent.h │ │ ├── UHLAbilitySystemConfig.h │ │ ├── UHLGAS.h │ │ └── UHLGASBlueprintLibrary.h │ └── UHLGAS.Build.cs ├── UHLModulesHelper │ ├── Private │ │ ├── UHLConfigMigrationUtils.cpp │ │ └── UHLModulesHelper.cpp │ ├── Public │ │ ├── UHLConfigMigrationUtils.h │ │ └── UHLModulesHelper.h │ └── UHLModulesHelper.Build.cs └── UnrealHelperLibrary │ ├── Private │ ├── Animation │ │ └── Notifies │ │ │ ├── ANS_EnableRootMotionZAxisMovement.cpp │ │ │ ├── ANS_MagnetTo.cpp │ │ │ ├── ANS_UHL_Base.cpp │ │ │ ├── AN_AttachActorWithUniqueId.cpp │ │ │ ├── AN_DetachActorWithUniqueId.cpp │ │ │ └── AN_UHL_Base.cpp │ ├── Core │ │ └── UHLGameplayTags.cpp │ ├── Development │ │ └── UHLSettings.cpp │ ├── Subsystems │ │ └── EnemyTickManager │ │ │ └── EnemyTickOptimizerSubsystem.cpp │ ├── UI │ │ └── UHLHUD.cpp │ ├── UnrealHelperLibrary.cpp │ └── Utils │ │ ├── UHLLoadingUtilLibrary.cpp │ │ ├── UHLTraceUtilsBPL.cpp │ │ └── UnrealHelperLibraryBPL.cpp │ ├── Public │ ├── Animation │ │ └── Notifies │ │ │ ├── ANS_EnableRootMotionZAxisMovement.h │ │ │ ├── ANS_MagnetTo.h │ │ │ ├── ANS_UHL_Base.h │ │ │ ├── AN_AttachActorWithUniqueId.h │ │ │ ├── AN_DetachActorWithUniqueId.h │ │ │ └── AN_UHL_Base.h │ ├── Core │ │ ├── UHLAttachmentRules.h │ │ └── UHLGameplayTags.h │ ├── Development │ │ └── UHLSettings.h │ ├── Subsystems │ │ └── EnemyTickManager │ │ │ └── EnemyTickOptimizerSubsystem.h │ ├── UI │ │ └── UHLHUD.h │ ├── UnrealHelperLibrary.h │ ├── UnrealHelperLibraryTypes.h │ └── Utils │ │ ├── UHLLoadingUtilLibrary.h │ │ ├── UHLTraceUtilsBPL.h │ │ └── UnrealHelperLibraryBPL.h │ └── UnrealHelperLibrary.Build.cs └── UnrealHelperLibrary.uplugin /.github/workflows/package-plugin.yml: -------------------------------------------------------------------------------- 1 | name: Package plugin 2 | on: workflow_dispatch 3 | jobs: 4 | package: 5 | name: Package plugin 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v4 9 | 10 | # - name: Archive files 11 | # run: | 12 | # sudo apt-get update 13 | # sudo apt-get install zip 14 | # zip -r archive.zip * 15 | 16 | # - name: Upload to gdrive 17 | # uses: adityak74/google-drive-upload-git-action@main 18 | # with: 19 | # credentials: ${{ secrets.GOOGLE_DRIVE_CREDENTIALS }} 20 | # filename: "archive.zip" 21 | # folderId: ${{ secrets.GOOGLE_DRIVE_FOLDER_ID }} 22 | # name: "UHL_${{ github.run_id }}.zip" # optional string 23 | # overwrite: "true" # optional boolean 24 | 25 | # artifacts 26 | - name: clean up trash 27 | run: | 28 | rm -rf .gitignore 29 | rm -rf .markdownlint.json 30 | rm -rf LICENSE 31 | - uses: actions/upload-artifact@v4 32 | with: 33 | name: unreal-helper-library 34 | path: . 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Visual Studio 2015 user specific files 2 | .vs/ 3 | 4 | # Compiled Object files 5 | *.slo 6 | *.lo 7 | *.o 8 | *.obj 9 | 10 | # Precompiled Headers 11 | *.gch 12 | *.pch 13 | 14 | # Compiled Dynamic libraries 15 | *.so 16 | *.dylib 17 | *.dll 18 | 19 | # Fortran module files 20 | *.mod 21 | 22 | # Compiled Static libraries 23 | *.lai 24 | *.la 25 | *.a 26 | *.lib 27 | 28 | # Executables 29 | *.exe 30 | *.out 31 | *.app 32 | *.ipa 33 | 34 | # These project files can be generated by the engine 35 | *.xcodeproj 36 | *.xcworkspace 37 | *.sln 38 | *.suo 39 | *.opensdf 40 | *.sdf 41 | *.VC.db 42 | *.VC.opendb 43 | 44 | # Moved to git lfs 45 | #Content/Resources/* 46 | #Content/Movies/* 47 | #Content/DEV/* 48 | 49 | # Precompiled Assets 50 | SourceArt/**/*.png 51 | SourceArt/**/*.tga 52 | 53 | # Binary Files 54 | Binaries/* 55 | Plugins/*/Binaries/* 56 | 57 | # Builds 58 | Build/* 59 | 60 | # Whitelist PakBlacklist-.txt files 61 | !Build/*/ 62 | Build/*/** 63 | !Build/*/PakBlacklist*.txt 64 | 65 | # Don't ignore icon files in Build 66 | !Build/**/*.ico 67 | 68 | # Built data for maps 69 | *_BuiltData.uasset 70 | 71 | # Configuration files generated by the Editor 72 | Saved/* 73 | 74 | # Compiled source files for the engine to use 75 | Intermediate/* 76 | Plugins/*/Intermediate/* 77 | 78 | # Cache files for the editor to use 79 | DerivedDataCache/* 80 | 81 | # 82 | .idea/* 83 | Plugins/Developer/RiderLink/* 84 | 85 | # Blender 86 | *.blend1 87 | 88 | #vscode 89 | .vscode 90 | .ignore 91 | 92 | # project-cleanup 93 | project-cleanup.txt 94 | 95 | # Localization keys in unreal engine determenistic, no need to store "gather text" results 96 | Content/Localization/**/**.archive 97 | Content/Localization/**/**.manifest 98 | Content/Localization/**/**.locmeta 99 | Content/Localization/**/Game_Conflicts.txt 100 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "MD033": { 3 | "allowed_elements": ["details", "summary"] 4 | }, 5 | "MD013": false 6 | } 7 | -------------------------------------------------------------------------------- /Config/FilterPlugin.ini: -------------------------------------------------------------------------------- 1 | [FilterPlugin] 2 | ; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and 3 | ; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively. 4 | ; 5 | ; Examples: 6 | ; /README.txt 7 | ; /Extras/... 8 | ; /Binaries/ThirdParty/*.dll 9 | 10 | /README.md 11 | /Config/... -------------------------------------------------------------------------------- /Config/Tags/UnrealHeaderLibraryTags.ini: -------------------------------------------------------------------------------- 1 | [/Script/GameplayTags.GameplayTagsList] 2 | GameplayTagList=(Tag="UHL.Debug.InvokeGameplayAbility_Test1",DevComment="") 3 | GameplayTagList=(Tag="UHL.Debug.InvokeGameplayAbility_Test2",DevComment="") 4 | -------------------------------------------------------------------------------- /Content/AI/BB_UHL_Base.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BB_UHL_Base.uasset -------------------------------------------------------------------------------- /Content/AI/BP_UHL_TestBlueprint.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BP_UHL_TestBlueprint.uasset -------------------------------------------------------------------------------- /Content/AI/BT_UHL_AI_Nodes.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BT_UHL_AI_Nodes.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_CheckGASGameplayTagsOnActor.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_CheckGASGameplayTagsOnActor.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_GameplayFocus.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_GameplayFocus_Comparison.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_GameplayFocus_Comparison.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InAngle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InAngle.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InAngle_OverrideDebugLinesDistance_Moving.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InAngle_Vector.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InAngle_Vector.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InRange.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InRange.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule_Moving.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InRange_CapsuleToCapsule_Moving.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InRange_Vector.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InRange_Vector.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility_StressTest.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_InvokeGameplayAbility_StressTest.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage_StressTest.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_PlayAnimMontage_StressTest.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_RandomChance.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_RandomChance.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_RandomChance_Scalable.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_RandomChance_Scalable.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_RandomLoop.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_RandomLoop.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_RandomSelector.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_RandomSelector.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_RandomTimelimit.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_RandomTimelimit.uasset -------------------------------------------------------------------------------- /Content/AI/BehaviorTrees/BT_UHL_SetBBValue.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/BehaviorTrees/BT_UHL_SetBBValue.uasset -------------------------------------------------------------------------------- /Content/AI/Tasks/BTT_TeleportToStartPoint.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AI/Tasks/BTT_TeleportToStartPoint.uasset -------------------------------------------------------------------------------- /Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test1.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test1.uasset -------------------------------------------------------------------------------- /Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test2.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/AbilitySystem/Abilities/GA_UHL_InvokeGameplayAbility_Test2.uasset -------------------------------------------------------------------------------- /Content/BP_UHL_BlueprintNode.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/BP_UHL_BlueprintNode.uasset -------------------------------------------------------------------------------- /Content/Characters/Base/Animations/AM_TH_BS_Attack_1.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Base/Animations/AM_TH_BS_Attack_1.uasset -------------------------------------------------------------------------------- /Content/Characters/Base/Animations/AM_TH_BS_Attack_2.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Base/Animations/AM_TH_BS_Attack_2.uasset -------------------------------------------------------------------------------- /Content/Characters/Base/Animations/AS_TH_BS_Attack_1.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Base/Animations/AS_TH_BS_Attack_1.uasset -------------------------------------------------------------------------------- /Content/Characters/Base/Animations/AS_TH_BS_Attack_2.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Base/Animations/AS_TH_BS_Attack_2.uasset -------------------------------------------------------------------------------- /Content/Characters/Base/BP_UHL_BaseCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Base/BP_UHL_BaseCharacter.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/ABP_UHL_Enemy.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/ABP_UHL_Enemy.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/BP_UHL_Enemy.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/BP_UHL_Enemy.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/BP_UHL_Enemy_BlueprintsOnly.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/BP_UHL_Enemy_BlueprintsOnly.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/BP_UHL_Enemy_GameplayFocus.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/BP_UHL_Enemy_GameplayFocus.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/BP_UHL_Enemy_InAngle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/BP_UHL_Enemy_InAngle.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/BP_UHL_Enemy_Sight_360.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/BP_UHL_Enemy_Sight_360.uasset -------------------------------------------------------------------------------- /Content/Characters/Enemy/M_GameplayFocus.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Enemy/M_GameplayFocus.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/AbilitySet_DefaultCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/AbilitySet_DefaultCharacter.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/AbilitySet_Test.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/AbilitySet_Test.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/AbilitySet_UHL_DefaultCharacter.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/AbilitySet_UHL_DefaultCharacter.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/BP_UHL_Player.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/BP_UHL_Player.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/DA_AbilitySet.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/DA_AbilitySet.uasset -------------------------------------------------------------------------------- /Content/Characters/Player/DA_AbilitySystem_UHL_Player.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Characters/Player/DA_AbilitySystem_UHL_Player.uasset -------------------------------------------------------------------------------- /Content/Core/GM_UnrealHelperLibrary.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Core/GM_UnrealHelperLibrary.uasset -------------------------------------------------------------------------------- /Content/Core/PC_UnrealHelperLibrary.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Core/PC_UnrealHelperLibrary.uasset -------------------------------------------------------------------------------- /Content/Data/CT_RandomChance_Scalable.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Data/CT_RandomChance_Scalable.uasset -------------------------------------------------------------------------------- /Content/Data/DT_Abilities.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Data/DT_Abilities.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_Dummy.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_Dummy.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_GetPointAtRelativeAngle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_GetPointAtRelativeAngle.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_GetPointAtRelativeAngleBetweenActors.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_GetPointAtRelativeAngleBetweenActors.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_GetPointAtRelativeDirection.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_GetPointAtRelativeDirection.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_GetPointAtRelativeDirectionBetweenActors.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_GetPointAtRelativeDirectionBetweenActors.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_GetRelativeAngle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_GetRelativeAngle.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/BP_RelativeAngle.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/BP_RelativeAngle.uasset -------------------------------------------------------------------------------- /Content/Gyms/Angles/Gym_UHL_Angles.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Angles/Gym_UHL_Angles.umap -------------------------------------------------------------------------------- /Content/Gyms/Gym_UHL_AI.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Gym_UHL_AI.umap -------------------------------------------------------------------------------- /Content/Gyms/Gym_UHL_Angles.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Gym_UHL_Angles.umap -------------------------------------------------------------------------------- /Content/Gyms/Gym_UHL_GAS.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Gym_UHL_GAS.umap -------------------------------------------------------------------------------- /Content/Gyms/Gym_UHL_InvokeGameplayAbility.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Gym_UHL_InvokeGameplayAbility.umap -------------------------------------------------------------------------------- /Content/Gyms/Gym_UHL_PlayAnimMontage_StressTest.umap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Gyms/Gym_UHL_PlayAnimMontage_StressTest.umap -------------------------------------------------------------------------------- /Content/Input/Actions/IA_DebugMenu.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Actions/IA_DebugMenu.uasset -------------------------------------------------------------------------------- /Content/Input/Actions/IA_Jump.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Actions/IA_Jump.uasset -------------------------------------------------------------------------------- /Content/Input/Actions/IA_LookMouse.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Actions/IA_LookMouse.uasset -------------------------------------------------------------------------------- /Content/Input/Actions/IA_LookStick.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Actions/IA_LookStick.uasset -------------------------------------------------------------------------------- /Content/Input/Actions/IA_Move.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Actions/IA_Move.uasset -------------------------------------------------------------------------------- /Content/Input/Configs/IMC_UHL_GamePad_Default.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Configs/IMC_UHL_GamePad_Default.uasset -------------------------------------------------------------------------------- /Content/Input/Configs/IMC_UHL_KBM_Default.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Input/Configs/IMC_UHL_KBM_Default.uasset -------------------------------------------------------------------------------- /Content/Subsystems/DebugSubsystem/DCC_AbilitySystem_Default.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Subsystems/DebugSubsystem/DCC_AbilitySystem_Default.uasset -------------------------------------------------------------------------------- /Content/Subsystems/DebugSubsystem/DCC_ShowDebugReset.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Subsystems/DebugSubsystem/DCC_ShowDebugReset.uasset -------------------------------------------------------------------------------- /Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_AO.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_AO.uasset -------------------------------------------------------------------------------- /Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_metallic.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_metallic.uasset -------------------------------------------------------------------------------- /Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_roughness.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Tools/ConvertToORM/ExampleTextures/DefaultMaterial_roughness.uasset -------------------------------------------------------------------------------- /Content/Tools/ConvertToORM/TG_ConvertToORM.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Tools/ConvertToORM/TG_ConvertToORM.uasset -------------------------------------------------------------------------------- /Content/Tools/EUW_UHL_Utils.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/Tools/EUW_UHL_Utils.uasset -------------------------------------------------------------------------------- /Content/UI/SB_DrawDebugBar_Test.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/UI/SB_DrawDebugBar_Test.uasset -------------------------------------------------------------------------------- /Content/UI/UI_DebugMenu.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/UI/UI_DebugMenu.uasset -------------------------------------------------------------------------------- /Content/UI/UI_UHL_DebugWidget.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/UI/UI_UHL_DebugWidget.uasset -------------------------------------------------------------------------------- /Content/UI/WBP_DrawDebugBar_Test.uasset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Content/UI/WBP_DrawDebugBar_Test.uasset -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Pavel Penkov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Resources/Icon128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ciberusps/unreal-helper-library/b540c0be8c40a4eedcea1a9cbee5de27aef58ce8/Resources/Icon128.png -------------------------------------------------------------------------------- /Resources/PlaceholderButtonIcon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Source/CommonMaps/CommonMaps.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class CommonMaps : ModuleRules 6 | { 7 | public CommonMaps(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicDependencyModuleNames.AddRange(new string[] 12 | { 13 | "Core", 14 | "DeveloperSettings", 15 | "PropertyEditor", 16 | } 17 | ); 18 | 19 | PrivateDependencyModuleNames.AddRange(new string[] 20 | { 21 | "CoreUObject", 22 | "Engine", 23 | "Slate", 24 | "SlateCore", 25 | "UnrealEd", 26 | "AssetTools", 27 | "ToolMenus", 28 | "DesktopWidgets", 29 | } 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Source/CommonMaps/Private/CommonMapsDeveloperSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "CommonMapsDeveloperSettings.h" 4 | 5 | -------------------------------------------------------------------------------- /Source/CommonMaps/Public/CommonMaps.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class FCommonMapsModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | 15 | private: 16 | void ExtendContextMenu(); 17 | void AddToCommonMapsFromMenu(FName CategoryName); 18 | void CreateCategorySelectionSubmenu(FMenuBuilder& MenuBuilder); 19 | }; 20 | -------------------------------------------------------------------------------- /Source/CommonMaps/Public/CommonMapsDeveloperSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "CommonMapsDeveloperSettings.generated.h" 7 | 8 | USTRUCT(BlueprintType) 9 | struct FCommonMapCategory 10 | { 11 | GENERATED_BODY() 12 | 13 | public: 14 | FCommonMapCategory() = default; 15 | explicit FCommonMapCategory(FName CategoryName_In, const TArray& InPaths) 16 | : Name(CategoryName_In), Maps({ InPaths }) {}; 17 | 18 | UPROPERTY(EditAnywhere, Category="CommonMapCategory") 19 | FName Name = ""; 20 | 21 | UPROPERTY(EditAnywhere, Category="CommonMapCategory") 22 | bool bAutoSearchMapsInFolder = false; 23 | 24 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CommonMapCategory", meta=(ContentDir, EditCondition="bAutoSearchMapsInFolder", EditConditionHides)) 25 | FDirectoryPath SearchFolder; 26 | 27 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CommonMapCategory", meta=(EditCondition="bAutoSearchMapsInFolder", EditConditionHides)) 28 | int32 SubmenuDepth = 1; 29 | 30 | UPROPERTY(EditAnywhere, Category="CommonMapCategory", meta=(AllowedClasses="/Script/Engine.World", TitleProperty="Name")) 31 | TArray Maps = {}; 32 | 33 | bool operator==(const FCommonMapCategory& Other) const 34 | { 35 | return Name == Other.Name; 36 | } 37 | bool operator==(const FName& Other) const 38 | { 39 | return Name == Other; 40 | } 41 | }; 42 | 43 | /** 44 | * TODO: add rescan folders button 45 | */ 46 | UCLASS(config="Game", DefaultConfig, DisplayName="Common Maps") 47 | class COMMONMAPS_API UCommonMapsDeveloperSettings : public UDeveloperSettings 48 | { 49 | GENERATED_BODY() 50 | 51 | public: 52 | virtual FName GetCategoryName() const override { return FName("Plugins"); } 53 | 54 | #if WITH_EDITORONLY_DATA 55 | UPROPERTY(Config,EditAnywhere, Category="Common Maps", meta=(ForceInlineRow)) 56 | TArray MapsCategories; 57 | #endif 58 | }; 59 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Components/UHLAIPerceptionComponent.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Components/UHLAIPerceptionComponent.h" 5 | 6 | #include "Perception/AISense_Sight.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIPerceptionComponent) 9 | 10 | void UUHLAIPerceptionComponent::HandleExpiredStimulus(FAIStimulus& StimulusStore) 11 | { 12 | Super::HandleExpiredStimulus(StimulusStore); 13 | 14 | TSubclassOf StimulusClass = UAIPerceptionSystem::GetSenseClassForStimulus(GetWorld(), StimulusStore); 15 | if (StimulusClass == UAISense_Sight::StaticClass()) 16 | { 17 | if (OnSightStimulusExpired.IsBound()) 18 | { 19 | OnSightStimulusExpired.Broadcast(StimulusStore); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Core/UHLAIActorSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Core/UHLAIActorSettings.h" 5 | 6 | // Add default functionality here for any IUHLActorSettings functions that are not pure virtual. 7 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIActorSettings) -------------------------------------------------------------------------------- /Source/UHLAI/Private/Core/UHLAIDebugSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "Core/UHLAIDebugSettings.h" 4 | 5 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Core/UHLBlackboardValueType.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Core/UHLBlackboardValueType.h" -------------------------------------------------------------------------------- /Source/UHLAI/Private/Decorators/BTD_LoopRandomCount.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Decorators/BTD_LoopRandomCount.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BTD_LoopRandomCount) 7 | 8 | UBTD_LoopRandomCount::UBTD_LoopRandomCount(const FObjectInitializer& ObjectInitializer) 9 | : Super(ObjectInitializer) 10 | { 11 | NodeName = "Loop_RandomCount"; 12 | NumLoops = 3; 13 | } 14 | 15 | FString UBTD_LoopRandomCount::GetStaticDescription() const 16 | { 17 | return FString::Printf(TEXT("Loops: %d-%d loops"), Range.Min, Range.Max); 18 | } 19 | 20 | void UBTD_LoopRandomCount::OnNodeActivation(FBehaviorTreeSearchData& SearchData) 21 | { 22 | NumLoops = FMath::RandRange(Range.Min, Range.Max); 23 | Super::OnNodeActivation(SearchData); 24 | } 25 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Services/BTS_GameplayFocus.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Services/BTS_GameplayFocus.h" 5 | 6 | #include "GameFramework/Actor.h" 7 | #include "BehaviorTree/BlackboardComponent.h" 8 | #include "BehaviorTree/BehaviorTreeComponent.h" 9 | #include "BehaviorTree/BehaviorTreeTypes.h" 10 | #include "BehaviorTree/Services/BTService_DefaultFocus.h" 11 | #include "AIController.h" 12 | 13 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BTS_GameplayFocus) 14 | 15 | UBTS_GameplayFocus::UBTS_GameplayFocus(const FObjectInitializer& ObjectInitializer) 16 | : Super(ObjectInitializer) 17 | { 18 | NodeName = "Set Gameplay Focus"; 19 | FocusPriority = EAIFocusPriority::Gameplay; 20 | } 21 | 22 | #if UE_VERSION_NEWER_THAN(5, 4, 0) 23 | void UBTS_GameplayFocus::InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const 24 | { 25 | InitializeNodeMemory(NodeMemory, InitType); 26 | } 27 | 28 | void UBTS_GameplayFocus::CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const 29 | { 30 | CleanupNodeMemory(NodeMemory, CleanupType); 31 | } 32 | #endif 33 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Tasks/BTT_ClearFocus.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Tasks/BTT_ClearFocus.h" 5 | #include "AIController.h" 6 | 7 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_ClearFocus) 8 | 9 | UBTT_ClearFocus::UBTT_ClearFocus(const FObjectInitializer& ObjectInitializer) 10 | : Super(ObjectInitializer) 11 | { 12 | NodeName = "ClearFocus"; 13 | } 14 | 15 | EBTNodeResult::Type UBTT_ClearFocus::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) 16 | { 17 | TObjectPtr AIOwner = OwnerComp.GetAIOwner(); 18 | if (!AIOwner.Get()) 19 | { 20 | AIOwner.Get()->ClearFocus(EAIFocusPriority::Gameplay); 21 | } 22 | 23 | return Super::ExecuteTask(OwnerComp, NodeMemory); 24 | } 25 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/Tasks/BTT_DebugPrintString.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Tasks/BTT_DebugPrintString.h" 5 | #include "Kismet/KismetSystemLibrary.h" 6 | 7 | #include UE_INLINE_GENERATED_CPP_BY_NAME(BTT_DebugPrintString) 8 | 9 | UBTT_DebugPrintString::UBTT_DebugPrintString(const FObjectInitializer& ObjectInitializer) 10 | : Super(ObjectInitializer) 11 | { 12 | NodeName = "DebugPrintString"; 13 | } 14 | 15 | EBTNodeResult::Type UBTT_DebugPrintString::ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) 16 | { 17 | UKismetSystemLibrary::PrintString( 18 | nullptr, GetFinalString(), 19 | true, true, 20 | Color, Duration, Key 21 | ); 22 | return Super::ExecuteTask(OwnerComp, NodeMemory); 23 | } 24 | 25 | FString UBTT_DebugPrintString::GetStaticDescription() const 26 | { 27 | return FString::Printf(TEXT("%s: \"%s\""), *Super::GetStaticDescription(), *GetFinalString()); 28 | } 29 | 30 | FString UBTT_DebugPrintString::GetFinalString() const 31 | { 32 | FString Result = ""; 33 | for (FString PrintString : PrintStrings) 34 | { 35 | Result.Append(PrintString); 36 | } 37 | return Result; 38 | } 39 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/UHLAI.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLAI.h" 4 | 5 | #include "Misc/Paths.h" 6 | 7 | #define LOCTEXT_NAMESPACE "FUHLAIModule" 8 | 9 | 10 | void FUHLAIModule::StartupModule() 11 | { 12 | } 13 | 14 | void FUHLAIModule::ShutdownModule() 15 | { 16 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 17 | // we call this function before unloading the module. 18 | } 19 | 20 | #undef LOCTEXT_NAMESPACE 21 | 22 | IMPLEMENT_MODULE(FUHLAIModule, UHLAI) 23 | -------------------------------------------------------------------------------- /Source/UHLAI/Private/UHLAIBlueprintLibrary.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLAIBlueprintLibrary.h" 4 | 5 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Bool.h" 6 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Class.h" 7 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Enum.h" 8 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Float.h" 9 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Int.h" 10 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Name.h" 11 | #include "BehaviorTree/Blackboard/BlackboardKeyType_NativeEnum.h" 12 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Object.h" 13 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Rotator.h" 14 | #include "BehaviorTree/Blackboard/BlackboardKeyType_String.h" 15 | #include "BehaviorTree/Blackboard/BlackboardKeyType_Vector.h" 16 | 17 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAIBlueprintLibrary) 18 | 19 | 20 | EBlackboardValueType UUHLAIBlueprintLibrary::BlackboardKeyToBBValueType(FBlackboardKeySelector BlackboardKey) 21 | { 22 | EBlackboardValueType Result = EBlackboardValueType::None; 23 | 24 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Bool::StaticClass()) 25 | { 26 | Result = EBlackboardValueType::Bool; 27 | } 28 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Int::StaticClass()) 29 | { 30 | Result = EBlackboardValueType::Int; 31 | } 32 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Float::StaticClass()) 33 | { 34 | Result = EBlackboardValueType::Float; 35 | } 36 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_String::StaticClass()) 37 | { 38 | Result = EBlackboardValueType::String; 39 | } 40 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Name::StaticClass()) 41 | { 42 | Result = EBlackboardValueType::Name; 43 | } 44 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Vector::StaticClass()) 45 | { 46 | Result = EBlackboardValueType::Vector; 47 | } 48 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Rotator::StaticClass()) 49 | { 50 | Result = EBlackboardValueType::Rotator; 51 | } 52 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Enum::StaticClass()) 53 | { 54 | Result = EBlackboardValueType::Enum; 55 | } 56 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_NativeEnum::StaticClass()) 57 | { 58 | Result = EBlackboardValueType::NativeEnum; 59 | } 60 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Object::StaticClass()) 61 | { 62 | Result = EBlackboardValueType::Object; 63 | } 64 | if (BlackboardKey.SelectedKeyType == UBlackboardKeyType_Class::StaticClass()) 65 | { 66 | Result = EBlackboardValueType::Class; 67 | } 68 | 69 | return Result; 70 | } -------------------------------------------------------------------------------- /Source/UHLAI/Private/UHLAIBlueprintLibrary.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Core/UHLBlackboardValueType.h" 6 | #include "Kismet/BlueprintFunctionLibrary.h" 7 | #include "UHLAIBlueprintLibrary.generated.h" 8 | 9 | class UWidget; 10 | struct FBlackboardKeySelector; 11 | 12 | /* 13 | * Function library class. 14 | * Each function in it is expected to be static and represents blueprint node that can be called in any blueprint. 15 | * 16 | * When declaring function you can define metadata for the node. Key function specifiers will be BlueprintPure and BlueprintCallable. 17 | * BlueprintPure - means the function does not affect the owning object in any way and thus creates a node without Exec pins. 18 | * BlueprintCallable - makes a function which can be executed in Blueprints - Thus it has Exec pins. 19 | * DisplayName - full name of the node, shown when you mouse over the node and in the blueprint drop down menu. 20 | * Its lets you name the node using characters not allowed in C++ function names. 21 | * CompactNodeTitle - the word(s) that appear on the node. 22 | * Keywords - the list of keywords that helps you to find node when you search for it using Blueprint drop-down menu. 23 | * Good example is "Print String" node which you can find also by using keyword "log". 24 | * Category - the category your node will be under in the Blueprint drop-down menu. 25 | * 26 | * For more info on custom blueprint nodes visit documentation: 27 | * https://wiki.unrealengine.com/Custom_Blueprint_Node_Creation 28 | */ 29 | UCLASS() 30 | class UHLAI_API UUHLAIBlueprintLibrary : public UBlueprintFunctionLibrary 31 | { 32 | GENERATED_BODY() 33 | 34 | public: 35 | static EBlackboardValueType BlackboardKeyToBBValueType(FBlackboardKeySelector BlackboardKey); 36 | }; 37 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Components/UHLAIPerceptionComponent.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Perception/AIPerceptionComponent.h" 7 | #include "UHLAIPerceptionComponent.generated.h" 8 | 9 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnSightStimulusExpired, const FAIStimulus&, StimulusStore); 10 | 11 | /** 12 | * 13 | */ 14 | UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) 15 | class UHLAI_API UUHLAIPerceptionComponent : public UAIPerceptionComponent 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | virtual void HandleExpiredStimulus(FAIStimulus& StimulusStore) override; 21 | 22 | UPROPERTY(BlueprintAssignable, Category="UHL AIPerceptionComponent") 23 | FOnSightStimulusExpired OnSightStimulusExpired; 24 | }; 25 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Composite/BTC_RandomSelector.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/ObjectMacros.h" 7 | #include "BehaviorTree/BTCompositeNode.h" 8 | #include "BehaviorTree/BehaviorTreeTypes.h" 9 | #include "Misc/EngineVersionComparison.h" 10 | #include "BTC_RandomSelector.generated.h" 11 | 12 | class UBehaviorTreeComponent; 13 | 14 | // Should nest from "FBTCompositeMemory" or build error fail on FAB servers 15 | // struct FBTRandomSelectorMemory : public FBTCompositeMemory 16 | // { 17 | // }; 18 | 19 | /** 20 | * RandomSelector composite node. 21 | * RandomSelector random between child nodes using chances, and will stop executing its children when one of their children succeeds. 22 | * If a Selector's child succeeds, the Selector succeeds. If all the Selector's children fail, the Selector fails. 23 | * P.S. space for improvement - memory, but not sure that its required, 24 | * just random until we get valid node is seems looks like is enough 25 | * https://www.youtube.com/watch?v=wI_kwwvc-pw&t=781s&ab_channel=VeryHotShark 26 | */ 27 | UCLASS(Category = "UnrealHelperLibrary") 28 | class UHLAI_API UBTC_RandomSelector : public UBTCompositeNode 29 | { 30 | GENERATED_BODY() 31 | 32 | public: 33 | UBTC_RandomSelector(const FObjectInitializer& ObjectInitializer); 34 | 35 | // TODO validate that chances count == ChildrenNum 36 | // if no chance specified, node without chance will win always 37 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="RandomSelector", meta=(ForceUnits="Multiplier")) 38 | TArray ChancesArray = { 0.5f, 0.5f }; 39 | 40 | UFUNCTION(BlueprintCallable, CallInEditor, Category="RandomSelector") 41 | void RemoveUnusedChances(); 42 | 43 | protected: 44 | virtual int32 GetNextChildHandler(struct FBehaviorTreeSearchData& SearchData, int32 PrevChild, EBTNodeResult::Type LastResult) const override; 45 | virtual FString GetStaticDescription() const override; 46 | 47 | #if WITH_EDITOR 48 | virtual FName GetNodeIconName() const override; 49 | #endif 50 | 51 | #if UE_VERSION_NEWER_THAN(5, 4, 0) 52 | // 5.4.0 and up only code 53 | virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override; 54 | virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override; 55 | #endif 56 | 57 | private: 58 | UFUNCTION() 59 | bool IsValidSelector() const { return GetChildrenNum() > 1 && GetChildrenNum() <= ChancesArray.Num(); }; 60 | UFUNCTION() 61 | FString GetErrorOrWarning() const; 62 | UFUNCTION() 63 | int32 GetRandomChildIdx() const; 64 | 65 | }; 66 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Core/UHLAIActorSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Data/TurnSettings.h" 7 | #include "UObject/Interface.h" 8 | #include "UHLAIActorSettings.generated.h" 9 | 10 | // This class does not need to be modified. 11 | UINTERFACE(MinimalAPI) 12 | class UUHLAIActorSettings : public UInterface 13 | { 14 | GENERATED_BODY() 15 | }; 16 | 17 | /** 18 | * 19 | */ 20 | class UHLAI_API IUHLAIActorSettings 21 | { 22 | GENERATED_BODY() 23 | 24 | // Add interface functions to this class. This is the class that will be inherited to implement this interface. 25 | public: 26 | 27 | /** IUHLActorSettings */ 28 | UFUNCTION(Category="UHLActorSettings", BlueprintCallable, BlueprintNativeEvent) 29 | FTurnSettings GetTurnSettings() const; 30 | /** ~IUHLActorSettings */ 31 | }; 32 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Core/UHLAIDebugSettings.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | #include "BehaviorTree/ValueOrBBKey.h" 3 | 4 | #include "UHLAIDebugSettings.generated.h" 5 | 6 | // struct for easier creating BBValue + BBValue math operations 7 | USTRUCT(BlueprintType) 8 | struct FUHLAIDebugSettings 9 | { 10 | GENERATED_BODY() 11 | 12 | UPROPERTY(Category="Decorator", EditAnywhere) 13 | bool bEnableDebug = false; 14 | 15 | UPROPERTY(Category="Decorator", EditAnywhere) 16 | FValueOrBBKey_Float DrawDebugTime = 2.0f; 17 | 18 | UPROPERTY(Category="Decorator", EditAnywhere) 19 | FColor Color = FLinearColor(0, 0.66, 1).ToFColor(true); 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Core/UHLBlackboardValueType.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #pragma once 5 | 6 | #include "UHLBlackboardValueType.generated.h" 7 | 8 | UENUM() 9 | enum class EBlackboardValueType 10 | { 11 | None, 12 | Bool, 13 | Int, 14 | Float, 15 | String, 16 | Name, 17 | Vector, 18 | Rotator, 19 | Enum, 20 | NativeEnum, 21 | Object, 22 | Class, 23 | }; -------------------------------------------------------------------------------- /Source/UHLAI/Public/Decorators/BTD_Base.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/BehaviorTreeTypes.h" 7 | #include "BehaviorTree/BTDecorator.h" 8 | #include "BTD_Base.generated.h" 9 | 10 | /** 11 | * Used to add abort functionality to BTDecorators 12 | */ 13 | UCLASS(Category = "UnrealHelperLibrary", Abstract) 14 | class UHLAI_API UBTD_Base : public UBTDecorator 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UBTD_Base(const FObjectInitializer& ObjectInitializer); 20 | 21 | FString GetPropertiesDetails() const; 22 | /** notify about changes in blackboard */ 23 | virtual EBlackboardNotificationResult OnBlackboardKeyValueChange(const UBlackboardComponent& Blackboard, FBlackboard::FKey ChangedKeyID); 24 | 25 | protected: 26 | // BTDecorator_BlueprintBase 27 | enum class EAbortType : uint8 28 | { 29 | NoAbort, 30 | ActivateBranch, 31 | DeactivateBranch, 32 | Unknown, 33 | }; 34 | /** gets set to true if decorator declared BB keys it can potentially observe */ 35 | uint32 bIsObservingBB : 1; 36 | /** blackboard key names that should be observed */ 37 | UPROPERTY() 38 | TArray ObservedKeyNames; 39 | /** properties with runtime values, stored only in class default object */ 40 | TArray PropertyData; 41 | /** show detailed information about properties */ 42 | UPROPERTY(EditInstanceOnly, Category=Description) 43 | bool bShowPropertyDetails = true; 44 | /** return this decorator abort type in current circumstances */ 45 | EAbortType EvaluateAbortType(UBehaviorTreeComponent& OwnerComp) const; 46 | void RequestAbort(UBehaviorTreeComponent& OwnerComp, const EAbortType Type); 47 | 48 | virtual void PostLoad() override; 49 | virtual void OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 50 | 51 | /** initialize data about blueprint defined properties 52 | * copy-paste from UBTDecorator_BlueprintBase 53 | */ 54 | virtual void InitializeProperties(); 55 | 56 | /** setup node name 57 | * copy-paste from UBTDecorator_BlueprintBase 58 | */ 59 | virtual void PostInitProperties() override; 60 | // ~BTDecorator_BlueprintBase 61 | }; 62 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Decorators/BTD_CheckGASGameplayTagsOnActor.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BTD_Base.h" 7 | #include "BehaviorTree/BTDecorator.h" 8 | #include "BTD_CheckGASGameplayTagsOnActor.generated.h" 9 | 10 | /** 11 | * Actor should implement "IAbilitySystemInterface" to get AbilitySystemComponent 12 | */ 13 | UCLASS(Category = "UnrealHelperLibrary", DisplayName="Check GAS Gameplay Tags On Actor") 14 | class UHLAI_API UBTD_CheckGASGameplayTagsOnActor : public UBTD_Base 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UBTD_CheckGASGameplayTagsOnActor(const FObjectInitializer& ObjectInitializer); 20 | 21 | virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override; 22 | virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override; 23 | virtual FString GetStaticDescription() const override; 24 | 25 | protected: 26 | UPROPERTY(EditAnywhere, Category="GameplayTagCheck", Meta=(ToolTips="Which Actor (from the blackboard) should be checked for these GAS gameplay tags?")) 27 | struct FBlackboardKeySelector ActorToCheck; 28 | 29 | UPROPERTY(EditAnywhere, Category="GameplayTagCheck") 30 | EGameplayContainerMatchType TagsToMatch; 31 | 32 | UPROPERTY(EditAnywhere, Category="GameplayTagCheck") 33 | FGameplayTagContainer GameplayTags; 34 | 35 | /** cached description */ 36 | UPROPERTY() 37 | FString CachedDescription; 38 | 39 | #if WITH_EDITOR 40 | /** describe decorator and cache it */ 41 | virtual void BuildDescription(); 42 | 43 | virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override; 44 | #endif 45 | 46 | virtual void InitializeFromAsset(UBehaviorTree& Asset) override; 47 | virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override; 48 | }; 49 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Decorators/BTD_GameplayEffectCooldown.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2024 NextGenium 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayEffect.h" 7 | #include "Decorators/BTD_Base.h" 8 | #include "BTD_GameplayEffectCooldown.generated.h" 9 | 10 | struct FBTGameplayEffectCooldownDecoratorMemory 11 | { 12 | double LastUseTimestamp; 13 | uint8 bRequestedRestart : 1; 14 | }; 15 | 16 | /** 17 | * TODO: finish node StaticDescription, Runtime and so on 18 | * Actor should implement "IAbilitySystemInterface" 19 | */ 20 | UCLASS() 21 | class UHLAI_API UBTD_GameplayEffectCooldown : public UBTD_Base 22 | { 23 | GENERATED_BODY() 24 | 25 | public: 26 | UBTD_GameplayEffectCooldown(const FObjectInitializer& ObjectInitializer); 27 | 28 | // Tag used in GameplayEffect to check cooldown 29 | UPROPERTY(Category="Decorator", EditAnywhere) 30 | FGameplayTag CooldownGameplayEffectTag; 31 | 32 | // TODO: make option to check cooldowns by this query 33 | // UPROPERTY(Category="Decorator", EditAnywhere) 34 | // FGameplayEffectQuery GameplayEffectQuery; 35 | 36 | virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override; 37 | virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override; 38 | virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override; 39 | virtual uint16 GetInstanceMemorySize() const override; 40 | virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override; 41 | virtual FString GetStaticDescription() const override; 42 | 43 | #if WITH_EDITOR 44 | virtual FName GetNodeIconName() const override; 45 | #endif // WITH_EDITOR 46 | 47 | protected: 48 | virtual void OnNodeDeactivation(FBehaviorTreeSearchData& SearchData, EBTNodeResult::Type NodeResult) override; 49 | virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override; 50 | 51 | }; 52 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Decorators/BTD_LoopRandomCount.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/Decorators/BTDecorator_Loop.h" 7 | #include "BTD_LoopRandomCount.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Category = "UnrealHelperLibrary", hidecategories="Decorator") 13 | class UHLAI_API UBTD_LoopRandomCount : public UBTDecorator_Loop 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UBTD_LoopRandomCount(const FObjectInitializer& ObjectInitializer); 19 | 20 | /** number of executions */ 21 | UPROPERTY(EditAnywhere, Category="LoopRandomCount", meta=(EditCondition="!bInfiniteLoop", ClampMin="1", ClampMax="255")) 22 | FInt32Interval Range = FInt32Interval(2, 4); 23 | 24 | protected: 25 | virtual void OnNodeActivation(FBehaviorTreeSearchData& SearchData) override; 26 | virtual FString GetStaticDescription() const override; 27 | 28 | }; 29 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Decorators/BTD_TimeLimitRandom.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/Decorators/BTDecorator_TimeLimit.h" 7 | #include "Misc/EngineVersionComparison.h" 8 | #include "BehaviorTree/BTDecorator.h" 9 | #include "UObject/ObjectMacros.h" 10 | #include "BehaviorTree/BehaviorTree.h" 11 | #include "Misc/EngineVersionComparison.h" 12 | #include "BTD_TimeLimitRandom.generated.h" 13 | 14 | 15 | struct FBTimeLimitMemoryRandom 16 | { 17 | }; 18 | 19 | /** 20 | * In UE5.4 changed completely now we can't nest from "TimeLimit" and forced to copy-paste same functionality 21 | */ 22 | UCLASS(Category = "UnrealHelperLibrary", hidecategories="Decorator") 23 | class UHLAI_API UBTD_TimeLimitRandom : public UBTDecorator 24 | { 25 | GENERATED_BODY() 26 | 27 | public: 28 | UBTD_TimeLimitRandom(const FObjectInitializer& ObjectInitializer); 29 | 30 | /** TimeLimit */ 31 | UPROPERTY(EditAnywhere, Category="TimeLimitRandom", meta=(ClampMin="0")) 32 | FFloatInterval TimeLimitRange = FFloatInterval(3.0f, 5.0f); 33 | UPROPERTY(EditAnywhere, Category="TimeLimitRandom") 34 | bool bUseIntegers = true; 35 | 36 | virtual FString GetStaticDescription() const override; 37 | 38 | #if UE_VERSION_NEWER_THAN(5, 4, 0) 39 | virtual void DescribeRuntimeValues(const UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTDescriptionVerbosity::Type Verbosity, TArray& Values) const override; 40 | #if WITH_EDITOR 41 | virtual FName GetNodeIconName() const override; 42 | #endif // WITH_EDITOR 43 | #endif 44 | 45 | protected: 46 | virtual void OnNodeActivation(FBehaviorTreeSearchData& SearchData) override; 47 | 48 | #if UE_VERSION_NEWER_THAN(5, 4, 0) 49 | // 5.4.0 and up only code 50 | virtual uint16 GetInstanceMemorySize() const override; 51 | virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override; 52 | virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override; 53 | 54 | virtual void OnBecomeRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 55 | virtual void OnCeaseRelevant(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 56 | virtual bool CalculateRawConditionValue(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) const override; 57 | virtual void TickNode(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, float DeltaSeconds) override; 58 | #endif 59 | 60 | private: 61 | /** max allowed time for execution of underlying node */ 62 | UPROPERTY(EditAnywhere, Category="Decorator") 63 | float TimeLimit; 64 | }; 65 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Services/BTS_GameplayFocus.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Misc/EngineVersionComparison.h" 7 | #include "BehaviorTree/BehaviorTreeTypes.h" 8 | #include "BehaviorTree/Services/BTService_DefaultFocus.h" 9 | #include "BTS_GameplayFocus.generated.h" 10 | 11 | class UBehaviorTreeComponent; 12 | 13 | /** 14 | * Prevents rotation jittering while moving to enemy 15 | * Requires to turned on "UseControllerDesiredRotation" 16 | * Requires to turn off "UseControllerRotationYaw"/"UseControllerRotationPitch"/"UseControllerRotationRoll" 17 | * Troubleshooting: 18 | * - Check that nothing "ClearFocus" when thinks that it don't work 19 | * - Check that MoveTo uses "AllowStafe"(low chances to get work, in tests it don't block from strafing) 20 | */ 21 | UCLASS(Category = "UnrealHelperLibrary") 22 | class UHLAI_API UBTS_GameplayFocus : public UBTService_DefaultFocus 23 | { 24 | GENERATED_BODY() 25 | 26 | public: 27 | UBTS_GameplayFocus(const FObjectInitializer& ObjectInitializer); 28 | 29 | #if UE_VERSION_NEWER_THAN(5, 4, 0) 30 | virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override; 31 | virtual void CleanupMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryClear::Type CleanupType) const override; 32 | #endif 33 | }; 34 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Tasks/BTT_ClearFocus.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/BTTaskNode.h" 7 | #include "BTT_ClearFocus.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Category = "UnrealHelperLibrary") 13 | class UHLAI_API UBTT_ClearFocus : public UBTTaskNode 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UBTT_ClearFocus(const FObjectInitializer& ObjectInitializer); 19 | 20 | // not possible to expose "EAIFocusPriority::Type" 21 | // by default clears Gameplay level priority 22 | // UPROPERTY(Category="Decorator", EditAnywhere) 23 | // EAIFocusPriority::Type Priority = (uint8)EAIFocusPriority::Gameplay; 24 | 25 | virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 26 | }; 27 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Tasks/BTT_DebugPrintBBValue.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/BTTaskNode.h" 7 | #include "BTT_DebugPrintBBValue.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Category = "UnrealHelperLibrary") 13 | class UHLAI_API UBTT_DebugPrintBBValue : public UBTTaskNode 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UBTT_DebugPrintBBValue(const FObjectInitializer& ObjectInitializer); 19 | 20 | UPROPERTY(Category="Decorator", EditAnywhere) 21 | FBlackboardKeySelector BlackboardKey; 22 | 23 | UPROPERTY(Category="Decorator", EditAnywhere) 24 | float Duration = 3.5f; 25 | 26 | UPROPERTY(Category="Decorator", EditAnywhere) 27 | FLinearColor Color = FLinearColor(0, 0.66, 1);; 28 | 29 | UPROPERTY(Category="Decorator", EditAnywhere) 30 | FName Key = NAME_None; 31 | 32 | virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 33 | FString GetBBKeyDescription(UBehaviorTreeComponent& OwnerComp); 34 | virtual FString GetStaticDescription() const override; 35 | }; 36 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Tasks/BTT_DebugPrintString.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/BTTaskNode.h" 7 | #include "BehaviorTree/ValueOrBBKey.h" 8 | #include "BTT_DebugPrintString.generated.h" 9 | 10 | /** 11 | * 12 | */ 13 | UCLASS(Category = "UnrealHelperLibrary") 14 | class UHLAI_API UBTT_DebugPrintString : public UBTTaskNode 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UBTT_DebugPrintString(const FObjectInitializer& ObjectInitializer); 20 | 21 | UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditFixedSize, MultiLine, FullyExpand=true)) 22 | TArray PrintStrings = { 23 | FValueOrBBKey_String(""), 24 | FValueOrBBKey_String(""), 25 | FValueOrBBKey_String("") 26 | }; 27 | 28 | UPROPERTY(Category="Decorator", EditAnywhere) 29 | FValueOrBBKey_Float Duration = 3.5f; 30 | 31 | UPROPERTY(Category="Decorator", EditAnywhere) 32 | FLinearColor Color = FLinearColor(0, 0.66, 1); 33 | 34 | UPROPERTY(Category="Decorator", EditAnywhere) 35 | FValueOrBBKey_Name Key = FValueOrBBKey_Name(); 36 | 37 | virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 38 | virtual FString GetStaticDescription() const override; 39 | 40 | private: 41 | FString GetFinalString() const; 42 | }; 43 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Tasks/BTT_FireGameplayEvent.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/BTTaskNode.h" 7 | #include "BTT_FireGameplayEvent.generated.h" 8 | 9 | struct FBlackboardKeySelector; 10 | 11 | /** 12 | * 13 | */ 14 | UCLASS(Category = "UnrealHelperLibrary") 15 | class UHLAI_API UBTT_FireGameplayEvent : public UBTTaskNode 16 | { 17 | GENERATED_BODY() 18 | 19 | 20 | public: 21 | UBTT_FireGameplayEvent(const FObjectInitializer& ObjectInitializer); 22 | 23 | UPROPERTY(EditAnywhere, Category="Blackboard") 24 | FGameplayTag EventTag = FGameplayTag::EmptyTag; 25 | 26 | UPROPERTY(EditAnywhere, Category="Blackboard") 27 | FBlackboardKeySelector Target; 28 | 29 | UPROPERTY(EditAnywhere, Category="Blackboard") 30 | FBlackboardKeySelector Instigator; 31 | 32 | UPROPERTY(EditAnywhere, Category="Blackboard") 33 | FBlackboardKeySelector OptionalObject; 34 | 35 | UPROPERTY(EditAnywhere, Category="Blackboard") 36 | FBlackboardKeySelector OptionalObject2; 37 | 38 | // tags that required on instigator to fire event ?? 39 | UPROPERTY(EditAnywhere, Category="Blackboard") 40 | FGameplayTagContainer InstigatorTags = {}; 41 | 42 | // tags that required on target to fire event ?? 43 | UPROPERTY(EditAnywhere, Category="Blackboard") 44 | FGameplayTagContainer TargetTags = {}; 45 | 46 | UPROPERTY(EditAnywhere, Category="Blackboard") 47 | float EventMagnitude = 0.0f; 48 | 49 | virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 50 | 51 | virtual FString GetStaticDescription() const override; 52 | }; 53 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/Tasks/BTT_InvokeGameplayAbility.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLValueOrBBKey_GameplayTag.h" 7 | #include "Abilities/GameplayAbilityTypes.h" 8 | #include "BehaviorTree/BTTaskNode.h" 9 | #include "BTT_InvokeGameplayAbility.generated.h" 10 | 11 | class IAbilitySystemInterface; 12 | 13 | struct FInvokeGameplayAbilityMemory 14 | { 15 | FDelegateHandle AbilityEndHandle; 16 | }; 17 | 18 | /** 19 | * TODO Invoke by Class option? 20 | * 1) tbh its bad practice to have hard refs on classes, 21 | * no need in this options, better to force good practices - dont hard ref abilities 22 | * 2) it brokes good architechture/behaviorTrees reusability if we hard ref ability 23 | * it means that nested abilities can't be activated, with activation by tag 24 | * all enemies can have different abilities implementation using same tag 25 | */ 26 | UCLASS(Category = "UnrealHelperLibrary") 27 | class UHLAI_API UBTT_InvokeGameplayAbility : public UBTTaskNode 28 | { 29 | GENERATED_BODY() 30 | 31 | public: 32 | UBTT_InvokeGameplayAbility(const FObjectInitializer& ObjectInitializer); 33 | 34 | UPROPERTY(Category="Blackboard", EditAnywhere) 35 | FUHLValueOrBBKey_GameplayTag GameplayTag; 36 | 37 | UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "Activate") 38 | FValueOrBBKey_Bool bActivate = true; 39 | 40 | UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "WaitForFinishing") 41 | FValueOrBBKey_Bool bWaitForFinishing = true; 42 | 43 | UPROPERTY(Category="Blackboard", EditAnywhere, DisplayName = "DebugMessages") 44 | FValueOrBBKey_Bool bDebugMessages = false; 45 | 46 | /** Cancelled ability should be handled as success. */ 47 | UPROPERTY(EditAnywhere, Category = "Gameplay Ability Activation", DisplayName = "TreatCancelledAbilityAsSuccess") 48 | FValueOrBBKey_Bool bTreatCancelledAbilityAsSuccess = false; 49 | 50 | virtual EBTNodeResult::Type ExecuteTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 51 | virtual EBTNodeResult::Type AbortTask(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory) override; 52 | virtual void OnTaskFinished(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTNodeResult::Type TaskResult) override; 53 | 54 | virtual void InitializeMemory(UBehaviorTreeComponent& OwnerComp, uint8* NodeMemory, EBTMemoryInit::Type InitType) const override; 55 | virtual uint16 GetInstanceMemorySize() const override { return sizeof(FInvokeGameplayAbilityMemory); }; 56 | 57 | virtual FString GetStaticDescription() const override; 58 | 59 | private: 60 | bool bIsAborting = false; 61 | 62 | UFUNCTION() 63 | void OnAbilityEnded(const FAbilityEndedData& AbilityEndedData, UBehaviorTreeComponent* OwnerComp); 64 | }; 65 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/UHLAI.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FUHLAIModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | }; 15 | -------------------------------------------------------------------------------- /Source/UHLAI/Public/UHLValueOrBBKey_GameplayTag.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "BehaviorTree/ValueOrBBKey.h" 7 | #include "UHLValueOrBBKey_GameplayTag.generated.h" 8 | 9 | // TODO: Looks like there is same thing(not sure) in 10 | // Experimental/GameplayBehaviors/Source/GameplayBehaviorsModule/Public/AI/ValueOrBBKey_GameplayTag.h 11 | 12 | USTRUCT(BlueprintType, Category = "UnrealHelperLibrary") 13 | struct UHLAI_API FUHLValueOrBBKey_GameplayTag : public FValueOrBlackboardKeyBase 14 | { 15 | GENERATED_BODY() 16 | 17 | FUHLValueOrBBKey_GameplayTag(FGameplayTag Default = FGameplayTag::EmptyTag) 18 | : DefaultValue(Default) {} 19 | FGameplayTag GetValue(const UBehaviorTreeComponent& BehaviorComp) const; 20 | FGameplayTag GetValue(const UBehaviorTreeComponent* BehaviorComp) const; 21 | FGameplayTag GetValue(const UBlackboardComponent& Blackboard) const; 22 | FGameplayTag GetValue(const UBlackboardComponent* Blackboard) const; 23 | 24 | bool SerializeFromMismatchedTag(const FPropertyTag& Tag, FStructuredArchive::FSlot Slot); 25 | 26 | #if WITH_EDITOR 27 | virtual bool IsCompatibleType(const UBlackboardKeyType* KeyType) const override; 28 | #endif // WITH_EDITOR 29 | 30 | FString ToString() const; 31 | 32 | UE_DEPRECATED_FORGAME(5.5, "Implicit conversion will be removed next version. Call GetValue instead") 33 | operator FName() const { return DefaultValue.GetTagName(); } 34 | 35 | protected: 36 | UPROPERTY(EditAnywhere, Category = "Value") 37 | FGameplayTag DefaultValue = FGameplayTag::EmptyTag; 38 | }; 39 | 40 | template <> 41 | struct TStructOpsTypeTraits : public TStructOpsTypeTraitsBase2 42 | { 43 | enum 44 | { 45 | WithStructuredSerializeFromMismatchedTag = true, 46 | }; 47 | }; 48 | -------------------------------------------------------------------------------- /Source/UHLAI/UHLAI.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLAI : ModuleRules 6 | { 7 | public UHLAI(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | "CoreUObject", 30 | 31 | "GameplayAbilities", 32 | "GameplayTags", 33 | "GameplayTasks", 34 | 35 | "AIModule", 36 | 37 | // ... add other public dependencies that you statically link with here ... 38 | } 39 | ); 40 | 41 | 42 | PrivateDependencyModuleNames.AddRange( 43 | new string[] 44 | { 45 | "Engine", 46 | 47 | // TODO: probably should be removed 48 | "UnrealHelperLibrary", 49 | 50 | "AnimGraphRuntime", 51 | } 52 | ); 53 | 54 | 55 | DynamicallyLoadedModuleNames.AddRange( 56 | new string[] 57 | { 58 | // ... add any modules that your module loads dynamically here ... 59 | } 60 | ); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Source/UHLAIEditor/Private/UHLAIEditor.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLAIEditor.h" 4 | #include "Misc/MessageDialog.h" 5 | #include "ToolMenus.h" 6 | #include "UHLAIEditorValueOrBBKeyDetails.h" 7 | 8 | static const FName UHLAIEditorTabName("UHLAIEditor"); 9 | 10 | #define LOCTEXT_NAMESPACE "FUHLAIEditorModule" 11 | 12 | void FUHLAIEditorModule::StartupModule() 13 | { 14 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 15 | 16 | // Register the details customizer 17 | FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked("PropertyEditor"); 18 | // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance)); 19 | // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance)); 20 | // PropertyModule.RegisterCustomClassLayout("BlackboardKeyType_Class", FOnGetDetailCustomizationInstance::CreateStatic(&FBlackboardKeyDetails_Class::MakeInstance)); 21 | // PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_Struct::MakeInstance)); 22 | PropertyModule.RegisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag", FOnGetPropertyTypeCustomizationInstance::CreateStatic(&FValueOrBBKeyDetails_GameplayTag::MakeInstance)); 23 | PropertyModule.NotifyCustomizationModuleChanged(); 24 | } 25 | 26 | void FUHLAIEditorModule::ShutdownModule() 27 | { 28 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 29 | // we call this function before unloading the module. 30 | 31 | // Unregister the details customization 32 | if (FModuleManager::Get().IsModuleLoaded("PropertyEditor")) 33 | { 34 | FPropertyEditorModule& PropertyModule = FModuleManager::LoadModuleChecked("PropertyEditor"); 35 | PropertyModule.UnregisterCustomPropertyTypeLayout("ValueOrBBKey_GameplayTag"); 36 | PropertyModule.NotifyCustomizationModuleChanged(); 37 | } 38 | } 39 | 40 | 41 | #undef LOCTEXT_NAMESPACE 42 | 43 | IMPLEMENT_MODULE(FUHLAIEditorModule, UHLAIEditor) 44 | -------------------------------------------------------------------------------- /Source/UHLAIEditor/Private/UHLAIEditorValueOrBBKeyDetails.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLAIEditorValueOrBBKeyDetails.h" 4 | 5 | #include "GameplayTagContainer.h" 6 | #include "IDetailChildrenBuilder.h" 7 | #include "SGameplayTagCombo.h" 8 | 9 | TSharedRef FValueOrBBKeyDetails_GameplayTag::MakeInstance() 10 | { 11 | return MakeShareable(new FValueOrBBKeyDetails_GameplayTag); 12 | } 13 | 14 | void FValueOrBBKeyDetails_GameplayTag::CustomizeChildren(TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) 15 | { 16 | if (GameplayTagProperty && GameplayTagProperty->IsEditable()) 17 | { 18 | StructBuilder.AddProperty(GameplayTagProperty.ToSharedRef()); 19 | } 20 | } 21 | 22 | TSharedRef FValueOrBBKeyDetails_GameplayTag::CreateDefaultValueWidget() 23 | { 24 | return SNew(SGameplayTagCombo) 25 | // .Visibility(this, &SGraphPin::GetDefaultValueVisibility) 26 | // .Filter(FilterString) 27 | .Tag(this, &FValueOrBBKeyDetails_GameplayTag::GetGameplayTag) 28 | .OnTagChanged(this, &FValueOrBBKeyDetails_GameplayTag::OnGameplayTagChanged); 29 | } 30 | 31 | void FValueOrBBKeyDetails_GameplayTag::OnGameplayTagChanged(const FGameplayTag NewTag) 32 | { 33 | if (DefaultValueProperty.IsValid()) 34 | { 35 | FGameplayTag TagToSet = NewTag; 36 | FString TagAsString = TagToSet.ToString(); 37 | const FPropertyAccess::Result Result = DefaultValueProperty->SetValueFromFormattedString(TagAsString); 38 | if (Result != FPropertyAccess::Success) 39 | { 40 | UE_LOG(LogTemp, Warning, TEXT("Failed to set GameplayTag value on property handle.")); 41 | } 42 | } 43 | } 44 | 45 | FGameplayTag FValueOrBBKeyDetails_GameplayTag::GetGameplayTag() const 46 | { 47 | FGameplayTag* GameplayTag = nullptr; 48 | void* StructData = nullptr; 49 | if (DefaultValueProperty->GetValueData(StructData) == FPropertyAccess::Success) 50 | { 51 | GameplayTag = reinterpret_cast(StructData); 52 | } 53 | return *GameplayTag; 54 | } 55 | -------------------------------------------------------------------------------- /Source/UHLAIEditor/Public/UHLAIEditor.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class FToolBarBuilder; 9 | class FMenuBuilder; 10 | 11 | class FUHLAIEditorModule : public IModuleInterface 12 | { 13 | public: 14 | /** IModuleInterface implementation */ 15 | virtual void StartupModule() override; 16 | virtual void ShutdownModule() override; 17 | 18 | }; 19 | -------------------------------------------------------------------------------- /Source/UHLAIEditor/Public/UHLAIEditorValueOrBBKeyDetails.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "GameplayTagContainer.h" 6 | #include "ValueOrBBKeyDetails.h" 7 | 8 | class FValueOrBBKeyDetails_GameplayTag : public FValueOrBBKeyDetails 9 | { 10 | public: 11 | /** Makes a new instance of this detail layout class for a specific detail view requesting it */ 12 | static TSharedRef MakeInstance(); 13 | 14 | virtual void CustomizeChildren(TSharedRef StructPropertyHandle, class IDetailChildrenBuilder& StructBuilder, IPropertyTypeCustomizationUtils& StructCustomizationUtils) override; 15 | 16 | protected: 17 | TSharedPtr GameplayTagProperty; 18 | 19 | virtual TSharedRef CreateDefaultValueWidget() override; 20 | 21 | void OnGameplayTagChanged(const FGameplayTag NewTag); 22 | FGameplayTag GetGameplayTag() const; 23 | }; 24 | -------------------------------------------------------------------------------- /Source/UHLAIEditor/UHLAIEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLAIEditor : ModuleRules 6 | { 7 | public UHLAIEditor(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | "CoreUObject", 30 | "Engine", 31 | "PropertyEditor", 32 | "Blutility", 33 | "UMG", 34 | "BehaviorTreeEditor", 35 | // ... add other public dependencies that you statically link with here ... 36 | } 37 | ); 38 | 39 | 40 | PrivateDependencyModuleNames.AddRange( 41 | new string[] 42 | { 43 | "Projects", 44 | "InputCore", 45 | "EditorFramework", 46 | "UnrealEd", 47 | "ToolMenus", 48 | "Slate", 49 | "SlateCore", 50 | "UnrealEd", 51 | "DeveloperSettings", 52 | 53 | "UHLAI", 54 | 55 | "EditorWidgets", 56 | 57 | "GameplayTags", 58 | "GameplayTagsEditor", 59 | // ... add private dependencies that you statically link with here ... 60 | } 61 | ); 62 | 63 | 64 | DynamicallyLoadedModuleNames.AddRange( 65 | new string[] 66 | { 67 | // ... add any modules that your module loads dynamically here ... 68 | } 69 | ); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Private/AttributeSets/UHLBaseCharacterAttributeSet.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "AttributeSets/UHLBaseCharacterAttributeSet.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacterAttributeSet) 7 | 8 | void UUHLBaseCharacterAttributeSet::PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) 9 | { 10 | Super::PreAttributeChange(Attribute, NewValue); 11 | 12 | // If a Max value changes, adjust current to keep Current % of Current to Max 13 | if (Attribute == GetMaxHealthAttribute()) // GetMaxHealthAttribute comes from the Macros defined at the top of the header 14 | { 15 | AdjustAttributeForMaxChange(Health, MaxHealth, NewValue, GetHealthAttribute()); 16 | } 17 | 18 | ClampAttribute(Attribute, NewValue); 19 | } 20 | 21 | void UUHLBaseCharacterAttributeSet::PreAttributeBaseChange(const FGameplayAttribute& Attribute, float& NewValue) const 22 | { 23 | Super::PreAttributeBaseChange(Attribute, NewValue); 24 | 25 | ClampAttribute(Attribute, NewValue); 26 | } 27 | 28 | void UUHLBaseCharacterAttributeSet::AdjustAttributeForMaxChange(FGameplayAttributeData & AffectedAttribute, const FGameplayAttributeData & MaxAttribute, float NewMaxValue, const FGameplayAttribute & AffectedAttributeProperty) 29 | { 30 | TObjectPtr AbilityComp = GetOwningAbilitySystemComponent(); 31 | const float CurrentMaxValue = MaxAttribute.GetCurrentValue(); 32 | if (!FMath::IsNearlyEqual(CurrentMaxValue, NewMaxValue) && AbilityComp) 33 | { 34 | // Change current value to maintain the current Val / Max percent 35 | const float CurrentValue = AffectedAttribute.GetCurrentValue(); 36 | float NewDelta = (CurrentMaxValue > 0.f) ? (CurrentValue * NewMaxValue / CurrentMaxValue) - CurrentValue : NewMaxValue; 37 | 38 | AbilityComp->ApplyModToAttributeUnsafe(AffectedAttributeProperty, EGameplayModOp::Additive, NewDelta); 39 | } 40 | } 41 | 42 | void UUHLBaseCharacterAttributeSet::ClampAttribute(const FGameplayAttribute& Attribute, float& NewValue) const 43 | { 44 | // Values clamp should be always here, dont move to "PostGameplayEffectExecute" 45 | // it leads to value jittering every frame e.g for stamina like "150, 151, 150, 151, 150, 151, ..." 46 | if (Attribute == GetHealthAttribute()) 47 | { 48 | NewValue = FMath::Clamp(NewValue, 0.0f, MaxHealth.GetCurrentValue()); 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Private/Characters/UHLBaseCharacter.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Characters/UHLBaseCharacter.h" 5 | 6 | #include "GameFramework/CharacterMovementComponent.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacter) 9 | 10 | // Sets default values 11 | AUHLBaseCharacter::AUHLBaseCharacter(const FObjectInitializer& ObjectInitializer) 12 | : Super(ObjectInitializer) 13 | { 14 | // smooth AI rotation 15 | bUseControllerRotationYaw = false; 16 | GetCharacterMovement()->bOrientRotationToMovement = 0; 17 | GetCharacterMovement()->bUseControllerDesiredRotation = true; 18 | } 19 | 20 | FTurnSettings AUHLBaseCharacter::GetTurnSettings_Implementation() const 21 | { 22 | return TurnSettingsDataAsset->TurnSettings; 23 | } 24 | 25 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Private/Characters/UHLBaseCharacterWithASC.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Characters/UHLBaseCharacterWithASC.h" 5 | 6 | #include "GameFramework/Controller.h" 7 | #include "UHLAbilitySystemComponent.h" 8 | #include "AttributeSets/UHLBaseCharacterAttributeSet.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLBaseCharacterWithASC) 11 | 12 | AUHLBaseCharacterWithASC::AUHLBaseCharacterWithASC(const FObjectInitializer& ObjectInitializer) 13 | : Super(ObjectInitializer) 14 | { 15 | AbilitySystemComponent = CreateDefaultSubobject(TEXT("UHLAbilitySystem")); 16 | 17 | // some attribute sets can be added here, but its not only option 18 | // you can use UHL Settings to set defaults for every AbilitySystemComponent and add default AttributeSet 19 | // AbilitySystemComponent->AttributeSets = { UUHLBaseCharacterAttributeSet::StaticClass() }; 20 | } 21 | 22 | void AUHLBaseCharacterWithASC::PossessedBy(AController* NewController) 23 | { 24 | Super::PossessedBy(NewController); 25 | 26 | if (bInitUHLAbilitySystemOnPosses) 27 | { 28 | AbilitySystemComponent->InitAbilitySystem(NewController, this); 29 | 30 | // Advanced setup if you want to make something after attributes set, but before abilities activated 31 | // AbilitySystemComponent->InitAbilitySystem(NewController, this, false); 32 | // AbilitySystemComponent->ActivateInitialAbilities(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Private/Controllers/UHLPlayerController.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Controllers/UHLPlayerController.h" 5 | 6 | #include "Kismet/GameplayStatics.h" 7 | #include "Engine/World.h" 8 | #include "Engine/GameInstance.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLPlayerController) 11 | 12 | void AUHLPlayerController::BeginPlay() 13 | { 14 | Super::BeginPlay(); 15 | } 16 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Private/UHLCharacter.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLCharacter.h" 4 | 5 | #include "Misc/Paths.h" 6 | #include "GameplayTagsManager.h" 7 | 8 | #define LOCTEXT_NAMESPACE "FUHLCharacterModule" 9 | 10 | 11 | void FUHLCharacterModule::StartupModule() 12 | { 13 | UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get(); 14 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 15 | TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags")); 16 | } 17 | 18 | void FUHLCharacterModule::ShutdownModule() 19 | { 20 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 21 | // we call this function before unloading the module. 22 | } 23 | 24 | #undef LOCTEXT_NAMESPACE 25 | 26 | IMPLEMENT_MODULE(FUHLCharacterModule, UHLCharacter) 27 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Public/AttributeSets/UHLBaseCharacterAttributeSet.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "AbilitySystemComponent.h" 7 | #include "AttributeSet.h" 8 | #include "AttributeSets/UHLAttributeSet.h" 9 | #include "UHLBaseCharacterAttributeSet.generated.h" 10 | 11 | /** 12 | * 13 | */ 14 | UCLASS(Category = "UnrealHelperLibrary") 15 | class UHLCHARACTER_API UUHLBaseCharacterAttributeSet : public UUHLAttributeSet 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | ATTRIBUTE_ACCESSORS(UUHLBaseCharacterAttributeSet, Health); 21 | ATTRIBUTE_ACCESSORS(UUHLBaseCharacterAttributeSet, MaxHealth); 22 | 23 | protected: 24 | virtual void PreAttributeChange(const FGameplayAttribute& Attribute, float& NewValue) override; 25 | virtual void PreAttributeBaseChange(const FGameplayAttribute& Attribute, float& NewValue) const override; 26 | 27 | // Helper function to proportionally adjust the value of an attribute when it's associated max attribute changes. 28 | // (i.e. When MaxHealth increases, Health increases by an amount that maintains the same percentage as before) 29 | void AdjustAttributeForMaxChange(FGameplayAttributeData& AffectedAttribute, const FGameplayAttributeData& MaxAttribute, float NewMaxValue, const FGameplayAttribute& AffectedAttributeProperty); 30 | virtual void ClampAttribute(const FGameplayAttribute& Attribute, float& NewValue) const; 31 | 32 | private: 33 | UPROPERTY(BlueprintReadOnly, Category = "Attributes | Health", Meta=(AllowPrivateAccess=true)) 34 | FGameplayAttributeData Health; 35 | UPROPERTY(BlueprintReadOnly, Category = "Attributes | Health", Meta=(AllowPrivateAccess=true)) 36 | FGameplayAttributeData MaxHealth; 37 | }; 38 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Public/Characters/UHLBaseCharacter.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Core/UHLAIActorSettings.h" 7 | #include "GameFramework/Character.h" 8 | #include "UHLBaseCharacter.generated.h" 9 | 10 | /** 11 | * Character with base interfaces and features implemented, 12 | * except AbilitySystem implementation cause its may vary on project setup 13 | * ASC can be inited on PlayerState/Character 14 | */ 15 | UCLASS() 16 | class UHLCHARACTER_API AUHLBaseCharacter : public ACharacter, 17 | public IUHLAIActorSettings 18 | { 19 | GENERATED_BODY() 20 | 21 | public: 22 | // Sets default values for this character's properties 23 | AUHLBaseCharacter(const FObjectInitializer& ObjectInitializer); 24 | 25 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="TurnSettings") 26 | UTurnSettingsDataAsset* TurnSettingsDataAsset; 27 | 28 | /** IUHLActorSettings */ 29 | virtual FTurnSettings GetTurnSettings_Implementation() const override; 30 | /** ~IUHLActorSettings */ 31 | }; 32 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Public/Characters/UHLBaseCharacterWithASC.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "AbilitySystemInterface.h" 7 | #include "UHLAbilitySystemComponent.h" 8 | #include "Characters/UHLBaseCharacter.h" 9 | #include "Core/UHLAbilitySystemInterface.h" 10 | #include "UHLBaseCharacterWithASC.generated.h" 11 | 12 | class UAbilitySystemComponent; 13 | 14 | /** 15 | * Extended version of UHLBaseCharacter but with AbilitySystem and ASC init on "PossessedBy" 16 | */ 17 | UCLASS() 18 | class UHLCHARACTER_API AUHLBaseCharacterWithASC : public AUHLBaseCharacter, 19 | public IAbilitySystemInterface, 20 | public IUHLAbilitySystemInterface 21 | { 22 | GENERATED_BODY() 23 | 24 | public: 25 | AUHLBaseCharacterWithASC(const FObjectInitializer& ObjectInitializer); 26 | 27 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="UHL BaseCharacter with ASC") 28 | bool bInitUHLAbilitySystemOnPosses = true; 29 | 30 | /** IAbilitySystemInterface **/ 31 | virtual UAbilitySystemComponent* GetAbilitySystemComponent() const override { return AbilitySystemComponent; }; 32 | /** ~IAbilitySystemInterface **/ 33 | 34 | /** IUHLAbilitySystemInterface */ 35 | virtual UUHLAbilitySystemComponent* GetUHLAbilitySystemComponent_Implementation() const override 36 | { 37 | return AbilitySystemComponent; 38 | }; 39 | /** ~IUHLAbilitySystemInterface */ 40 | 41 | protected: 42 | /** GameplayAbilities */ 43 | UPROPERTY(VisibleDefaultsOnly, BlueprintReadOnly, Category="UHL BaseCharacter with ASC") 44 | UUHLAbilitySystemComponent* AbilitySystemComponent; 45 | /** ~GameplayAbilities */ 46 | 47 | virtual void PossessedBy(AController* NewController) override; 48 | }; 49 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Public/Controllers/UHLPlayerController.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/PlayerController.h" 7 | #include "UHLPlayerController.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLCHARACTER_API AUHLPlayerController : public APlayerController 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void BeginPlay() override; 19 | }; 20 | -------------------------------------------------------------------------------- /Source/UHLCharacter/Public/UHLCharacter.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FUHLCharacterModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | }; 15 | -------------------------------------------------------------------------------- /Source/UHLCharacter/UHLCharacter.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLCharacter : ModuleRules 6 | { 7 | public UHLCharacter(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | // ... add other public dependencies that you statically link with here ... 30 | "GameplayAbilities", 31 | "GameplayTags", 32 | "GameplayTasks", 33 | "EnhancedInput", 34 | } 35 | ); 36 | 37 | 38 | PrivateDependencyModuleNames.AddRange( 39 | new string[] 40 | { 41 | "CoreUObject", 42 | "Engine", 43 | 44 | "UnrealHelperLibrary", 45 | "UHLDebugSystem", 46 | "UHLAI", 47 | "UHLGAS", 48 | } 49 | ); 50 | 51 | 52 | DynamicallyLoadedModuleNames.AddRange( 53 | new string[] 54 | { 55 | // ... add any modules that your module loads dynamically here ... 56 | } 57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Source/UHLDebug/Private/UHLDebug.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLDebug.h" 4 | 5 | #include "Misc/Paths.h" 6 | #include "GameplayTagsManager.h" 7 | 8 | #define LOCTEXT_NAMESPACE "FUHLDebugModule" 9 | 10 | 11 | void FUHLDebugModule::StartupModule() 12 | { 13 | UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get(); 14 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 15 | TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags")); 16 | } 17 | 18 | void FUHLDebugModule::ShutdownModule() 19 | { 20 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 21 | // we call this function before unloading the module. 22 | } 23 | 24 | #undef LOCTEXT_NAMESPACE 25 | 26 | IMPLEMENT_MODULE(FUHLDebugModule, UHLDebug) 27 | -------------------------------------------------------------------------------- /Source/UHLDebug/Private/UI/UHLDebugWidget.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UI/UHLDebugWidget.h" 5 | 6 | #include "UHLAbilitySystemComponent.h" 7 | #include "Blueprint/WidgetTree.h" 8 | #include "Components/TextBlock.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugWidget) 11 | 12 | void UUHLDebugWidget::ToggleAbilityInputCache(UUHLAbilitySystemComponent* ASC_In) 13 | { 14 | ASC = ASC_In; 15 | if (ASC.Get()) 16 | { 17 | bShowAbilityInputCacheList = true; 18 | } 19 | else 20 | { 21 | bShowAbilityInputCacheList = false; 22 | } 23 | } 24 | 25 | void UUHLDebugWidget::NativeTick(const FGeometry& MyGeometry, float InDeltaTime) 26 | { 27 | Super::NativeTick(MyGeometry, InDeltaTime); 28 | 29 | if (bShowAbilityInputCacheList) 30 | { 31 | FString NewText = ""; 32 | TArray AbilityInputCache = ASC->GetAbilityInputCache()->GetAbilityInputCache(); 33 | 34 | for (int32 i = AbilityInputCache.Num() - 1; i >= 0; i--) 35 | { 36 | NewText.Append(AbilityInputCache[i].ToString() + FString("\n")); 37 | } 38 | 39 | AbilityInputCacheTextBlock->SetText(FText::FromString(NewText)); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /Source/UHLDebug/Public/UHLDebug.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FUHLDebugModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | }; 15 | -------------------------------------------------------------------------------- /Source/UHLDebug/Public/UHLDebugModuleSubsystem.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Subsystems/GameInstanceSubsystem.h" 7 | #include "UI/UHLDebugWidget.h" 8 | #include "UHLDebugModuleSubsystem.generated.h" 9 | 10 | // TODO use ULocalPlayer 11 | UCLASS() 12 | class UHLDEBUG_API UUHLDebugModuleSubsystem : public ULocalPlayerSubsystem 13 | { 14 | GENERATED_BODY() 15 | 16 | public: 17 | UUHLDebugModuleSubsystem(); 18 | 19 | protected: 20 | virtual void Initialize(FSubsystemCollectionBase& Collection) override; 21 | virtual void Deinitialize() override; 22 | 23 | private: 24 | UPROPERTY() 25 | TSoftClassPtr UHLDebugWidgetClass; 26 | UPROPERTY() 27 | UUHLDebugWidget* DebugWidgetInstance = nullptr; 28 | 29 | // TODO use ULocalPlayer 30 | APlayerController* GetPlayerController() const; 31 | UUHLAbilitySystemComponent* GetPlayerAbilitySystemComponent() const; 32 | UUHLDebugWidget* GetOrCreateUHLDebugWidget(); 33 | 34 | UFUNCTION() 35 | void OnAbilityInputDebugCategoryChanged(bool bEnabled); 36 | }; 37 | -------------------------------------------------------------------------------- /Source/UHLDebug/Public/UI/UHLDebugWidget.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLAbilitySystemComponent.h" 7 | #include "Blueprint/UserWidget.h" 8 | #include "Components/VerticalBox.h" 9 | #include "UHLDebugWidget.generated.h" 10 | 11 | 12 | class UTextBlock; 13 | 14 | /** 15 | * 16 | */ 17 | UCLASS() 18 | class UHLDEBUG_API UUHLDebugWidget : public UUserWidget 19 | { 20 | GENERATED_BODY() 21 | 22 | public: 23 | UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="UHLDebugWidget", meta = (BindWidget)) 24 | UTextBlock* AbilityInputCacheTextBlock; 25 | 26 | virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override; 27 | 28 | UFUNCTION(BlueprintCallable, Category="UHLDebugWidget") 29 | void ToggleAbilityInputCache(UUHLAbilitySystemComponent* ASC_In); 30 | 31 | private: 32 | bool bShowAbilityInputCacheList = false; 33 | TWeakObjectPtr ASC; 34 | }; 35 | -------------------------------------------------------------------------------- /Source/UHLDebug/UHLDebug.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | // Module that helps debugging UnrealHelperLibrary and can depend on all other modules 6 | // Don't mess with UHLDebugSystem - that completely independent system from UHL 7 | // and probably should be other plugin 8 | public class UHLDebug : ModuleRules 9 | { 10 | public UHLDebug(ReadOnlyTargetRules Target) : base(Target) 11 | { 12 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 13 | 14 | PublicIncludePaths.AddRange( 15 | new string[] { 16 | // ... add public include paths required here ... 17 | } 18 | ); 19 | 20 | 21 | PrivateIncludePaths.AddRange( 22 | new string[] { 23 | // ... add other private include paths required here ... 24 | } 25 | ); 26 | 27 | 28 | PublicDependencyModuleNames.AddRange( 29 | new string[] 30 | { 31 | "Core", 32 | // ... add other public dependencies that you statically link with here ... 33 | "GameplayAbilities", 34 | "GameplayTags", 35 | "GameplayTasks", 36 | "EnhancedInput", 37 | } 38 | ); 39 | 40 | 41 | PrivateDependencyModuleNames.AddRange( 42 | new string[] 43 | { 44 | "CoreUObject", 45 | "Engine", 46 | 47 | "Slate", 48 | "SlateCore", 49 | "UMG", 50 | "DeveloperSettings", 51 | 52 | "UnrealHelperLibrary", 53 | "UHLDebugSystem", 54 | "UHLGAS", 55 | } 56 | ); 57 | 58 | 59 | DynamicallyLoadedModuleNames.AddRange( 60 | new string[] 61 | { 62 | // ... add any modules that your module loads dynamically here ... 63 | } 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/AA_WaitDebugCategoryChange.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "AA_WaitDebugCategoryChange.h" 5 | 6 | #include "UnrealEngine.h" 7 | #include "Engine/Engine.h" 8 | #include "Engine/World.h" 9 | #include "Engine/GameInstance.h" 10 | #include "Kismet/GameplayStatics.h" 11 | #include "UHLDebugSystemSubsystem.h" 12 | 13 | #include UE_INLINE_GENERATED_CPP_BY_NAME(AA_WaitDebugCategoryChange) 14 | 15 | UAA_WaitDebugCategoryChange* UAA_WaitDebugCategoryChange::WaitDebugCategoryChange(const UObject* WorldContext, FGameplayTag DebugCategoryTag, bool bCheckOnStart) 16 | { 17 | // We must have a valid contextual world for this action, so we don't even make it 18 | // unless we can resolve the UWorld from WorldContext. 19 | UWorld* ContextWorld = GEngine->GetWorldFromContextObject(WorldContext, EGetWorldErrorMode::ReturnNull); 20 | if(!IsValid(ContextWorld) || !ensureAlwaysMsgf(IsValid(WorldContext), TEXT("World Context was not valid."))) 21 | { 22 | return nullptr; 23 | } 24 | 25 | UAA_WaitDebugCategoryChange* NewAction = NewObject(); 26 | NewAction->ContextWorld = ContextWorld; 27 | NewAction->DebugCategoryTagInternal = DebugCategoryTag; 28 | NewAction->bCheckOnStart = bCheckOnStart; 29 | NewAction->RegisterWithGameInstance(ContextWorld->GetGameInstance()); 30 | return NewAction; 31 | } 32 | 33 | void UAA_WaitDebugCategoryChange::Activate() 34 | { 35 | UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(GetWorld()); 36 | if (IsValid(GameInstance)) 37 | { 38 | UUHLDebugSystemSubsystem* UHLDebugSubsystem = GameInstance->GetSubsystem(); 39 | UHLDebugSubsystem->OnDebugCategoryChanged.AddUniqueDynamic(this, &UAA_WaitDebugCategoryChange::OnDebugCategoryChange); 40 | if (bCheckOnStart) 41 | { 42 | OnDebugCategoryChange(DebugCategoryTagInternal, UHLDebugSubsystem->IsCategoryEnabled(DebugCategoryTagInternal)); 43 | } 44 | } 45 | } 46 | 47 | void UAA_WaitDebugCategoryChange::OnDebugCategoryChange(FGameplayTag DebugCategoryTag, bool bEnabled) 48 | { 49 | if (DebugCategoryTag != DebugCategoryTagInternal) return; 50 | 51 | if (OnChange.IsBound()) 52 | { 53 | OnChange.Broadcast(bEnabled); 54 | } 55 | 56 | if (bEnabled) 57 | { 58 | if (OnEnabled.IsBound()) 59 | { 60 | OnEnabled.Broadcast(bEnabled); 61 | } 62 | } 63 | else 64 | { 65 | if (OnDisabled.IsBound()) 66 | { 67 | OnDisabled.Broadcast(bEnabled); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Abilities.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "DebugCategories/DCC_AbilitySystem_Abilities.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Kismet/KismetSystemLibrary.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Abilities) 10 | 11 | void UDCC_AbilitySystem_Abilities::Activate_Implementation(UObject* ContextObject) 12 | { 13 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem")); 14 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory Ability")); 15 | return Super::Activate_Implementation(ContextObject); 16 | } 17 | 18 | void UDCC_AbilitySystem_Abilities::Deactivate_Implementation(UObject* ContextObject) 19 | { 20 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset")); 21 | Super::Deactivate_Implementation(ContextObject); 22 | } 23 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Attributes.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "DebugCategories/DCC_AbilitySystem_Attributes.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Kismet/KismetSystemLibrary.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Attributes) 10 | 11 | void UDCC_AbilitySystem_Attributes::Activate_Implementation(UObject* ContextObject) 12 | { 13 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem")); 14 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory Attributes")); 15 | return Super::Activate_Implementation(ContextObject); 16 | } 17 | 18 | void UDCC_AbilitySystem_Attributes::Deactivate_Implementation(UObject* ContextObject) 19 | { 20 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset")); 21 | Super::Deactivate_Implementation(ContextObject); 22 | } 23 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/DebugCategories/DCC_AbilitySystem_Effects.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "DebugCategories/DCC_AbilitySystem_Effects.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Kismet/KismetSystemLibrary.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_AbilitySystem_Effects) 10 | 11 | void UDCC_AbilitySystem_Effects::Activate_Implementation(UObject* ContextObject) 12 | { 13 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug abilitysystem")); 14 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("AbilitySystem.Debug.SetCategory GameplayEffects")); 15 | return Super::Activate_Implementation(ContextObject); 16 | } 17 | 18 | void UDCC_AbilitySystem_Effects::Deactivate_Implementation(UObject* ContextObject) 19 | { 20 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset")); 21 | Super::Deactivate_Implementation(ContextObject); 22 | } 23 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/DebugCategories/DCC_Collisions.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "DebugCategories/DCC_Collisions.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Kismet/KismetSystemLibrary.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_Collisions) 10 | 11 | void UDCC_Collisions::Activate_Implementation(UObject* ContextObject) 12 | { 13 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("ShowFlag.Collision 1")); 14 | Super::Activate_Implementation(ContextObject); 15 | } 16 | 17 | void UDCC_Collisions::Deactivate_Implementation(UObject* ContextObject) 18 | { 19 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("ShowFlag.Collision 0")); 20 | Super::Deactivate_Implementation(ContextObject); 21 | } 22 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/DebugCategories/DCC_InputSystem_EnhancedInput.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "DebugCategories/DCC_InputSystem_EnhancedInput.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Kismet/KismetSystemLibrary.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(DCC_InputSystem_EnhancedInput) 10 | 11 | void UDCC_InputSystem_EnhancedInput::Activate_Implementation(UObject* ContextObject) 12 | { 13 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug enhancedinput")); 14 | Super::Activate_Implementation(ContextObject); 15 | } 16 | 17 | void UDCC_InputSystem_EnhancedInput::Deactivate_Implementation(UObject* ContextObject) 18 | { 19 | UKismetSystemLibrary::ExecuteConsoleCommand(ContextObject->GetWorld(), FString("showdebug reset")); 20 | Super::Deactivate_Implementation(ContextObject); 21 | } 22 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/UHLDebugBlueprintLibrary.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLDebugBlueprintLibrary.h" 4 | 5 | #include "GameplayTagsManager.h" 6 | #include "Misc/ConfigCacheIni.h" 7 | #include "Animation/AnimMontage.h" 8 | #include "DrawDebugHelpers.h" 9 | #include "UHLDebugSystemSubsystem.h" 10 | #include "Engine/World.h" 11 | #include "Engine/GameInstance.h" 12 | #include "Kismet/GameplayStatics.h" 13 | 14 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugBlueprintLibrary) 15 | 16 | bool UUHLDebugBlueprintLibrary::IsUHLDebugCategoryEnabled(UObject* WorldContextObject, FGameplayTag DebugCategoryGameplayTag) 17 | { 18 | UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(WorldContextObject); 19 | if (!IsValid(GameInstance)) 20 | { 21 | return false; 22 | } 23 | 24 | UUHLDebugSystemSubsystem* UHLDebugSubsystem = GameInstance->GetSubsystem(); 25 | if (!IsValid(UHLDebugSubsystem)) 26 | { 27 | return false; 28 | } 29 | 30 | return UHLDebugSubsystem->IsCategoryEnabled(DebugCategoryGameplayTag); 31 | } 32 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/UHLDebugCategory.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLDebugCategory.h" 4 | 5 | #include "Templates/SubclassOf.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugCategory) 9 | 10 | bool FUHLDebugCategory::TryEnable(UObject* ContextObj) 11 | { 12 | bool bResult = false; 13 | 14 | int32 ComponentsActivated = 0; 15 | int32 ComponentsRequiredToActivate = Components.Num(); 16 | for (TSubclassOf ComponentClass : Components) 17 | { 18 | if (!ComponentClass) 19 | { 20 | ComponentsRequiredToActivate--; 21 | continue; 22 | }; 23 | 24 | UUHLDebugCategoryComponent* Component = GetOrCreateDebugCategoryComponent(ComponentClass, ContextObj); 25 | if (Component->CanActivate(ContextObj)) 26 | { 27 | Component->Activate(ContextObj); 28 | ComponentsActivated++; 29 | } 30 | } 31 | if (ComponentsActivated == ComponentsRequiredToActivate) 32 | { 33 | bResult = true; 34 | } 35 | 36 | bIsEnabled = true; 37 | return bResult; 38 | } 39 | 40 | void FUHLDebugCategory::TryDisable(UObject* ContextObj) 41 | { 42 | for (UUHLDebugCategoryComponent* InstancedComponent : InstancedComponents) 43 | { 44 | if (InstancedComponent) 45 | { 46 | InstancedComponent->Deactivate(ContextObj); 47 | } 48 | } 49 | bIsEnabled = false; 50 | } 51 | 52 | UUHLDebugCategoryComponent* FUHLDebugCategory::GetOrCreateDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj) 53 | { 54 | UUHLDebugCategoryComponent* Component = nullptr; 55 | UUHLDebugCategoryComponent** FoundComponent = GetDebugCategoryComponent(ComponentClass, ContextObj); 56 | if (!FoundComponent) 57 | { 58 | Component = NewObject(ContextObj, ComponentClass); 59 | InstancedComponents.Add(Component); 60 | } 61 | else 62 | { 63 | Component = *FoundComponent; 64 | } 65 | 66 | return Component; 67 | } 68 | 69 | UUHLDebugCategoryComponent** FUHLDebugCategory::GetDebugCategoryComponent(TSubclassOf ComponentClass, UObject* ContextObj) 70 | { 71 | return InstancedComponents.FindByPredicate([=](UUHLDebugCategoryComponent* DebugCategoryComponent) 72 | { 73 | return DebugCategoryComponent->GetClass() == ComponentClass; 74 | }); 75 | } 76 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/UHLDebugCategoryComponent.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UHLDebugCategoryComponent.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLDebugCategoryComponent) 7 | 8 | bool UUHLDebugCategoryComponent::CanActivate_Implementation(UObject* ContextObject) const 9 | { 10 | return true; 11 | } 12 | 13 | void UUHLDebugCategoryComponent::Activate_Implementation(UObject* ContextObject) 14 | { 15 | } 16 | 17 | void UUHLDebugCategoryComponent::Deactivate_Implementation(UObject* ContextObject) 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Private/UHLDebugSystem.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLDebugSystem.h" 4 | 5 | #include "Misc/Paths.h" 6 | #include "GameplayTagsManager.h" 7 | #include "UHLConfigMigrationUtils.h" 8 | #include "Development/UHLDebugSystemSettings.h" 9 | 10 | #define LOCTEXT_NAMESPACE "FUHLDebugSystemModule" 11 | 12 | void FUHLDebugSystemModule::StartupModule() 13 | { 14 | UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get(); 15 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 16 | TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags")); 17 | 18 | MigrateOldSettingsFromMainModule(); 19 | } 20 | 21 | void FUHLDebugSystemModule::ShutdownModule() 22 | { 23 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 24 | // we call this function before unloading the module. 25 | } 26 | 27 | void FUHLDebugSystemModule::MigrateOldSettingsFromMainModule() 28 | { 29 | UHLConfigMigrationUtils::MigrateConfigSectionIfNeeded( 30 | TEXT("/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings"), 31 | TEXT("/Script/UHLDebugSystem.UHLDebugSystemSettings"), 32 | TEXT("bMigrationFromOldSettingsDone"), 33 | GGameIni, 34 | GGameIni 35 | ); 36 | 37 | UUHLDebugSystemSettings* Settings = GetMutableDefault(); 38 | if (Settings) 39 | { 40 | Settings->ReloadConfig(); 41 | // Settings->SaveConfig(); 42 | } 43 | } 44 | 45 | #undef LOCTEXT_NAMESPACE 46 | 47 | IMPLEMENT_MODULE(FUHLDebugSystemModule, UHLDebugSystem) 48 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/AA_WaitDebugCategoryChange.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "Kismet/BlueprintAsyncActionBase.h" 8 | #include "AA_WaitDebugCategoryChange.generated.h" 9 | 10 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FWaitDebugCategoryChanged, bool, bEnabled); 11 | 12 | UCLASS(BlueprintType, meta=(ExposedAsyncProxy = AsyncAction)) 13 | class UHLDEBUGSYSTEM_API UAA_WaitDebugCategoryChange : public UBlueprintAsyncActionBase 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | // TODO add updating bool value from Blueprint by reference 19 | // UFUNCTION(BlueprintCallable, DisplayName="WaitDebugCategoryChange", meta=(WorldContext="WorldContext", BlueprintInternalUseOnly="true", AutoCreateRefTerm="bIsDebugEnabledValueRef", AdvancedDisplay="bIsDebugEnabledValueRef")) 20 | // static UAA_WaitDebugCategoryChange* WaitDebugCategoryChange(const UObject* WorldContext, FGameplayTag DebugCategoryTag, bool bCheckOnStart, const bool& bIsDebugEnabledValueRef); 21 | 22 | // WARNING for better experience tags are filtered add child to "UHL.DebugCategory" or "DebugCategory" 23 | UFUNCTION(BlueprintCallable, Category="UnrealHelperLibrary", meta=(WorldContext="WorldContext", BlueprintInternalUseOnly="true", Keywords = "UnrealHelperLibrary debug UHL debugCategory debugging")) 24 | static UAA_WaitDebugCategoryChange* WaitDebugCategoryChange(const UObject* WorldContext, UPARAM(meta=(Categories="UHL.DebugCategory,DebugCategory"))FGameplayTag DebugCategoryTag, bool bCheckOnStart = true); 25 | 26 | UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange") 27 | FWaitDebugCategoryChanged OnChange; 28 | UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange") 29 | FWaitDebugCategoryChanged OnEnabled; 30 | UPROPERTY(BlueprintAssignable, Category="WaitDebugCategoryChange") 31 | FWaitDebugCategoryChanged OnDisabled; 32 | 33 | virtual void Activate() override; 34 | 35 | virtual UWorld* GetWorld() const override 36 | { 37 | return ContextWorld.IsValid() ? ContextWorld.Get() : nullptr; 38 | } 39 | 40 | private: 41 | TWeakObjectPtr ContextWorld = nullptr; 42 | 43 | FGameplayTag DebugCategoryTagInternal = FGameplayTag::EmptyTag; 44 | bool bCheckOnStart = true; 45 | 46 | UFUNCTION() 47 | void OnDebugCategoryChange(FGameplayTag DebugCategoryTag, bool bEnabled); 48 | }; 49 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Abilities.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | #include "DCC_AbilitySystem_Abilities.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Abilities : public UUHLDebugCategoryComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Activate_Implementation(UObject* ContextObject) override; 19 | virtual void Deactivate_Implementation(UObject* ContextObject) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Attributes.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | #include "DCC_AbilitySystem_Attributes.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Attributes : public UUHLDebugCategoryComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Activate_Implementation(UObject* ContextObject) override; 19 | virtual void Deactivate_Implementation(UObject* ContextObject) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategories/DCC_AbilitySystem_Effects.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | #include "DCC_AbilitySystem_Effects.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLDEBUGSYSTEM_API UDCC_AbilitySystem_Effects : public UUHLDebugCategoryComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Activate_Implementation(UObject* ContextObject) override; 19 | virtual void Deactivate_Implementation(UObject* ContextObject) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategories/DCC_Collisions.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | #include "DCC_Collisions.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLDEBUGSYSTEM_API UDCC_Collisions : public UUHLDebugCategoryComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Activate_Implementation(UObject* ContextObject) override; 19 | virtual void Deactivate_Implementation(UObject* ContextObject) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategories/DCC_InputSystem_EnhancedInput.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.h" 7 | #include "DCC_InputSystem_EnhancedInput.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLDEBUGSYSTEM_API UDCC_InputSystem_EnhancedInput : public UUHLDebugCategoryComponent 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Activate_Implementation(UObject* ContextObject) override; 19 | virtual void Deactivate_Implementation(UObject* ContextObject) override; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/DebugCategoryButtonWidget.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "UHLDebugCategory.h" 8 | #include "Blueprint/UserWidget.h" 9 | #include "DebugCategoryButtonWidget.generated.h" 10 | 11 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FDebugCategoryButtonClick, UDebugCategoryButtonWidget*, Button, FGameplayTag, DebugCategoryTag); 12 | 13 | class UUHLDebugSystemSubsystem; 14 | struct FUHLDebugCategory; 15 | class UTextBlock; 16 | class UCheckBox; 17 | class UHorizontalBox; 18 | class UButton; 19 | /** 20 | * 21 | */ 22 | UCLASS() 23 | class UHLDEBUGSYSTEM_API UDebugCategoryButtonWidget : public UUserWidget 24 | { 25 | GENERATED_BODY() 26 | 27 | public: 28 | void SetUp(const FUHLDebugCategory& UHLDebugCategory_In); 29 | void UpdateCheckboxState(bool bEnabled_In); 30 | 31 | FDebugCategoryButtonClick OnMadeClick; 32 | 33 | protected: 34 | virtual bool Initialize() override; 35 | virtual void NativePreConstruct() override; 36 | 37 | private: 38 | UPROPERTY() 39 | UButton* Button; 40 | UPROPERTY() 41 | UHorizontalBox* HorizontalBox; 42 | UPROPERTY() 43 | UCheckBox* CheckBox; 44 | UPROPERTY() 45 | UTextBlock* TextBlock; 46 | UPROPERTY() 47 | FUHLDebugCategory UHLDebugCategory; 48 | 49 | UFUNCTION() 50 | void OnButtonClicked(); 51 | UFUNCTION() 52 | void OnDebugCategoryChanged(FGameplayTag DebugCategoryTag_In, bool bEnabled_In); 53 | }; 54 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/Development/UHLDebugSystemSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "Misc/App.h" 8 | #include "UHLDebugSystemSubsystem.h" 9 | #include "UHLDebugSystemSettings.generated.h" 10 | 11 | /** 12 | * 13 | */ 14 | UCLASS(config="Game", defaultconfig, PrioritizeCategories="DebugCategories", DisplayName="UHL Debug System") 15 | class UHLDEBUGSYSTEM_API UUHLDebugSystemSettings : public UDeveloperSettings 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | UPROPERTY(EditAnywhere, Category="DebugCategories", NoClear, meta=(FullyExpand=true, ForceInlineRow /**, ReadOnlyKeys **/)) 21 | TMap EnabledDebugCategories = {}; 22 | 23 | // don't use/show default UHLDebugCategories 24 | UPROPERTY(config, EditAnywhere, Category="DebugCategoriesSettings") 25 | bool bExcludeDefaultUHLDebugCategories = false; 26 | 27 | UPROPERTY(config, EditAnywhere, Category="DebugCategoriesSettings", meta=(TitleProperty="Name", NoElementDuplicate)) 28 | TArray DebugCategories = {}; 29 | 30 | UPROPERTY(config) 31 | bool bMigrationFromOldSettingsDone = false; 32 | 33 | // TODO: choosing debug subsystem class??? user can extend debug subsystem with own things? 34 | // TSubclassOf UHLDebugSubsystemClass; 35 | 36 | static TArray GET_DEFAULT_UHL_DEBUG_CATEGORIES(); 37 | 38 | protected: 39 | //~UDeveloperSettings interface 40 | virtual FName GetCategoryName() const override { return FApp::GetProjectName(); }; 41 | //~End of UDeveloperSettings interface 42 | 43 | #if WITH_EDITOR 44 | virtual void PostInitProperties() override; 45 | virtual void PreEditChange(FProperty* PropertyAboutToChange) override; 46 | virtual void PostEditChangeChainProperty(struct FPropertyChangedChainEvent& PropertyChangedEvent) override; 47 | #endif 48 | 49 | private: 50 | TMap LastEnabledDebugCategories; 51 | 52 | void RecreateEnabledDebugCategoriesList(); 53 | void UpdateEnabledDebugCategoriesList(); 54 | void UpdateDefaultUHLDebugCategories(); 55 | 56 | 57 | }; 58 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/UHLDebugBlueprintLibrary.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "GameplayEffect.h" 6 | #include "AssetRegistry/AssetData.h" 7 | #include "Kismet/BlueprintFunctionLibrary.h" 8 | #include "UHLDebugBlueprintLibrary.generated.h" 9 | 10 | UCLASS() 11 | class UHLDEBUGSYSTEM_API UUHLDebugBlueprintLibrary : public UBlueprintFunctionLibrary 12 | { 13 | GENERATED_BODY() 14 | 15 | public: 16 | /** DebugSubsystem **/ 17 | UFUNCTION( 18 | BlueprintPure, Category = "UnrealHelperLibrary|Debug", meta = (Categories = "UHL.DebugCategory,DebugCategory", WorldContext = "WorldContextObject", Keywords = "UnrealHelperLibrary debug")) 19 | static bool IsUHLDebugCategoryEnabled(UObject* WorldContextObject, FGameplayTag DebugCategoryGameplayTag); 20 | /** ~DebugSubsystem **/ 21 | }; 22 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/UHLDebugCategoryComponent.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLDebugCategoryComponent.generated.h" 7 | 8 | // TODO force activation with "MMB" click 9 | UCLASS(Abstract, Blueprintable) 10 | class UHLDEBUGSYSTEM_API UUHLDebugCategoryComponent : public UObject 11 | { 12 | GENERATED_BODY() 13 | 14 | public: 15 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem") 16 | void Activate(UObject* ContextObject); 17 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem") 18 | void Deactivate(UObject* ContextObject); 19 | UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "UHLDebugSubsystem") 20 | bool CanActivate(UObject* ContextObject) const; 21 | }; 22 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/UHLDebugSystem.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FUHLDebugSystemModule final : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | 15 | private: 16 | void MigrateOldSettingsFromMainModule(); 17 | }; 18 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/Public/UI/UHLDebugCategoriesListWidget.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "Components/ScrollBox.h" 8 | #include "UHLDebugCategoriesListWidget.generated.h" 9 | 10 | class UUHLDebugSystemSubsystem; 11 | class UDebugCategoryButtonWidget; 12 | class UCanvasPanel; 13 | /** 14 | * 15 | */ 16 | UCLASS() 17 | class UHLDEBUGSYSTEM_API UUHLDebugCategoriesListWidget : public UUserWidget 18 | { 19 | GENERATED_BODY() 20 | 21 | protected: 22 | virtual bool Initialize() override; 23 | virtual void NativeConstruct() override; 24 | virtual void NativePreConstruct() override; 25 | 26 | private: 27 | UPROPERTY() 28 | UScrollBox* ScrollBox; 29 | TWeakObjectPtr UHLDebugSubsystem; 30 | UFUNCTION() 31 | void OnButtonClicked(UDebugCategoryButtonWidget* Button, FGameplayTag DebugCategoryGameplayTag); 32 | }; 33 | -------------------------------------------------------------------------------- /Source/UHLDebugSystem/UHLDebugSystem.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | // DebugSystem based on GameplayTags that completely separate from other UHL modules 6 | // should be completely independent of UHL and probably will be other plugin 7 | public class UHLDebugSystem : ModuleRules 8 | { 9 | public UHLDebugSystem(ReadOnlyTargetRules Target) : base(Target) 10 | { 11 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 12 | 13 | PublicIncludePaths.AddRange( 14 | new string[] { 15 | // ... add public include paths required here ... 16 | } 17 | ); 18 | 19 | 20 | PrivateIncludePaths.AddRange( 21 | new string[] { 22 | // ... add other private include paths required here ... 23 | } 24 | ); 25 | 26 | 27 | PublicDependencyModuleNames.AddRange( 28 | new string[] 29 | { 30 | "Core", 31 | "CoreUObject", 32 | "Engine", 33 | 34 | // ... add other public dependencies that you statically link with here ... 35 | "GameplayAbilities", 36 | "GameplayTags", 37 | "GameplayTasks", 38 | "EnhancedInput", 39 | 40 | // TODO remove if possible used only for DebugPrints and EUHLBuildType 41 | "UnrealHelperLibrary", 42 | } 43 | ); 44 | 45 | 46 | PrivateDependencyModuleNames.AddRange( 47 | new string[] 48 | { 49 | "Slate", 50 | "SlateCore", 51 | "UMG", 52 | "AnimGraphRuntime", 53 | "DeveloperSettings", 54 | 55 | // Should not use any other UHL modules 56 | 57 | "UHLModulesHelper", 58 | // ... add private dependencies that you statically link with here ... 59 | } 60 | ); 61 | 62 | 63 | DynamicallyLoadedModuleNames.AddRange( 64 | new string[] 65 | { 66 | // ... add any modules that your module loads dynamically here ... 67 | } 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Source/UHLDebugSystemEditor/Public/UHLDebugSystemEditor.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | 7 | class FToolBarBuilder; 8 | class FMenuBuilder; 9 | 10 | class FUHLDebugSystemEditorModule : public IModuleInterface 11 | { 12 | public: 13 | 14 | /** IModuleInterface implementation */ 15 | virtual void StartupModule() override; 16 | virtual void ShutdownModule() override; 17 | }; 18 | -------------------------------------------------------------------------------- /Source/UHLDebugSystemEditor/UHLDebugSystemEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLDebugSystemEditor : ModuleRules 6 | { 7 | public UHLDebugSystemEditor(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | "CoreUObject", 30 | "Engine", 31 | "PropertyEditor", 32 | "Blutility", 33 | "UMG", 34 | // ... add other public dependencies that you statically link with here ... 35 | } 36 | ); 37 | 38 | 39 | PrivateDependencyModuleNames.AddRange( 40 | new string[] 41 | { 42 | "Projects", 43 | "InputCore", 44 | "EditorFramework", 45 | "UnrealEd", 46 | "ToolMenus", 47 | "Slate", 48 | "SlateCore", 49 | "UnrealEd", 50 | "DeveloperSettings", 51 | 52 | "EditorWidgets", 53 | 54 | "GameplayTags", 55 | "GameplayTagsEditor", 56 | 57 | "UHLDebugSystem", 58 | // ... add private dependencies that you statically link with here ... 59 | } 60 | ); 61 | 62 | 63 | DynamicallyLoadedModuleNames.AddRange( 64 | new string[] 65 | { 66 | // ... add any modules that your module loads dynamically here ... 67 | } 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Source/UHLEditor/Private/Development/UHLEditorSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Development/UHLEditorSettings.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLEditorSettings) -------------------------------------------------------------------------------- /Source/UHLEditor/Private/UHLEditorCommands.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLEditorCommands.h" 4 | 5 | #define LOCTEXT_NAMESPACE "FUHLEditorModule" 6 | 7 | void FUHLEditorCommands::RegisterCommands() 8 | { 9 | UI_COMMAND(PluginAction, "UHLEditorCommands", "Execute UHLEditorCommands action", EUserInterfaceActionType::Button, FInputChord()); 10 | } 11 | 12 | #undef LOCTEXT_NAMESPACE 13 | -------------------------------------------------------------------------------- /Source/UHLEditor/Private/UHLEditorCustomThumbnail.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UHLEditorCustomThumbnail.h" 5 | 6 | // Add default functionality here for any IUHLEditorCustomThumbnail functions that are not pure virtual. 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLEditorCustomThumbnail) 9 | 10 | UTexture2D* IUHLEditorCustomThumbnail::GetCustomThumbnailIcon_Implementation() const 11 | { 12 | return nullptr; 13 | } -------------------------------------------------------------------------------- /Source/UHLEditor/Private/UI/EditorUtility/EUW_UHL_Utils.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UI/EditorUtility/EUW_UHL_Utils.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(EUW_UHL_Utils) -------------------------------------------------------------------------------- /Source/UHLEditor/Public/Development/UHLEditorSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLEditorSettings.generated.h" 7 | 8 | USTRUCT(BlueprintType) 9 | struct FUHLEditorCustomClassIconDescription 10 | { 11 | GENERATED_BODY() 12 | 13 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription") 14 | TSoftObjectPtr Texture2D; 15 | 16 | // deprecated, TODO: remove 17 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription", meta=(DeprecatedProperty, DeprecationMessage="Deprecated use Classes")) 18 | TSubclassOf Class; 19 | 20 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CustomClassIconDescription") 21 | TArray> Classes; 22 | }; 23 | 24 | /** 25 | * 26 | */ 27 | UCLASS(Config="Editor", DefaultConfig, meta = (DisplayName="UHL Editor")) 28 | class UHLEDITOR_API UUHLEditorSettings : public UDeveloperSettings 29 | { 30 | GENERATED_BODY() 31 | 32 | public: 33 | UPROPERTY(config, EditAnywhere, Category="Custom Class Icons", meta=(FullyExpand)) 34 | TArray CustomClassIcons; 35 | }; 36 | -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UHLEditor.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Modules/ModuleManager.h" 7 | 8 | class FToolBarBuilder; 9 | class FMenuBuilder; 10 | 11 | class FUHLEditorModule : public IModuleInterface 12 | { 13 | public: 14 | 15 | /** IModuleInterface implementation */ 16 | virtual void StartupModule() override; 17 | virtual void ShutdownModule() override; 18 | 19 | /** This function will be bound to Command. */ 20 | void PluginButtonClicked(); 21 | 22 | private: 23 | 24 | void RegisterMenus(); 25 | 26 | 27 | private: 28 | TSharedPtr PluginCommands; 29 | }; 30 | -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UHLEditorBlueprintThumbnailRenderer.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "ThumbnailRendering/BlueprintThumbnailRenderer.h" 7 | #include "UHLEditorBlueprintThumbnailRenderer.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLEDITOR_API UUHLEditorBlueprintThumbnailRenderer : public UBlueprintThumbnailRenderer 14 | { 15 | GENERATED_BODY() 16 | protected: 17 | 18 | UUHLEditorBlueprintThumbnailRenderer(const FObjectInitializer& ObjectInitializer) 19 | : Super(ObjectInitializer) 20 | {} 21 | 22 | // UThumbnailRenderer implementation 23 | virtual void GetThumbnailSize(UObject* Object, float Zoom, uint32& OutWidth, uint32& OutHeight) const override; 24 | virtual void Draw(UObject* Object, int32 X, int32 Y, uint32 Width, uint32 Height, FRenderTarget*, FCanvas* Canvas, bool bAdditionalViewFamily) override; 25 | virtual bool CanVisualizeAsset(UObject* Object) override; 26 | protected: 27 | 28 | UTexture2D* GetTextureFromGeneratedClass(UClass* Class) const; 29 | }; 30 | -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UHLEditorCommands.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Framework/Commands/Commands.h" 7 | #include "UHLEditorStyle.h" 8 | 9 | class FUHLEditorCommands : public TCommands 10 | { 11 | public: 12 | 13 | FUHLEditorCommands() 14 | : TCommands(TEXT("UHLEditor"), NSLOCTEXT("Contexts", "UHLEditor", "UHLEditor Plugin"), NAME_None, FUHLEditorStyle::GetStyleSetName()) 15 | { 16 | } 17 | 18 | // TCommands<> interface 19 | virtual void RegisterCommands() override; 20 | 21 | public: 22 | TSharedPtr< FUICommandInfo > PluginAction; 23 | }; 24 | -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UHLEditorCustomThumbnail.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/Interface.h" 7 | #include "UHLEditorCustomThumbnail.generated.h" 8 | 9 | // This class does not need to be modified. 10 | UINTERFACE(MinimalAPI, meta = (Blueprintable)) 11 | class UUHLEditorCustomThumbnail : public UInterface 12 | { 13 | GENERATED_BODY() 14 | }; 15 | 16 | /** 17 | * 18 | */ 19 | class UHLEDITOR_API IUHLEditorCustomThumbnail 20 | { 21 | GENERATED_BODY() 22 | 23 | // Add interface functions to this class. This is the class that will be inherited to implement this interface. 24 | public: 25 | 26 | /** IUHLEditorCustomThumbnail **/ 27 | UFUNCTION(BlueprintCallable, BlueprintNativeEvent, Category="Custom Thumbnail") 28 | UTexture2D* GetCustomThumbnailIcon() const; 29 | virtual UTexture2D* GetCustomThumbnailIcon_Implementation() const; 30 | /** ~IUHLEditorCustomThumbnail **/ 31 | }; 32 | -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UHLEditorStyle.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Styling/SlateStyle.h" 7 | 8 | class FUHLEditorStyle 9 | { 10 | public: 11 | 12 | static void Initialize(); 13 | 14 | static void Shutdown(); 15 | 16 | /** reloads textures used by slate renderer */ 17 | static void ReloadTextures(); 18 | 19 | /** @return The Slate style set for the Shooter game */ 20 | static const ISlateStyle& Get(); 21 | 22 | static FName GetStyleSetName(); 23 | 24 | private: 25 | 26 | static TSharedRef< class FSlateStyleSet > Create(); 27 | 28 | private: 29 | 30 | static TSharedPtr< class FSlateStyleSet > StyleInstance; 31 | }; -------------------------------------------------------------------------------- /Source/UHLEditor/Public/UI/EditorUtility/EUW_UHL_Utils.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "EditorUtilityWidget.h" 7 | #include "EUW_UHL_Utils.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Blueprintable) 13 | class UHLEDITOR_API UEUW_UHL_Utils : public UEditorUtilityWidget 14 | { 15 | GENERATED_BODY() 16 | 17 | }; 18 | -------------------------------------------------------------------------------- /Source/UHLEditor/UHLEditor.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLEditor : ModuleRules 6 | { 7 | public UHLEditor(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | "CoreUObject", 30 | "Engine", 31 | "PropertyEditor", 32 | "Blutility", 33 | "UMG", 34 | "BehaviorTreeEditor", 35 | // ... add other public dependencies that you statically link with here ... 36 | } 37 | ); 38 | 39 | 40 | PrivateDependencyModuleNames.AddRange( 41 | new string[] 42 | { 43 | "Projects", 44 | "InputCore", 45 | "EditorFramework", 46 | "UnrealEd", 47 | "ToolMenus", 48 | "Slate", 49 | "SlateCore", 50 | "UnrealEd", 51 | "DeveloperSettings", 52 | 53 | "UnrealHelperLibrary", 54 | "UHLModulesHelper", 55 | 56 | "EditorWidgets", 57 | 58 | "GameplayTags", 59 | "GameplayTagsEditor", 60 | // ... add private dependencies that you statically link with here ... 61 | } 62 | ); 63 | 64 | 65 | DynamicallyLoadedModuleNames.AddRange( 66 | new string[] 67 | { 68 | // ... add any modules that your module loads dynamically here ... 69 | } 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Animations/Notifies/ANS_ActivateAbility.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animations/Notifies/ANS_ActivateAbility.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Animation/AnimMontage.h" 8 | #include "AbilitySystemComponent.h" 9 | #include "AbilitySystemInterface.h" 10 | #include "Components/SkeletalMeshComponent.h" 11 | #include "Utils/UnrealHelperLibraryBPL.h" 12 | 13 | #include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_ActivateAbility) 14 | 15 | FString UANS_ActivateAbility::GetNotifyName_Implementation() const 16 | { 17 | return FString("ActivateAbility ") + GameplayAbilityTag.ToString(); 18 | } 19 | 20 | void UANS_ActivateAbility::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) 21 | { 22 | Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); 23 | 24 | if (!GameplayAbilityTag.IsValid()) 25 | { 26 | UUnrealHelperLibraryBPL::DebugPrintString(MeshComp->GetWorld(), FString::Printf(TEXT("%s GameplayAbilityTag not set"), *this->GetName())); 27 | return; 28 | } 29 | 30 | ActorWithASC = Cast(MeshComp->GetOwner()); 31 | if (ActorWithASC.IsValid()) 32 | { 33 | ActorWithASC->GetAbilitySystemComponent()->TryActivateAbilitiesByTag(FGameplayTagContainer(GameplayAbilityTag), bAllowRemoteActivation); 34 | } 35 | } 36 | 37 | void UANS_ActivateAbility::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 38 | { 39 | Super::NotifyEnd(MeshComp, Animation, EventReference); 40 | 41 | if (!GameplayAbilityTag.IsValid()) 42 | { 43 | UUnrealHelperLibraryBPL::DebugPrintString(MeshComp->GetWorld(), FString::Printf(TEXT("%s GameplayAbilityTag not set"), *this->GetName())); 44 | return; 45 | } 46 | 47 | CancelAbility(); 48 | } 49 | 50 | void UANS_ActivateAbility::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) 51 | { 52 | if (!bDeactivateOnMontageBlendingOut || !Montage) 53 | { 54 | return; 55 | } 56 | 57 | if (ActorWithASC.IsValid()) 58 | { 59 | CancelAbility(); 60 | } 61 | } 62 | 63 | void UANS_ActivateAbility::CancelAbility() 64 | { 65 | if (ActorWithASC.IsValid()) 66 | { 67 | const FGameplayTagContainer Tags = FGameplayTagContainer(GameplayAbilityTag); 68 | ActorWithASC->GetAbilitySystemComponent()->CancelAbilities(&Tags); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Animations/Notifies/ANS_CatchToAbilityInputCache.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animations/Notifies/ANS_CatchToAbilityInputCache.h" 5 | 6 | #include "AbilitySystemInterface.h" 7 | #include "UHLAbilitySystemComponent.h" 8 | #include "Components/SkeletalMeshComponent.h" 9 | #include "Core/UHLGameplayTags.h" 10 | 11 | #include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_CatchToAbilityInputCache) 12 | 13 | void UANS_CatchToAbilityInputCache::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) 14 | { 15 | Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); 16 | 17 | AActor* Actor = MeshComp->GetOwner(); 18 | if (!IsValid(Actor)) return; 19 | 20 | checkf(Actor->Implements(), TEXT("ANS_CatchToAbilityInputCache can be used only on characters nested from UHL AbilitySystem")); 21 | 22 | IAbilitySystemInterface* AbilitySystemInterface = Cast(Actor); 23 | if (AbilitySystemInterface == nullptr) return; 24 | 25 | ASC = Cast(AbilitySystemInterface->GetAbilitySystemComponent()); 26 | checkf(ASC, TEXT("ANS_CatchToAbilityInputCache can be used only on characters nested from UHL AbilitySystem")); 27 | 28 | ASC->AddLooseGameplayTag(UHLGameplayTags::TAG_UHL_AbilityInputCache_Catching); 29 | } 30 | 31 | void UANS_CatchToAbilityInputCache::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 32 | { 33 | Super::NotifyEnd(MeshComp, Animation, EventReference); 34 | 35 | if (!IsValid(ASC)) return; 36 | 37 | ASC->RemoveLooseGameplayTagCompletly(UHLGameplayTags::TAG_UHL_AbilityInputCache_Catching); 38 | } 39 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Animations/Notifies/ANS_CheckAbilityInputCache.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animations/Notifies/ANS_CheckAbilityInputCache.h" 5 | 6 | #include "AbilitySystemInterface.h" 7 | #include "UHLAbilitySystemComponent.h" 8 | #include "Components/SkeletalMeshComponent.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_CheckAbilityInputCache) 11 | 12 | void UANS_CheckAbilityInputCache::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) 13 | { 14 | Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); 15 | 16 | AActor* Actor = MeshComp->GetOwner(); 17 | if (!IsValid(Actor)) return; 18 | 19 | checkf(Actor->Implements(), TEXT("ANS_CheckAbilityInputCache can be used only on characters nested from UHL AbilitySystem")); 20 | 21 | IAbilitySystemInterface* AbilitySystemInterface = Cast(Actor); 22 | if (AbilitySystemInterface == nullptr) return; 23 | 24 | ASC = Cast(AbilitySystemInterface->GetAbilitySystemComponent()); 25 | checkf(ASC, TEXT("ANS_CheckAbilityInputCache can be used only on characters nested from UHL AbilitySystem")); 26 | } 27 | 28 | void UANS_CheckAbilityInputCache::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) 29 | { 30 | Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference); 31 | 32 | if (IsValid(ASC)) 33 | { 34 | ASC->GetAbilityInputCache()->CheckCache(); 35 | } 36 | } 37 | 38 | void UANS_CheckAbilityInputCache::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 39 | { 40 | Super::NotifyEnd(MeshComp, Animation, EventReference); 41 | 42 | if (bClearCacheOnEnd && IsValid(ASC)) 43 | { 44 | ASC->GetAbilityInputCache()->ClearCache(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Animations/Notifies/ANS_GlobalTimeDilation.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animations/Notifies/ANS_GlobalTimeDilation.h" 5 | 6 | #include "Animation/AnimMontage.h" 7 | #include "Components/SkeletalMeshComponent.h" 8 | #include "Kismet/GameplayStatics.h" 9 | 10 | 11 | void UANS_GlobalTimeDilation::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) 12 | { 13 | Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference); 14 | 15 | float GlobalTimeDilationCurveValue = 1.0f; 16 | MeshComp->GetAnimInstance()->GetCurveValueWithDefault("GlobalTimeDilation", 1.0f, GlobalTimeDilationCurveValue); 17 | 18 | UGameplayStatics::SetGlobalTimeDilation(MeshComp->GetOwner(), GlobalTimeDilationCurveValue); 19 | } 20 | 21 | void UANS_GlobalTimeDilation::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) 22 | { 23 | Super::OnMontageBlendingOut(Montage, bInterrupted); 24 | 25 | UObject* Outer = Montage->GetOuter(); 26 | UGameplayStatics::SetGlobalTimeDilation(Outer, 1.0f); 27 | } 28 | 29 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Animations/Notifies/AN_FireGameplayEvent.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animations/Notifies/AN_FireGameplayEvent.h" 5 | 6 | #include "AbilitySystemComponent.h" 7 | #include "AbilitySystemGlobals.h" 8 | #include "Components/SkeletalMeshComponent.h" 9 | #include "Abilities/GameplayAbilityTypes.h" 10 | 11 | #if WITH_EDITOR 12 | void UAN_FireGameplayEvent::PostEditChangeProperty( 13 | struct FPropertyChangedEvent& PropertyChangedEvent) 14 | { 15 | Super::PostEditChangeProperty(PropertyChangedEvent); 16 | 17 | if (PropertyChangedEvent.Property != nullptr && 18 | PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UAN_FireGameplayEvent, EventTag)) 19 | { 20 | if (UAnimSequenceBase* AnimSeq = Cast(GetOuter())) 21 | { 22 | AnimSeq->Modify(); 23 | } 24 | } 25 | } 26 | #endif 27 | 28 | FString UAN_FireGameplayEvent::GetNotifyName_Implementation() const 29 | { 30 | return FString("FireGameplayEvent->") + EventTag.ToString(); 31 | } 32 | 33 | void UAN_FireGameplayEvent::Notify( 34 | USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, 35 | const FAnimNotifyEventReference& EventReference) 36 | { 37 | Super::Notify(MeshComp, Animation, EventReference); 38 | 39 | if (!MeshComp) return; 40 | 41 | AActor* TargetActor = MeshComp->GetOwner(); 42 | if (!TargetActor) return; 43 | 44 | UAbilitySystemComponent* TargetASC = UAbilitySystemGlobals::GetAbilitySystemComponentFromActor(TargetActor); 45 | 46 | FGameplayEventData EventData; 47 | EventData.Target = TargetActor; 48 | EventData.Instigator = TargetActor; 49 | EventData.EventMagnitude = EventMagnitude; 50 | EventData.OptionalObject = OptionalObject; 51 | EventData.OptionalObject2 = OptionalObject2; 52 | EventData.TargetTags = TargetTags; 53 | EventData.InstigatorTags = InstigatorTags; 54 | TargetASC->HandleGameplayEvent(EventTag, &EventData); 55 | } -------------------------------------------------------------------------------- /Source/UHLGAS/Private/AttributeSets/UHLAttributeSet.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "AttributeSets/UHLAttributeSet.h" 5 | 6 | #include "UHLAbilitySystemComponent.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAttributeSet) 9 | 10 | UUHLAttributeSet::UUHLAttributeSet() 11 | { 12 | } 13 | 14 | UWorld* UUHLAttributeSet::GetWorld() const 15 | { 16 | const UObject* Outer = GetOuter(); 17 | check(Outer); 18 | 19 | return Outer->GetWorld(); 20 | } 21 | 22 | UUHLAbilitySystemComponent* UUHLAttributeSet::GetUHLAbilitySystemComponent() const 23 | { 24 | return Cast(GetOwningAbilitySystemComponent()); 25 | } 26 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Core/UHLAbilitySystemInterface.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Core/UHLAbilitySystemInterface.h" 5 | 6 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Development/UHLGASSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Development/UHLGASSettings.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLGASSettings) -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Input/UHLInputComponent.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Input/UHLInputComponent.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLInputComponent) 7 | 8 | UUHLInputComponent::UUHLInputComponent(const FObjectInitializer& ObjectInitializer) 9 | { 10 | } 11 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/Input/UHLInputConfig.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "Input/UHLInputConfig.h" 4 | // #include "LyraLogChannels.h" 5 | // #include "InputMappingContext.h" 6 | // #include "Settings/LyraSettingsLocal.h" 7 | // #include "Player/LyraLocalPlayer.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLInputConfig) 10 | 11 | UUHLInputConfig::UUHLInputConfig(const FObjectInitializer& ObjectInitializer) {} 12 | 13 | // const UInputAction* UGCInputConfig::FindNativeInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const 14 | // { 15 | // for (const FGCInputAction& Action : NativeInputActions) 16 | // { 17 | // if (Action.InputAction && (Action.InputTag == InputTag)) 18 | // { 19 | // return Action.InputAction; 20 | // } 21 | // } 22 | // 23 | // if (bLogNotFound) 24 | // { 25 | // UE_LOG(LogTemp, Error, TEXT("Can't find NativeInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this)); 26 | // } 27 | // 28 | // return nullptr; 29 | // } 30 | 31 | // const UInputAction* UGCInputConfig::FindAbilityInputActionForTag(const FGameplayTag& InputTag, bool bLogNotFound) const 32 | // { 33 | // for (const FGCInputActionAbilities& Action : AbilityInputActions) 34 | // { 35 | // if (Action.InputAction && (Action.AbilityTag == InputTag)) 36 | // { 37 | // return Action.InputAction; 38 | // } 39 | // } 40 | // 41 | // if (bLogNotFound) 42 | // { 43 | // UE_LOG(LogTemp, Error, TEXT("Can't find AbilityInputAction for InputTag [%s] on InputConfig [%s]."), *InputTag.ToString(), *GetNameSafe(this)); 44 | // } 45 | // 46 | // return nullptr; 47 | // } 48 | -------------------------------------------------------------------------------- /Source/UHLGAS/Private/UHLAbilitySystemConfig.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UHLAbilitySystemConfig.h" 5 | 6 | #include "Development/UHLGASSettings.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLAbilitySystemConfig) 9 | 10 | UUHLAbilitySystemConfig::UUHLAbilitySystemConfig() 11 | { 12 | const UUHLGASSettings* UHLSettings = GetDefault(); 13 | Settings = UHLSettings->AbilitySystemConfigDefaults; 14 | } -------------------------------------------------------------------------------- /Source/UHLGAS/Private/UHLGAS.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLGAS.h" 4 | 5 | #include "Misc/Paths.h" 6 | #include "GameplayTagsManager.h" 7 | 8 | #define LOCTEXT_NAMESPACE "FUHLGASModule" 9 | 10 | DEFINE_LOG_CATEGORY(LogUHLAbilitySystem); 11 | 12 | void FUHLGASModule::StartupModule() 13 | { 14 | UGameplayTagsManager& TagsManager = UGameplayTagsManager::Get(); 15 | // This code will execute after your module is loaded into memory; the exact timing is specified in the .uplugin file per-module 16 | TagsManager.AddTagIniSearchPath(FPaths::ProjectPluginsDir() / TEXT("UnrealHelperLibrary/Config/Tags")); 17 | } 18 | 19 | void FUHLGASModule::ShutdownModule() 20 | { 21 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 22 | // we call this function before unloading the module. 23 | } 24 | 25 | #undef LOCTEXT_NAMESPACE 26 | 27 | IMPLEMENT_MODULE(FUHLGASModule, UHLGAS) 28 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Animations/Notifies/ANS_ActivateAbility.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UObject/WeakInterfacePtr.h" 7 | #include "GameplayTagContainer.h" 8 | #include "AbilitySystemInterface.h" 9 | #include "Animation/Notifies/ANS_UHL_Base.h" 10 | #include "ANS_ActivateAbility.generated.h" 11 | 12 | /** 13 | * 14 | */ 15 | UCLASS(Blueprintable, Category="UnrealHelperLibrary") 16 | class UHLGAS_API UANS_ActivateAbility : public UANS_UHL_Base 17 | { 18 | GENERATED_BODY() 19 | 20 | public: 21 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="ActivateAbility") 22 | FGameplayTag GameplayAbilityTag = FGameplayTag::EmptyTag; 23 | // TODO check should work only if montage exists 24 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="ActivateAbility") 25 | bool bDeactivateOnMontageBlendingOut = true; 26 | // by default don't allow remote execution, cause its requires time 27 | // abilities in ANS's mostly don't have that time 28 | // and not impacts gameplay, only enhances input and game feel 29 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="ActivateAbility") 30 | bool bAllowRemoteActivation = false; 31 | 32 | protected: 33 | #if WITH_EDITOR 34 | /** Override this to prevent firing this notify state type in animation editors */ 35 | virtual bool ShouldFireInEditor() { return false; } 36 | #endif 37 | virtual FString GetNotifyName_Implementation() const override; 38 | 39 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 40 | virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 41 | 42 | virtual void OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) override; 43 | 44 | private: 45 | // TODO check ANS's should be stateless!? 46 | TWeakInterfacePtr ActorWithASC; 47 | 48 | UFUNCTION() 49 | void CancelAbility(); 50 | }; 51 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Animations/Notifies/ANS_CatchToAbilityInputCache.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/AnimNotifies/AnimNotifyState.h" 7 | #include "ANS_CatchToAbilityInputCache.generated.h" 8 | 9 | class UUHLAbilitySystemComponent; 10 | 11 | /** 12 | * Should end then anything that "BlockActions" end 13 | */ 14 | UCLASS() 15 | class UHLGAS_API UANS_CatchToAbilityInputCache : public UAnimNotifyState 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | #if WITH_EDITOR 21 | /** Override this to prevent firing this notify state type in animation editors */ 22 | virtual bool ShouldFireInEditor() { return false; } 23 | #endif 24 | 25 | virtual FLinearColor GetEditorColor() override { return FColor::FromHex("#FFB341"); }; 26 | virtual FString GetNotifyName_Implementation() const override { return FString("[UHL] CatchTo AbilityInputCache"); }; 27 | 28 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 29 | virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 30 | 31 | private: 32 | UPROPERTY() 33 | TObjectPtr ASC; 34 | }; 35 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Animations/Notifies/ANS_CheckAbilityInputCache.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLAbilitySystemComponent.h" 7 | #include "Animation/AnimNotifies/AnimNotifyState.h" 8 | #include "ANS_CheckAbilityInputCache.generated.h" 9 | 10 | /** 11 | * Should start after anything that "BlockActions" end 12 | * by default clears AbilityInputCache on end 13 | */ 14 | UCLASS(Category="UnrealHelperLibrary") 15 | class UHLGAS_API UANS_CheckAbilityInputCache : public UAnimNotifyState 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="CheckAbilityInputCache") 21 | bool bClearCacheOnEnd = true; 22 | 23 | #if WITH_EDITOR 24 | /** Override this to prevent firing this notify state type in animation editors */ 25 | virtual bool ShouldFireInEditor() { return false; } 26 | #endif 27 | 28 | virtual FLinearColor GetEditorColor() override { return FColor::FromHex("#FFA420"); }; 29 | virtual FString GetNotifyName_Implementation() const override { return FString("[UHL] Check AbilityInputCache"); }; 30 | 31 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 32 | virtual void NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) override; 33 | virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 34 | 35 | private: 36 | UPROPERTY() 37 | TObjectPtr ASC; 38 | }; 39 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Animations/Notifies/ANS_GlobalTimeDilation.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animations/Notifies/ANS_ActivateAbility.h" 7 | #include "ANS_GlobalTimeDilation.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS(Blueprintable, meta=(ToolTip="Controls when GlobalTimeDilation can be changed by GlobalTimeDilation Curve")) 13 | class UHLGAS_API UANS_GlobalTimeDilation : public UANS_UHL_Base 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) override; 19 | virtual void OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) override; 20 | 21 | virtual FLinearColor GetEditorColor() override { return FLinearColor(232/256.0f, 229/256.0f, 139/256.0f); }; 22 | virtual FString GetNotifyName_Implementation() const override { return FString("GlobalTimeDilation"); }; 23 | }; 24 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Animations/Notifies/AN_FireGameplayEvent.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "Animation/Notifies/AN_UHL_Base.h" 8 | #include "AN_FireGameplayEvent.generated.h" 9 | 10 | /** 11 | * 12 | */ 13 | UCLASS(Blueprintable, Category="UnrealHelperLibrary") 14 | class UHLGAS_API UAN_FireGameplayEvent : public UAN_UHL_Base 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent") 20 | FGameplayTag EventTag = FGameplayTag::EmptyTag; 21 | 22 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent", Instanced) 23 | UObject* OptionalObject = nullptr; 24 | 25 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent", Instanced) 26 | UObject* OptionalObject2 = nullptr; 27 | 28 | // tags that required on instigator to fire event ?? 29 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent") 30 | FGameplayTagContainer InstigatorTags = {}; 31 | 32 | // tags that required on target to fire event ?? 33 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent") 34 | FGameplayTagContainer TargetTags = {}; 35 | 36 | UPROPERTY(EditAnywhere, Category="FireGameplayEvent") 37 | float EventMagnitude = 0.0f; 38 | 39 | protected: 40 | #if WITH_EDITOR 41 | /** Override this to prevent firing this notify state type in animation editors */ 42 | virtual bool ShouldFireInEditor() { return false; } 43 | virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; 44 | #endif 45 | 46 | virtual FLinearColor GetEditorColor() override { return FColor::FromHex("#FF7DE7"); }; 47 | virtual FString GetNotifyName_Implementation() const override; 48 | 49 | virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 50 | }; 51 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/AttributeSets/UHLAttributeSet.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "AttributeSet.h" 7 | #include "GameplayEffect.h" 8 | #include "UHLAttributeSet.generated.h" 9 | 10 | class UUHLAbilitySystemComponent; 11 | 12 | /** 13 | * This macro defines a set of helper functions for accessing and initializing attributes. 14 | * 15 | * The following example of the macro: 16 | * ATTRIBUTE_ACCESSORS(ULyraHealthSet, Health) 17 | * will create the following functions: 18 | * static FGameplayAttribute GetHealthAttribute(); 19 | * float GetHealth() const; 20 | * void SetHealth(float NewVal); 21 | * void InitHealth(float NewVal); 22 | */ 23 | #define ATTRIBUTE_ACCESSORS(ClassName, PropertyName) \ 24 | GAMEPLAYATTRIBUTE_PROPERTY_GETTER(ClassName, PropertyName) \ 25 | GAMEPLAYATTRIBUTE_VALUE_GETTER(PropertyName) \ 26 | GAMEPLAYATTRIBUTE_VALUE_SETTER(PropertyName) \ 27 | GAMEPLAYATTRIBUTE_VALUE_INITTER(PropertyName) 28 | 29 | /** 30 | * Delegate used to broadcast attribute events, some of these parameters may be null on clients: 31 | * @param EffectInstigator The original instigating actor for this event 32 | * @param EffectCauser The physical actor that caused the change 33 | * @param EffectSpec The full effect spec for this change 34 | * @param EffectMagnitude The raw magnitude, this is before clamping 35 | * @param OldValue The value of the attribute before it was changed 36 | * @param NewValue The value after it was changed 37 | */ 38 | DECLARE_MULTICAST_DELEGATE_SixParams(FUHLAttributeEvent, AActor* /*EffectInstigator*/, AActor* /*EffectCauser*/, const FGameplayEffectSpec* /*EffectSpec*/, float /*EffectMagnitude*/, float /*OldValue*/, float /*NewValue*/); 39 | 40 | /** 41 | * Lyra based class for sharing common attribute set functions 42 | */ 43 | UCLASS() 44 | class UHLGAS_API UUHLAttributeSet : public UAttributeSet 45 | { 46 | GENERATED_BODY() 47 | 48 | public: 49 | UUHLAttributeSet(); 50 | 51 | UWorld* GetWorld() const override; 52 | 53 | UUHLAbilitySystemComponent* GetUHLAbilitySystemComponent() const; 54 | }; 55 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Core/UHLAbilitySystemInterface.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLAbilitySystemComponent.h" 7 | #include "UObject/Interface.h" 8 | #include "UHLAbilitySystemInterface.generated.h" 9 | 10 | // This class does not need to be modified. 11 | UINTERFACE(Blueprintable, MinimalAPI) 12 | class UUHLAbilitySystemInterface : public UInterface 13 | { 14 | GENERATED_BODY() 15 | }; 16 | 17 | /** 18 | * 19 | */ 20 | class UHLGAS_API IUHLAbilitySystemInterface 21 | { 22 | GENERATED_BODY() 23 | 24 | public: 25 | /** Returns the ability system component to use for this actor. It may live on another actor, such as a Pawn using the PlayerState's component */ 26 | UFUNCTION(Category="UHLAbilitySystemInterface", BlueprintNativeEvent, BlueprintCallable) 27 | UUHLAbilitySystemComponent* GetUHLAbilitySystemComponent() const; 28 | }; -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Development/UHLGASSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "UHLAbilitySystemConfig.h" 7 | #include "Engine/DeveloperSettings.h" 8 | #include "Misc/App.h" 9 | #include "UHLGASSettings.generated.h" 10 | 11 | /** 12 | * 13 | */ 14 | UCLASS(Config="Game", DefaultConfig, DisplayName="UHL GAS") 15 | class UHLGAS_API UUHLGASSettings : public UDeveloperSettings 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | UPROPERTY(Config, EditAnywhere, Category="Ability System Defaults") 21 | FUHLAbilitySystemSettings AbilitySystemConfigDefaults = {}; 22 | 23 | UPROPERTY(Config, EditAnywhere, Category="Ability System Defaults") 24 | bool bUseAbilitySystemConfigDefaultsInASC = true; 25 | 26 | protected: 27 | //~UDeveloperSettings interface 28 | virtual FName GetCategoryName() const override { return FApp::GetProjectName(); }; 29 | //~End of UDeveloperSettings interface 30 | }; 31 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Input/AbilityInputCache.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameplayTagContainer.h" 7 | #include "AbilityInputCache.generated.h" 8 | 9 | 10 | class UUHLAbilitySystemComponent; 11 | 12 | DECLARE_LOG_CATEGORY_EXTERN(Log_UHL_AbilityInputCache, Log, All); 13 | 14 | UCLASS(Blueprintable) 15 | class UAbilityInputCachePayload : public UObject 16 | { 17 | GENERATED_BODY() 18 | 19 | public: 20 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Payload") 21 | FGameplayTag AbilityGameplayTagToCache; 22 | }; 23 | 24 | /** 25 | * TODO clear cache on successfully activated ability? is it option? 26 | */ 27 | UCLASS() 28 | class UHLGAS_API UAbilityInputCache : public UObject 29 | { 30 | GENERATED_BODY() 31 | 32 | public: 33 | UFUNCTION(Category = "AbilityInputCache") 34 | void SetUp(UUHLAbilitySystemComponent* ASC_In); 35 | 36 | UFUNCTION(BlueprintCallable, Category = "AbilityInputCache") 37 | bool AddTagToCache(FGameplayTag AbilityTag_In); 38 | UFUNCTION(BlueprintCallable, Category = "AbilityInputCache") 39 | bool AddTagsToCache(TArray AbilityTags_In, bool bReverse = false); 40 | UFUNCTION(BlueprintCallable, Category = "AbilityInputCache") 41 | void CheckCache(); 42 | UFUNCTION(BlueprintCallable, Category = "AbilityInputCache") 43 | void ClearCache(); 44 | UFUNCTION(BlueprintCallable, Category = "AbilityInputCache") 45 | TArray GetAbilityInputCache() const { return AbilityInputCache; }; 46 | // TODO: remove tags from cache explicitly (probably bad practice, dont give option to do so?) 47 | // UFUNCTION(BlueprintCallable) 48 | // void RemoveTagFromCache(FGameplayTag AbilityTag_In); 49 | 50 | private: 51 | UPROPERTY() 52 | TArray AbilityInputCache = {}; 53 | TWeakObjectPtr ASC; 54 | }; 55 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Tasks/AA_TryActivateAbilityAndWait.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Abilities/Async/AbilityAsync.h" 7 | #include "AA_TryActivateAbilityAndWait.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLGAS_API UAA_TryActivateAbilityAndWait : public UAbilityAsync 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | UFUNCTION() 19 | void OnAbilityActivate(UGameplayAbility *ActivatedAbility); 20 | UFUNCTION() 21 | void OnAbilityDeactivate(UGameplayAbility *ActivatedAbility); 22 | 23 | /** 24 | * Wait until the specified gameplay attribute is changed on a target ability system component 25 | * It will keep listening as long as OnlyTriggerOnce = false 26 | * If used in an ability graph, this async action will wait even after activation ends. It's recommended to use WaitForAttributeChange instead. 27 | */ 28 | UFUNCTION(BlueprintCallable, Category = "UnrealHelperLibrary|Ability|Tasks", meta = (DefaultToSelf = "TargetActor", BlueprintInternalUseOnly = "TRUE")) 29 | static UAA_TryActivateAbilityAndWait* TryActivateAbilityAndWait(AActor* TargetActor, FGameplayTag WithTag, 30 | bool IncludeTriggeredAbilities=false, bool bAllowRemoteActivation=true, bool TriggerOnce=true); 31 | 32 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FWaitAbilityActivateDelegate, UGameplayAbility*, ActivatedAbility); 33 | UPROPERTY(BlueprintAssignable) 34 | FWaitAbilityActivateDelegate OnActivate; 35 | 36 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FWaitAbilityDeactivateDelegate, UGameplayAbility*, ActivatedAbility); 37 | UPROPERTY(BlueprintAssignable) 38 | FWaitAbilityActivateDelegate OnEndAbility; 39 | 40 | protected: 41 | virtual void Activate() override; 42 | virtual void EndAction() override; 43 | 44 | FGameplayTag WithTag; 45 | FGameplayTag WithoutTag; 46 | bool IncludeTriggeredAbilities = false; 47 | bool TriggerOnce; 48 | bool bAllowRemoteActivation = true; 49 | FGameplayTagRequirements TagRequirements; 50 | 51 | FGameplayTagQuery Query; 52 | 53 | protected: 54 | FDelegateHandle OnAbilityActivateDelegateHandle; 55 | }; 56 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/Tasks/AA_WaitAbilityActivate.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Abilities/Async/AbilityAsync.h" 7 | #include "AA_WaitAbilityActivate.generated.h" 8 | 9 | /** 10 | * 11 | */ 12 | UCLASS() 13 | class UHLGAS_API UAA_WaitAbilityActivate : public UAbilityAsync 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | 19 | UFUNCTION() 20 | void OnAbilityActivate(UGameplayAbility *ActivatedAbility); 21 | 22 | /** 23 | * Wait until the specified gameplay attribute is changed on a target ability system component 24 | * It will keep listening as long as OnlyTriggerOnce = false 25 | * If used in an ability graph, this async action will wait even after activation ends. It's recommended to use WaitForAttributeChange instead. 26 | */ 27 | UFUNCTION(BlueprintCallable, Category = "UnrealHelperLibrary|Ability|Tasks", meta = (DefaultToSelf = "TargetActor", BlueprintInternalUseOnly = "TRUE")) 28 | static UAA_WaitAbilityActivate* WaitForAbilityActivate(AActor* TargetActor, FGameplayTag WithTag, 29 | FGameplayTag WithoutTag, bool IncludeTriggeredAbilities=false, bool TriggerOnce=true); 30 | 31 | UFUNCTION(BlueprintCallable, Category = "UnrealHelperLibrary|Ability|Tasks", meta = (DefaultToSelf = "TargetActor", BlueprintInternalUseOnly = "TRUE")) 32 | static UAA_WaitAbilityActivate* WaitForAbilityActivateWithTagRequirements(AActor* TargetActor, 33 | FGameplayTagRequirements TagRequirements, bool IncludeTriggeredAbilities = false, 34 | bool TriggerOnce = true); 35 | 36 | UFUNCTION(BlueprintCallable, Category = "UnrealHelperLibrary|Ability|Tasks", meta = (DefaultToSelf = "TargetActor", BlueprintInternalUseOnly = "TRUE")) 37 | static UAA_WaitAbilityActivate* WaitForAbilityActivate_Query(AActor* TargetActor, 38 | FGameplayTagQuery Query, bool IncludeTriggeredAbilities = false, bool TriggerOnce = true); 39 | 40 | 41 | DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FWaitAbilityActivateDelegate, UGameplayAbility*, ActivatedAbility); 42 | UPROPERTY(BlueprintAssignable) 43 | FWaitAbilityActivateDelegate OnActivate; 44 | 45 | protected: 46 | virtual void Activate() override; 47 | virtual void EndAction() override; 48 | 49 | FGameplayTag WithTag; 50 | FGameplayTag WithoutTag; 51 | bool IncludeTriggeredAbilities = false; 52 | bool TriggerOnce; 53 | FGameplayTagRequirements TagRequirements; 54 | 55 | FGameplayTagQuery Query; 56 | 57 | protected: 58 | 59 | FDelegateHandle OnAbilityActivateDelegateHandle; 60 | }; 61 | -------------------------------------------------------------------------------- /Source/UHLGAS/Public/UHLGAS.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | UHLGAS_API DECLARE_LOG_CATEGORY_EXTERN(LogUHLAbilitySystem, Log, All); 8 | 9 | class FUHLGASModule : public IModuleInterface 10 | { 11 | public: 12 | /** IModuleInterface implementation */ 13 | virtual void StartupModule() override; 14 | virtual void ShutdownModule() override; 15 | }; 16 | -------------------------------------------------------------------------------- /Source/UHLGAS/UHLGAS.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLGAS : ModuleRules 6 | { 7 | public UHLGAS(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | // ... add other public dependencies that you statically link with here ... 30 | "GameplayAbilities", 31 | "GameplayTags", 32 | "GameplayTasks", 33 | "EnhancedInput", 34 | } 35 | ); 36 | 37 | 38 | PrivateDependencyModuleNames.AddRange( 39 | new string[] 40 | { 41 | "CoreUObject", 42 | "Engine", 43 | 44 | "DeveloperSettings", 45 | 46 | "UnrealHelperLibrary", 47 | "UHLDebugSystem", 48 | "UHLAI", 49 | } 50 | ); 51 | 52 | 53 | DynamicallyLoadedModuleNames.AddRange( 54 | new string[] 55 | { 56 | // ... add any modules that your module loads dynamically here ... 57 | } 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Source/UHLModulesHelper/Private/UHLConfigMigrationUtils.cpp: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "UHLConfigMigrationUtils.h" 4 | 5 | namespace UHLConfigMigrationUtils 6 | { 7 | bool MigrateConfigSectionIfNeeded( 8 | const FString& FromSection, const FString& ToSection, 9 | const FString& MigrationKey, 10 | const FString& FromConfigFile, const FString& ToConfigFile) 11 | { 12 | // Check if migration has already been done. 13 | bool bMigrationDone = false; 14 | GConfig->GetBool(*ToSection, *MigrationKey, bMigrationDone, ToConfigFile); 15 | if (bMigrationDone) 16 | { 17 | UE_LOG(LogTemp, Log, TEXT("Migration already completed.")); 18 | return false; 19 | } 20 | 21 | // Retrieve all lines from the old section. 22 | TArray SectionLines; 23 | if (GConfig->GetSection(*FromSection, SectionLines, FromConfigFile)) 24 | { 25 | UE_LOG(LogTemp, Log, TEXT("Found %d lines in the old section."), SectionLines.Num()); 26 | for (const FString& Line : SectionLines) 27 | { 28 | FString Key, Value; 29 | // Split the line into Key and Value. 30 | if (Line.Split(TEXT("="), &Key, &Value)) 31 | { 32 | Key = Key.TrimStartAndEnd(); 33 | Value = Value.TrimStartAndEnd(); 34 | UE_LOG(LogTemp, Log, TEXT("Migrating key: %s with value: %s"), *Key, *Value); 35 | GConfig->AddToSection(*ToSection, *Key, *Value, ToConfigFile); 36 | } 37 | else 38 | { 39 | UE_LOG(LogTemp, Warning, TEXT("Failed to split line: %s"), *Line); 40 | } 41 | } 42 | 43 | // Mark the migration as done. 44 | GConfig->SetBool(*ToSection, *MigrationKey, true, ToConfigFile); 45 | // Flush all changes to disk. 46 | GConfig->Flush(true, ToConfigFile); 47 | } 48 | else 49 | { 50 | UE_LOG(LogTemp, Warning, TEXT("Old settings section %s not found in %s"), *FromSection, *FromConfigFile); 51 | } 52 | 53 | return true; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /Source/UHLModulesHelper/Private/UHLModulesHelper.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #include "UHLModulesHelper.h" 4 | 5 | #include "Misc/Paths.h" 6 | #include "GameplayTagsManager.h" 7 | 8 | #define LOCTEXT_NAMESPACE "FUHLModulesHelperModule" 9 | 10 | 11 | void FUHLModulesHelperModule::StartupModule() 12 | { 13 | } 14 | 15 | void FUHLModulesHelperModule::ShutdownModule() 16 | { 17 | // This function may be called during shutdown to clean up your module. For modules that support dynamic reloading, 18 | // we call this function before unloading the module. 19 | } 20 | 21 | #undef LOCTEXT_NAMESPACE 22 | 23 | IMPLEMENT_MODULE(FUHLModulesHelperModule, UHLModulesHelper) 24 | -------------------------------------------------------------------------------- /Source/UHLModulesHelper/Public/UHLConfigMigrationUtils.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | namespace UHLConfigMigrationUtils 4 | { 5 | /** 6 | * Utility to migrate all config keys from one section to another. 7 | * WARNING migration will be done only when you change your settings 8 | * 9 | * @param FromSection config section from which your config will be migrated e.g. TEXT("/Script/UnrealHelperLibrary.UHLDebugSubsystemSettings") 10 | * @param ToSection config section to which your config will be migrated e.g. TEXT("/Script/UHLDebug.UHLDebugSubsystemSettings") 11 | * @param MigrationKey property in your class that will be used as marker that migration completed, required to create UPROPERTY(config) for this 12 | * @param FromConfigFile config file that will be used to get config section 13 | * @param ToConfigFile config file that will be used to set config section 14 | * @return bool if successfully migrated 15 | */ 16 | UHLMODULESHELPER_API bool MigrateConfigSectionIfNeeded( 17 | const FString& FromSection, 18 | const FString& ToSection, 19 | const FString& MigrationKey, 20 | const FString& FromConfigFile, 21 | const FString& ToConfigFile 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Source/UHLModulesHelper/Public/UHLModulesHelper.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | 8 | class FUHLModulesHelperModule : public IModuleInterface 9 | { 10 | public: 11 | /** IModuleInterface implementation */ 12 | virtual void StartupModule() override; 13 | virtual void ShutdownModule() override; 14 | }; 15 | -------------------------------------------------------------------------------- /Source/UHLModulesHelper/UHLModulesHelper.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UHLModulesHelper : ModuleRules 6 | { 7 | public UHLModulesHelper(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | // ... add other public dependencies that you statically link with here ... 30 | } 31 | ); 32 | 33 | 34 | PrivateDependencyModuleNames.AddRange( 35 | new string[] 36 | { 37 | "CoreUObject", 38 | "Engine", 39 | } 40 | ); 41 | 42 | 43 | DynamicallyLoadedModuleNames.AddRange( 44 | new string[] 45 | { 46 | // ... add any modules that your module loads dynamically here ... 47 | } 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Animation/Notifies/ANS_MagnetTo.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animation/Notifies/ANS_MagnetTo.h" 5 | 6 | #include "GameFramework/Character.h" 7 | #include "Kismet/KismetMathLibrary.h" 8 | #include "Components/SkeletalMeshComponent.h" 9 | 10 | #include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_MagnetTo) 11 | 12 | void UANS_MagnetTo::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) 13 | { 14 | Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); 15 | 16 | // Speed = Distance / TotalDuration / 60; 17 | BaseCharacter = Cast(MeshComp->GetOwner()); 18 | 19 | // FTimerHandle TimerHandle; 20 | // MeshComp->GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &UANS_MagnetTo::TimerTick, 0.0f, true, -1); 21 | 22 | // GetWorld()->GetTimerManager().SetTimer(TimerHandle, this, &ABaseDestructibleActor::FinalDestruct, TimeToDisappear); 23 | } 24 | 25 | void UANS_MagnetTo::NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) 26 | { 27 | Super::NotifyTick(MeshComp, Animation, FrameDeltaTime, EventReference); 28 | 29 | Alpha = FMath::Clamp(Alpha + FrameDeltaTime, 0, 1); 30 | FVector NewLocation = BaseCharacter->GetActorLocation(); 31 | float Delta = UKismetMathLibrary::Ease(0, Distance / 1000, Alpha, EEasingFunc::Linear); 32 | NewLocation += BaseCharacter->GetActorForwardVector() * Delta; 33 | BaseCharacter->SetActorLocation(NewLocation, true); 34 | // BaseCharacter.Get()->GetCharacterMovement()->AddForce(BaseCharacter-> GetActorForwardVector() * Distance); 35 | } 36 | 37 | void UANS_MagnetTo::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 38 | { 39 | Super::NotifyEnd(MeshComp, Animation, EventReference); 40 | } 41 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Animation/Notifies/ANS_UHL_Base.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animation/Notifies/ANS_UHL_Base.h" 5 | #include "Runtime/Engine/Classes/Animation/AnimMontage.h" 6 | #include "Engine/World.h" 7 | #include "Components/SkeletalMeshComponent.h" 8 | 9 | #include UE_INLINE_GENERATED_CPP_BY_NAME(ANS_UHL_Base) 10 | 11 | void UANS_UHL_Base::NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) 12 | { 13 | Super::NotifyBegin(MeshComp, Animation, TotalDuration, EventReference); 14 | 15 | const UAnimMontage* CurrentAnimMontage = EventReference.GetNotify()->GetLinkedMontage(); 16 | 17 | if (CurrentAnimMontage) 18 | { 19 | if (bUseOnMontageBlendingOut) 20 | { 21 | MeshComp->AnimScriptInstance->OnMontageBlendingOut.AddUniqueDynamic(this, &UANS_UHL_Base::OnMontageBlendingOut); 22 | } 23 | } 24 | } 25 | 26 | void UANS_UHL_Base::NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 27 | { 28 | Super::NotifyEnd(MeshComp, Animation, EventReference); 29 | 30 | if (ShouldUseExperimentalUHLFeatures()) 31 | { 32 | NotifyEndOrBlendOut(MeshComp); 33 | } 34 | 35 | if (bUseOnMontageBlendingOut) 36 | { 37 | MeshComp->AnimScriptInstance->OnMontageBlendingOut.RemoveDynamic(this, &UANS_UHL_Base::OnMontageBlendingOut); 38 | } 39 | } 40 | 41 | /** Experimental **/ 42 | void UANS_UHL_Base::NotifyEndOrBlendOut(USkeletalMeshComponent* MeshComp) 43 | { 44 | if (!ShouldUseExperimentalUHLFeatures()) return; 45 | } 46 | /** ~Experimental **/ 47 | 48 | void UANS_UHL_Base::OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted) 49 | { 50 | if (!Montage) 51 | { 52 | return; 53 | } 54 | 55 | if (ShouldUseExperimentalUHLFeatures()) 56 | { 57 | UObject* Outer = Montage->GetOuter(); 58 | USkeletalMeshComponent* SkeletalMeshComponent = Cast(Outer); 59 | if (SkeletalMeshComponent) 60 | { 61 | NotifyEndOrBlendOut(SkeletalMeshComponent); 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Animation/Notifies/AN_AttachActorWithUniqueId.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animation/Notifies/AN_AttachActorWithUniqueId.h" 5 | 6 | #include "Components/SkeletalMeshComponent.h" 7 | 8 | #include UE_INLINE_GENERATED_CPP_BY_NAME(AN_AttachActorWithUniqueId) 9 | 10 | #if WITH_EDITOR 11 | void UAN_AttachActorWithUniqueId::PostEditChangeProperty( 12 | struct FPropertyChangedEvent& PropertyChangedEvent) 13 | { 14 | Super::PostEditChangeProperty(PropertyChangedEvent); 15 | 16 | if (PropertyChangedEvent.Property != nullptr && 17 | PropertyChangedEvent.Property->GetFName() == GET_MEMBER_NAME_CHECKED(UAN_AttachActorWithUniqueId, UniqueId)) 18 | { 19 | if (UAnimSequenceBase* AnimSeq = Cast(GetOuter())) 20 | { 21 | AnimSeq->Modify(); 22 | } 23 | } 24 | } 25 | #endif 26 | 27 | FString UAN_AttachActorWithUniqueId::GetNotifyName_Implementation() const 28 | { 29 | return FString("Attach With UniqueId -> ") + UniqueId.ToString(); 30 | } 31 | 32 | void UAN_AttachActorWithUniqueId::Notify( 33 | USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, 34 | const FAnimNotifyEventReference& EventReference) 35 | { 36 | Super::Notify(MeshComp, Animation, EventReference); 37 | 38 | if (!MeshComp) return; 39 | 40 | AActor* OwnerActor = MeshComp->GetOwner(); 41 | if (!OwnerActor) return; 42 | 43 | // 1) Load the class synchronously 44 | UClass* ActorClass = ActorToAttach.LoadSynchronous(); 45 | if (!ActorClass) 46 | { 47 | UE_LOG(LogTemp, Warning, TEXT("Failed to load ActorToSpawn!")); 48 | return; 49 | } 50 | 51 | FActorSpawnParameters ActorSpawnParameters; 52 | ActorSpawnParameters.Owner = OwnerActor; 53 | ActorSpawnParameters.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; 54 | 55 | AActor* SpawnedActor = MeshComp->GetWorld()->SpawnActor(ActorClass, 56 | MeshComp->GetSocketTransform(SocketName), ActorSpawnParameters); 57 | 58 | if (!SpawnedActor) return; 59 | 60 | SpawnedActor->AttachToComponent(MeshComp, AttachmentRules.ToEngineRules(), SocketName); 61 | SpawnedActor->Tags.Add(UniqueId); 62 | } -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Animation/Notifies/AN_UHL_Base.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Animation/Notifies/AN_UHL_Base.h" 5 | #include "Components/SkeletalMeshComponent.h" 6 | 7 | #include UE_INLINE_GENERATED_CPP_BY_NAME(AN_UHL_Base) 8 | 9 | void UAN_UHL_Base::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) 10 | { 11 | OnNotified.Broadcast(MeshComp); 12 | 13 | Super::Notify(MeshComp, Animation, EventReference); 14 | } 15 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Core/UHLGameplayTags.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Core/UHLGameplayTags.h" 5 | 6 | namespace UHLGameplayTags 7 | { 8 | UE_DEFINE_GAMEPLAY_TAG(TAG_Gameplay_AbilityInputBlocked, "Gameplay.AbilityInputBlocked"); 9 | UE_DEFINE_GAMEPLAY_TAG(TAG_UHL_Debug_CheckGASGameplayTagsOnActor, "UHL.Debug.CheckGASGameplayTagsOnActor"); 10 | 11 | // Abilities 12 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_Abilities_Character_GlobalTimeDilation, "UHL.Abilities.Character.GlobalTimeDilation", ""); 13 | 14 | // AbilityInputCache 15 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_AbilityInputCache_Catching, "UHL.AbilityInputCache.Catching", "Opened for catching actions to AbilityInputCache"); 16 | 17 | // Debug Categories 18 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem, "UHL.DebugCategory.AbilitySystem", ""); 19 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem_Attributes, "UHL.DebugCategory.AbilitySystem.Attributes", ""); 20 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem_Effects, "UHL.DebugCategory.AbilitySystem.Effects", ""); 21 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem_Abilities, "UHL.DebugCategory.AbilitySystem.Abilities", ""); 22 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem_DebugBasicHUD, "UHL.DebugCategory.AbilitySystem.DebugBasicHUD", ""); 23 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_AbilitySystem_DebugAbilityTags, "UHL.DebugCategory.AbilitySystem.DebugAbilityTags", ""); 24 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem, "UHL.DebugCategory.InputSystem.EnhancedInputSystem", ""); 25 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_InputSystem_AbilityInputCache, "UHL.DebugCategory.InputSystem.AbilityInputCache", ""); 26 | UE_DEFINE_GAMEPLAY_TAG_COMMENT(TAG_UHL_DebugCategory_Collisions, "UHL.DebugCategory.Collisions", ""); 27 | 28 | // Errors 29 | UE_DEFINE_GAMEPLAY_TAG(TAG_Error, "Error"); 30 | } 31 | 32 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/Development/UHLSettings.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "Development/UHLSettings.h" 5 | 6 | #include UE_INLINE_GENERATED_CPP_BY_NAME(UHLSettings) -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Private/UI/UHLHUD.cpp: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | 4 | #include "UI/UHLHUD.h" 5 | 6 | #include "Engine/World.h" 7 | #include "Blueprint/WidgetLayoutLibrary.h" 8 | 9 | void AUHLHUD::DrawHUD() 10 | { 11 | Super::DrawHUD(); 12 | 13 | if (!bEnabledDrawDebug) return; 14 | 15 | FVector2D ViewportSize = UWidgetLayoutLibrary::GetViewportSize(GetWorld()); 16 | FVector2D ViewportSizeOffset = ViewportSize / 2; 17 | 18 | // FVector2f Test; 19 | // UUnrealHelperLibraryBPL::DrawDebugCrossHair(GetWorld(), 100.0f, 3.0f, 0.0f, Test, FLinearColor::Red); 20 | 21 | for (const FLineInfo& LineInfo : LineInfos) 22 | { 23 | FVector2D StartPos = LineInfo.Start; 24 | FVector2D EndPos = LineInfo.End; 25 | if (LineInfo.bRelativeToViewportCenter) 26 | { 27 | StartPos += ViewportSizeOffset; 28 | EndPos += ViewportSizeOffset; 29 | } 30 | DrawLine( 31 | StartPos.X, StartPos.Y, 32 | EndPos.X, EndPos.Y, 33 | LineInfo.Color, 34 | LineInfo.LineThickness 35 | ); 36 | FVector2D TextPos = (EndPos - StartPos) + ViewportSizeOffset; 37 | 38 | DrawText(LineInfo.Text, FColor::Red, TextPos.X, TextPos.Y); 39 | } 40 | LineInfos.RemoveAll([=](const FLineInfo& LineInfo) 41 | { 42 | return !LineInfo.bPersistent; 43 | }); 44 | } 45 | 46 | void AUHLHUD::AddOrUpdateLineInfoToDrawNextTick(FLineInfo LineInfo_In) 47 | { 48 | LineInfos.Add(LineInfo_In); 49 | } -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/ANS_EnableRootMotionZAxisMovement.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "ANS_UHL_Base.h" 7 | #include "Animation/AnimMontage.h" 8 | #include "Animation/AnimNotifies/AnimNotifyState.h" 9 | #include "Engine/EngineTypes.h" 10 | #include "ANS_EnableRootMotionZAxisMovement.generated.h" 11 | 12 | class ACharacter; 13 | 14 | /** 15 | * Usefull for root motion jumps (characters/enemies) 16 | * 17 | * Enables MOVE_Flying mode during ANS, 18 | * on end if movement mode is still MOVE_Flying - changes it on MOVE_Falling 19 | * 20 | * if "bStopMontageIfLandCheckFails" - stops montage if land check failed on NotifyEnd 21 | */ 22 | UCLASS() 23 | class UNREALHELPERLIBRARY_API UANS_EnableRootMotionZAxisMovement : public UANS_UHL_Base 24 | { 25 | GENERATED_BODY() 26 | 27 | public: 28 | UANS_EnableRootMotionZAxisMovement(const FObjectInitializer& ObjectInitializer); 29 | 30 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="EnableRootMotionZAxisMovement") 31 | bool bStopMontageIfLandCheckFails = false; 32 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="EnableRootMotionZAxisMovement", meta=(EditCondition = "bStopMontageIfLandCheckFails", EditConditionHides)) 33 | float LandCheckDistance = 50.0f; 34 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="EnableRootMotionZAxisMovement", meta=(EditCondition = "bStopMontageIfLandCheckFails", EditConditionHides)) 35 | TEnumAsByte CollisionChannel = ECC_Pawn; 36 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="EnableRootMotionZAxisMovement", meta=(EditCondition = "bStopMontageIfLandCheckFails", EditConditionHides)) 37 | FMontageBlendSettings LandCheckBlendOutSettings; 38 | 39 | UPROPERTY(EditAnywhere, BlueprintReadWrite, AdvancedDisplay, Category="EnableRootMotionZAxisMovement") 40 | bool bDebug = false; 41 | 42 | #if WITH_EDITOR 43 | /** Override this to prevent firing this notify state type in animation editors */ 44 | virtual bool ShouldFireInEditor() { return false; } 45 | #endif 46 | 47 | virtual FLinearColor GetEditorColor() override { return FLinearColor(0.0f, 0.74f, 1.0f, 1.0f); }; 48 | virtual FString GetNotifyName_Implementation() const override { return FString("EnableRootMotionZAxisMovement"); }; 49 | 50 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 51 | 52 | virtual bool ShouldUseExperimentalUHLFeatures() const override { return true; }; 53 | virtual void NotifyEndOrBlendOut(USkeletalMeshComponent* MeshComp) override; 54 | 55 | private: 56 | EMovementMode InitialMovementMode = EMovementMode::MOVE_None; 57 | }; 58 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/ANS_MagnetTo.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/AnimNotifies/AnimNotifyState.h" 7 | #include "BehaviorTree/BlackboardData.h" 8 | #include "ANS_MagnetTo.generated.h" 9 | 10 | class ACharacter; 11 | 12 | /** 13 | * 14 | */ 15 | UCLASS() 16 | class UNREALHELPERLIBRARY_API UANS_MagnetTo : public UAnimNotifyState 17 | { 18 | GENERATED_BODY() 19 | 20 | public: 21 | // UPROPERTY(Category=Decorator, EditAnywhere) 22 | // bool bUseBlackboardActor = false; 23 | UPROPERTY(Category="Decorator", EditAnywhere) 24 | bool bMagnetToActorFromBlackboard = false; 25 | UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="bMagnetToActorFromBlackboard", EditConditionHides)) 26 | FBlackboardKeySelector BlackboardActor; 27 | 28 | UPROPERTY(Category="Decorator", EditAnywhere, meta=(Units = "Centimeters")) 29 | float Distance = 200.0f; 30 | UPROPERTY(Category="Decorator", EditAnywhere, meta=(EditCondition="!bMagnetToActorFromBlackboard", EditConditionHides)) 31 | float Angle = 0.0f; 32 | 33 | UPROPERTY(Category="Decorator", EditAnywhere) 34 | bool bCustomTime = false; 35 | 36 | #if WITH_EDITOR 37 | /** Override this to prevent firing this notify state type in animation editors */ 38 | virtual bool ShouldFireInEditor() { return false; } 39 | #endif 40 | 41 | virtual FLinearColor GetEditorColor() override { return FLinearColor(0.0f, 0.74f, 1.0f, 1.0f); }; 42 | virtual FString GetNotifyName_Implementation() const override { return FString("MagnetTo"); }; 43 | 44 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 45 | virtual void NotifyTick(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float FrameDeltaTime, const FAnimNotifyEventReference& EventReference) override; 46 | virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 47 | 48 | private: 49 | TWeakObjectPtr BaseCharacter; 50 | // EMovementMode InitialMovementMode; 51 | float Speed = 0.0f; 52 | float Alpha = 0.0f; 53 | 54 | // UFUNCTION() 55 | // void OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted); 56 | }; 57 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/ANS_UHL_Base.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/AnimInstance.h" 7 | #include "Animation/AnimNotifies/AnimNotifyState.h" 8 | #include "ANS_UHL_Base.generated.h" 9 | 10 | class USkeletalMeshComponent; 11 | 12 | /** 13 | * with events like OnMontageBlendOut, OnMontageInterrupted... 14 | * you can disable subscribing OnMontageBlendOut, by "bUseOnMontageBlendingOut=false" in constructor 15 | */ 16 | UCLASS(Blueprintable, Category="UnrealHelperLibrary") 17 | class UNREALHELPERLIBRARY_API UANS_UHL_Base : public UAnimNotifyState 18 | { 19 | GENERATED_BODY() 20 | 21 | protected: 22 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="ANS_UHL_Base") 23 | bool bUseOnMontageBlendingOut = true; 24 | 25 | virtual void NotifyBegin(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, float TotalDuration, const FAnimNotifyEventReference& EventReference) override; 26 | virtual void NotifyEnd(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 27 | 28 | /** Experimental **/ 29 | // Should use experimental features like "NotifyEndOrBlendOut" 30 | virtual bool ShouldUseExperimentalUHLFeatures() const { return false; }; 31 | // experimental works only with "ShouldUseExperimentalUHLFeatures" enabled 32 | virtual void NotifyEndOrBlendOut(USkeletalMeshComponent* MeshComp); 33 | /** ~Experimental **/ 34 | 35 | UFUNCTION() 36 | virtual void OnMontageBlendingOut(UAnimMontage* Montage, bool bInterrupted); 37 | // TODO OnMontageBlendOut, OnMontageInterrupted, OnCancelled ... 38 | }; 39 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/AN_AttachActorWithUniqueId.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/Notifies/AN_UHL_Base.h" 7 | #include "Core/UHLAttachmentRules.h" 8 | #include "Engine/EngineTypes.h" 9 | #include "AN_AttachActorWithUniqueId.generated.h" 10 | 11 | /** 12 | * Spawns an actor of the specified class, attaches it to a given component socket, 13 | * and tags it with a user-defined unique identifier. The tag allows you to 14 | * later retrieve this exact attached actor by searching your owner’s attached 15 | * actors for the matching tag. 16 | * 17 | * Typical usage: 18 | * 1. During an animation or setup phase, call AN_AttachActorWithUniqueId to 19 | * spawn and attach, for example, a projectile to your character mesh: 20 | * - It spawns the projectile actor at the socket transform. 21 | * - It adds a tag (e.g. “Projectile_42”) so you can distinguish it. 22 | * 2. Later (e.g. when firing), call LaunchProjectile: 23 | * - It searches the character’s attached actors for the tag “Projectile_42”. 24 | * - It finds the correct spawned actor and applies your launch logic. 25 | * 26 | * @param ActorToAttach The UClass of the actor to spawn and attach. 27 | * @param SocketName The name of the socket on OwnerComponent to attach to. 28 | * @param UniqueId A user-defined string used as a tag on the spawned actor. 29 | * @param AttachmentTransformRules Attachment rules 30 | */ 31 | UCLASS() 32 | class UNREALHELPERLIBRARY_API UAN_AttachActorWithUniqueId : public UAN_UHL_Base 33 | { 34 | GENERATED_BODY() 35 | 36 | public: 37 | UPROPERTY(EditAnywhere, Category="AttachActorWithUniqueId") 38 | TSoftClassPtr ActorToAttach; 39 | 40 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="AttachActorWithUniqueId") 41 | FName UniqueId = "Unique_ID"; 42 | 43 | UPROPERTY(EditAnywhere, Category="AttachActorWithUniqueId", meta = (AnimNotifyBoneName = "true")) 44 | FName SocketName = ""; 45 | 46 | UPROPERTY(EditAnywhere, Category="AttachActorWithUniqueId") 47 | FUHLAttachmentRules AttachmentRules; 48 | 49 | protected: 50 | #if WITH_EDITOR 51 | /** Override this to prevent firing this notify state type in animation editors */ 52 | virtual bool ShouldFireInEditor() { return false; } 53 | virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; 54 | #endif 55 | 56 | virtual FLinearColor GetEditorColor() override { return FColor::FromHex("#FF7DE7"); }; 57 | virtual FString GetNotifyName_Implementation() const override; 58 | 59 | virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 60 | 61 | }; 62 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/AN_DetachActorWithUniqueId.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/Notifies/AN_UHL_Base.h" 7 | #include "Core/UHLAttachmentRules.h" 8 | #include "AN_DetachActorWithUniqueId.generated.h" 9 | 10 | /** 11 | * 12 | */ 13 | UCLASS() 14 | class UNREALHELPERLIBRARY_API UAN_DetachActorWithUniqueId : public UAN_UHL_Base 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="DetachActorWithUniqueId") 20 | FName UniqueId = "Unique_ID"; 21 | 22 | UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId") 23 | FUHLDetachmentRules DetachmentRules; 24 | 25 | UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId") 26 | bool bEnablePhysicsOnDetach = true; 27 | 28 | UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId", meta=(EditCondition="bEnablePhysicsOnDetach", EditConditionHides)) 29 | float EnablePhysicsDelay = 0.2f; 30 | 31 | // TODO: add choosing preset or PhysicsSettings 32 | // UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId", meta=(EditCondition="bEnablePhysicsOnDetach", EditConditionHides)) 33 | // float EnablePhysicsDelay = 1.0f; 34 | 35 | // TODO add option to choose blueprint and click on what component what phys settings should be applied 36 | 37 | // TODO: choosing Impulse and force of detaching 38 | 39 | UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId") 40 | bool bAutoDestroy = false; 41 | 42 | UPROPERTY(EditAnywhere, Category="DetachActorWithUniqueId", meta=(EditCondition="bAutoDestroy", EditConditionHides)) 43 | float AutoDestroyDelay = 1.0f; 44 | 45 | protected: 46 | #if WITH_EDITOR 47 | /** Override this to prevent firing this notify state type in animation editors */ 48 | virtual bool ShouldFireInEditor() { return false; } 49 | virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; 50 | #endif 51 | 52 | virtual FLinearColor GetEditorColor() override { return FColor::FromHex("#FF7DE7"); }; 53 | virtual FString GetNotifyName_Implementation() const override; 54 | 55 | virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 56 | 57 | 58 | private: 59 | UPROPERTY() 60 | FName CollisionProfileName = FName("PhysicsActor"); 61 | FTimerHandle TimerHandle; 62 | }; 63 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Animation/Notifies/AN_UHL_Base.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Animation/AnimNotifies/AnimNotify.h" 7 | #include "AN_UHL_Base.generated.h" 8 | 9 | class USkeletalMeshComponent; 10 | DECLARE_MULTICAST_DELEGATE_OneParam(FOnNotifySignature, USkeletalMeshComponent*) 11 | 12 | UCLASS() 13 | class UNREALHELPERLIBRARY_API UAN_UHL_Base : public UAnimNotify 14 | { 15 | GENERATED_BODY() 16 | 17 | public: 18 | virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override; 19 | FOnNotifySignature OnNotified; 20 | }; 21 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Core/UHLAttachmentRules.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include "Engine/EngineTypes.h" 4 | #include "UHLAttachmentRules.generated.h" 5 | 6 | USTRUCT(BlueprintType) 7 | struct FUHLAttachmentRules 8 | { 9 | GENERATED_BODY() 10 | 11 | UPROPERTY(EditAnywhere, Category="Attachment") 12 | EAttachmentRule LocationRule = EAttachmentRule::SnapToTarget; 13 | 14 | UPROPERTY(EditAnywhere, Category="Attachment") 15 | EAttachmentRule RotationRule = EAttachmentRule::SnapToTarget; 16 | 17 | UPROPERTY(EditAnywhere, Category="Attachment") 18 | EAttachmentRule ScaleRule = EAttachmentRule::KeepWorld; 19 | 20 | UPROPERTY(EditAnywhere, Category="Attachment") 21 | bool bWeldSimulatedBodies = true; 22 | 23 | // Conversion to engine struct 24 | FAttachmentTransformRules ToEngineRules() const 25 | { 26 | return FAttachmentTransformRules(LocationRule, RotationRule, ScaleRule, bWeldSimulatedBodies); 27 | } 28 | }; 29 | 30 | USTRUCT(BlueprintType) 31 | struct FUHLDetachmentRules 32 | { 33 | GENERATED_BODY() 34 | 35 | /** 36 | * Which transform to preserve when detaching: 37 | * KeepRelative or KeepWorld 38 | */ 39 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Detachment") 40 | EDetachmentRule DetachmentRule = EDetachmentRule::KeepWorld; 41 | 42 | /** 43 | * If true, calls Modify() on the component so that the detach 44 | * is recorded in the transaction buffer (undo/redo) 45 | */ 46 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Detachment") 47 | bool bCallModify = false; 48 | 49 | /** 50 | * Convert to Unreal’s native struct, for use in DetachFromComponent / DetachFromActor 51 | */ 52 | FDetachmentTransformRules ToEngineRules() const 53 | { 54 | return FDetachmentTransformRules(DetachmentRule, bCallModify); 55 | } 56 | }; -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Core/UHLGameplayTags.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "NativeGameplayTags.h" 6 | 7 | namespace UHLGameplayTags 8 | { 9 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_Gameplay_AbilityInputBlocked); 10 | 11 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_Debug_CheckGASGameplayTagsOnActor); 12 | 13 | // Abilities 14 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_Abilities_Character_GlobalTimeDilation); 15 | 16 | // AbilityInputCache 17 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_AbilityInputCache_Catching); 18 | 19 | // Debug Categories 20 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem); 21 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem_Attributes); 22 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem_Effects); 23 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem_Abilities); 24 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem_DebugBasicHUD); 25 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_AbilitySystem_DebugAbilityTags); 26 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_InputSystem_EnhancedInputSystem); 27 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_InputSystem_AbilityInputCache); 28 | UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_UHL_DebugCategory_Collisions); 29 | 30 | // Errors 31 | // UNREALHELPERLIBRARY_API UE_DECLARE_GAMEPLAY_TAG_EXTERN(TAG_Error); 32 | }; 33 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Development/UHLSettings.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Engine/DeveloperSettings.h" 7 | #include "Subsystems/EnemyTickManager/EnemyTickOptimizerSubsystem.h" 8 | #include "UHLSettings.generated.h" 9 | 10 | /** 11 | * 12 | */ 13 | UCLASS(config="Game", defaultconfig) 14 | class UNREALHELPERLIBRARY_API UUHLSettings : public UDeveloperSettings 15 | { 16 | GENERATED_BODY() 17 | 18 | public: 19 | UPROPERTY(config, EditAnywhere, Category="EnemyTickOptimizerSubsystemSettings") 20 | FEnemyTickOptimizerSubsystemSettings EnemyTickOptimizerSubsystemSettings; 21 | 22 | protected: 23 | //~UDeveloperSettings interface 24 | virtual FName GetCategoryName() const override { return TEXT("Plugins"); }; 25 | //~End of UDeveloperSettings interface 26 | }; 27 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/UI/UHLHUD.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "GameFramework/HUD.h" 7 | #include "UHLHUD.generated.h" 8 | 9 | USTRUCT(BlueprintType) 10 | struct FLineInfo 11 | { 12 | GENERATED_BODY() 13 | 14 | FString Id = ""; 15 | FVector2D Start = FVector2D::ZeroVector; 16 | FVector2D End = FVector2D::ZeroVector; 17 | FColor Color = FColor::White; 18 | float LineThickness = 1.0f; 19 | 20 | FString Text = ""; 21 | FColor TextColor = FColor::White; 22 | 23 | bool bRelativeToViewportCenter = false; 24 | bool bPersistent = false; 25 | 26 | // private: 27 | // float TimePassed = 0.0f; 28 | }; 29 | 30 | /** 31 | * 32 | */ 33 | UCLASS() 34 | class UNREALHELPERLIBRARY_API AUHLHUD : public AHUD 35 | { 36 | GENERATED_BODY() 37 | 38 | public: 39 | UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="UHL HUD") 40 | bool bEnabledDrawDebug = true; 41 | 42 | UFUNCTION(BlueprintCallable, Category="UHL HUD") 43 | void AddOrUpdateLineInfoToDrawNextTick(FLineInfo LineInfo_In); 44 | 45 | protected: 46 | virtual void DrawHUD() override; 47 | 48 | private: 49 | UPROPERTY() 50 | TArray LineInfos; 51 | }; 52 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/UnrealHelperLibrary.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "Modules/ModuleManager.h" 6 | 7 | UNREALHELPERLIBRARY_API DECLARE_LOG_CATEGORY_EXTERN(LogUnrealHelperLibrary, Log, All); 8 | 9 | class FUnrealHelperLibraryModule : public IModuleInterface 10 | { 11 | public: 12 | /** IModuleInterface implementation */ 13 | virtual void StartupModule() override; 14 | virtual void ShutdownModule() override; 15 | }; 16 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/UnrealHelperLibraryTypes.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" // This includes FVector definition 6 | #include "UnrealHelperLibraryTypes.generated.h" // Required for UENUM macros 7 | 8 | const FVector VECTOR_ERROR = FVector(404.0f, 404.0f, 404.0f); 9 | const float FLOAT_ERROR = -99999.0f; 10 | 11 | 12 | UENUM(BlueprintType) 13 | enum class EUHLDirection: uint8 14 | { 15 | None, 16 | 17 | Front, 18 | Back, 19 | Left, 20 | Right, 21 | 22 | FrontLeft, 23 | FrontRight, 24 | BackLeft, 25 | BackRight, 26 | 27 | MAX UMETA(Hidden) 28 | }; 29 | 30 | UENUM(BlueprintType) 31 | enum class EUHLSettingsSource: uint8 32 | { 33 | None UMETA(Hidden), 34 | 35 | Node, 36 | DataAsset, 37 | Actor, 38 | 39 | MAX UMETA(Hidden) 40 | }; 41 | 42 | // EUHLBuildType not same as EBuildConfiguration, if we WITH_EDITOR returns Editor, 43 | // no matter what EBuildConfiguration is currently used(mostly WITH_EDITOR is Development) 44 | // if real build returns EBuildConfiguration 45 | UENUM(BlueprintType) 46 | enum class EUHLBuildType: uint8 47 | { 48 | None UMETA(Hidden), 49 | Editor UMETA(ToolTip="Are you in editor"), 50 | 51 | Debug, 52 | Development, 53 | Shipping, 54 | Test, 55 | }; 56 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/Public/Utils/UHLLoadingUtilLibrary.h: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | #pragma once 4 | 5 | #include "CoreMinimal.h" 6 | #include "Kismet/BlueprintFunctionLibrary.h" 7 | #include "UHLLoadingUtilLibrary.generated.h" 8 | 9 | class UObject; 10 | struct FFrame; 11 | 12 | /** 13 | * Mostly copy-pasted from Lyra 14 | */ 15 | UCLASS() 16 | class UNREALHELPERLIBRARY_API UUHLLoadingUtilLibrary : public UBlueprintFunctionLibrary 17 | { 18 | GENERATED_BODY() 19 | 20 | public: 21 | UFUNCTION(BlueprintCallable, Category = "Loading", meta = (WorldContext = "WorldContextObject")) 22 | static void ApplyDefaultPriorityLoading(const UObject* WorldContextObject); 23 | 24 | UFUNCTION(BlueprintCallable, Category = "Loading", meta = (WorldContext = "WorldContextObject")) 25 | static void ApplyStreamingPriorityLoading(const UObject* WorldContextObject); 26 | 27 | UFUNCTION(BlueprintCallable, Category = "Loading", meta = (WorldContext = "WorldContextObject")) 28 | static void ApplyHighestPriorityLoading(const UObject* WorldContextObject); 29 | 30 | UFUNCTION(BlueprintCallable, Category = "Loading", meta = (WorldContext = "WorldContextObject")) 31 | static void ApplyCustomPriorityLoading(const UObject* WorldContextObject, bool UseHighPriorityLoading, float MaxAsyncLoadingMilliSeconds, float MaxActorUpdateMilliSeconds); 32 | 33 | UFUNCTION(BlueprintCallable, Category = "Loading") 34 | static void ForceGarbageCollection(); 35 | 36 | UFUNCTION(BlueprintCallable, Category = "Loading", meta = (WorldContext = "WorldContextObject")) 37 | static void FlushLevelStreaming(const UObject* WorldContextObject); 38 | 39 | private: 40 | static void CaptureDefaultLoadingSettings(); 41 | static bool HasCapturedDefaults; 42 | static float DefaultLevelStreamingActorsUpdateTimeLimit; 43 | static float DefaultLevelStreamingComponentsRegistrationGranularity; 44 | static float DefaultAsyncLoadingTimeLimit; 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /Source/UnrealHelperLibrary/UnrealHelperLibrary.Build.cs: -------------------------------------------------------------------------------- 1 | // Pavel Penkov 2025 All Rights Reserved. 2 | 3 | using UnrealBuildTool; 4 | 5 | public class UnrealHelperLibrary : ModuleRules 6 | { 7 | public UnrealHelperLibrary(ReadOnlyTargetRules Target) : base(Target) 8 | { 9 | PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs; 10 | 11 | PublicIncludePaths.AddRange( 12 | new string[] { 13 | // ... add public include paths required here ... 14 | } 15 | ); 16 | 17 | 18 | PrivateIncludePaths.AddRange( 19 | new string[] { 20 | // ... add other private include paths required here ... 21 | } 22 | ); 23 | 24 | 25 | PublicDependencyModuleNames.AddRange( 26 | new string[] 27 | { 28 | "Core", 29 | // ... add other public dependencies that you statically link with here ... 30 | "GameplayAbilities", 31 | "GameplayTags", 32 | "GameplayTasks", 33 | "AIModule", 34 | "EnhancedInput", 35 | } 36 | ); 37 | 38 | 39 | PrivateDependencyModuleNames.AddRange( 40 | new string[] 41 | { 42 | "CoreUObject", 43 | "Engine", 44 | "Slate", 45 | "SlateCore", 46 | "UMG", 47 | "AnimGraphRuntime", 48 | "DeveloperSettings", 49 | "NavigationSystem" 50 | // ... add private dependencies that you statically link with here ... 51 | } 52 | ); 53 | 54 | 55 | DynamicallyLoadedModuleNames.AddRange( 56 | new string[] 57 | { 58 | // ... add any modules that your module loads dynamically here ... 59 | } 60 | ); 61 | } 62 | } 63 | --------------------------------------------------------------------------------