Skip to content

Commit 1ec3884

Browse files
authored
UE5.5 (#24)
* [InputSystem] try to fix "WhileInputActive"(not possible), "OnInputTriggered" fix activation while ability already active * [Docs] BlueprintNodes * Update README.md * Update UHLAbilitySystemComponent.cpp * [DebugSubsystem] check Blocks not empty * [Anim] ANS_UHL_Base add ShouldUseExperimentalUHLFeatures, NotifyEndOrBlendOut * ANS_EnableRootMotionZAxisMovement land check * ANS_EnableRootMotionZAxisMovement ground check * Update README.md * Update README.md * [Editor] CustomThumbnails refactoring * [Debug] experimental debug lines through "AHUD::DrawHUD" * [Debug] experimental debug lines through "AHUD::DrawHUD" 2 * ANS_UHL_Base fix critical build err * UUHLTraceUtilsBPL::SweepCapsuleMultiByChannel * Update README.md * [BPL] GetMostDistantActor * [Editor] CustomIcons add classes array support * [DebugSubsystem] fix RandomColors for DebugCategories * Update UHLAbilitySystemComponent.cpp * by default InstancingPolicy = InstancedPerActor * Update UnrealHelperLibrary.uplugin * update readme.md
1 parent 77ec1fd commit 1ec3884

File tree

5 files changed

+66
-29
lines changed

5 files changed

+66
-29
lines changed

README.md

Lines changed: 42 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,39 +10,55 @@ much smoother GAS experience mostly based on [Lyra](https://dev.epicgames.com/do
1010
All GAS features designed in mind that they or their part can be added or dropped by you in development in any time
1111
and replaced by something custom that fits your project needs
1212

13-
Support: tested `UE5.4 - UE5.5-preview`
13+
Support: `UE5.5 (main)`, `UE5.4 (branch UE5.4)`
1414

1515
![AiModule](https://github.com/user-attachments/assets/4becb592-c02e-423a-bf80-fcfc629ce518)
1616

1717
## Install
1818

1919
#### From source (recommended):
2020

21-
- `git submodule add https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary` - add git submodule to your plugins folder
22-
- to use C++ things add code to file `<ProjectName>.Build.cs`
23-
24-
```C#
25-
// <ProjectName>.Build.cs
26-
public GameName(ReadOnlyTargetRules Target) : base(Target)
27-
{
28-
PublicDependencyModuleNames.AddRange(new string[] {
29-
// add "UnrealHelperLibrary" to use it in C++
30-
"UnrealHelperLibrary",
31-
});
32-
33-
// OPTIONALLY add "UnrealHelperEditor" module to use custom unreal engine editor features
34-
if (Target.bBuildEditor)
35-
{
36-
PrivateDependencyModuleNames.AddRange(new string[] { "UnrealHelperEditor" });
37-
}
38-
}
39-
```
40-
41-
> [!NOTE]
42-
> Don't forget to update your `README.md` with instructions on how to setup - `git submodule update --init --recursive` and how to update submodules/plugin(s) - `git submodule update --remote`
43-
44-
> [!NOTE]
45-
> Add `Editor Preferences -> Force Compilation on Startup` in `Config/EditorPerProjectUserSettings.ini` your team don't want to recompile plugin manually 😉
21+
- add git submodule to your plugins folder
22+
23+
```bash
24+
git submodule add https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
25+
```
26+
27+
- <details>
28+
<summary>C++ setup, old engine versions</summary>
29+
30+
- to use specific engine version specify branch e.g. `-b UE5.4`
31+
32+
```bash
33+
git submodule add -b UE5.4 https://github.com/Ciberusps/unreal-helper-library.git ./Plugins/UnrealHelperLibrary
34+
```
35+
36+
- to use C++ things add code to file `<ProjectName>.Build.cs`
37+
38+
```C#
39+
// <ProjectName>.Build.cs
40+
public GameName(ReadOnlyTargetRules Target) : base(Target)
41+
{
42+
PublicDependencyModuleNames.AddRange(new string[] {
43+
// add "UnrealHelperLibrary" to use it in C++
44+
"UnrealHelperLibrary",
45+
});
46+
47+
// OPTIONALLY add "UnrealHelperEditor" module to use custom unreal engine editor features
48+
if (Target.bBuildEditor)
49+
{
50+
PrivateDependencyModuleNames.AddRange(new string[] { "UnrealHelperEditor" });
51+
}
52+
}
53+
```
54+
55+
> [!NOTE]
56+
> Don't forget to update your `README.md` with instructions on how to setup - `git submodule update --init --recursive` and how to update submodules/plugin(s) - `git submodule update --remote`
57+
58+
> [!NOTE]
59+
> Add `Editor Preferences -> Force Compilation on Startup` in `Config/EditorPerProjectUserSettings.ini` your team don't want to recompile plugin manually 😉
60+
61+
</details>
4662
4763
#### From marketplace:
4864

Source/UnrealHelperLibrary/Private/AbilitySystem/Abilities/UHLGameplayAbility.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
#include UE_INLINE_GENERATED_CPP_BY_NAME(UHLGameplayAbility)
1010

11+
UUHLGameplayAbility::UUHLGameplayAbility(const FObjectInitializer& ObjectInitializer)
12+
: Super(ObjectInitializer)
13+
{
14+
ReplicationPolicy = EGameplayAbilityReplicationPolicy::ReplicateNo;
15+
InstancingPolicy = EGameplayAbilityInstancingPolicy::InstancedPerActor;
16+
NetExecutionPolicy = EGameplayAbilityNetExecutionPolicy::LocalPredicted;
17+
NetSecurityPolicy = EGameplayAbilityNetSecurityPolicy::ClientOrServer;
18+
}
19+
1120
UUHLAbilitySystemComponent* UUHLGameplayAbility::GetUHLAbilitySystemComponentFromActorInfo() const
1221
{
1322
if (!ensure(CurrentActorInfo))

Source/UnrealHelperLibrary/Private/AbilitySystem/UHLAbilitySystemComponent.cpp

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,13 @@ void UUHLAbilitySystemComponent::AbilitySpecInputPressed(FGameplayAbilitySpec& S
311311
// Use replicated events instead so that the WaitInputPress ability task works.
312312
if (Spec.IsActive())
313313
{
314+
PRAGMA_DISABLE_DEPRECATION_WARNINGS
315+
const UGameplayAbility* Instance = Spec.GetPrimaryInstance();
316+
FPredictionKey OriginalPredictionKey = Instance ? Instance->GetCurrentActivationInfo().GetActivationPredictionKey() : Spec.ActivationInfo.GetActivationPredictionKey();
317+
PRAGMA_ENABLE_DEPRECATION_WARNINGS
318+
314319
// Invoke the InputPressed event. This is not replicated here. If someone is listening, they may replicate the InputPressed event to the server.
315-
InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputPressed, Spec.Handle, Spec.ActivationInfo.GetActivationPredictionKey());
320+
InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputPressed, Spec.Handle, OriginalPredictionKey);
316321
}
317322
}
318323

@@ -324,8 +329,13 @@ void UUHLAbilitySystemComponent::AbilitySpecInputReleased(FGameplayAbilitySpec&
324329
// Use replicated events instead so that the WaitInputRelease ability task works.
325330
if (Spec.IsActive())
326331
{
332+
PRAGMA_DISABLE_DEPRECATION_WARNINGS
333+
const UGameplayAbility* Instance = Spec.GetPrimaryInstance();
334+
FPredictionKey OriginalPredictionKey = Instance ? Instance->GetCurrentActivationInfo().GetActivationPredictionKey() : Spec.ActivationInfo.GetActivationPredictionKey();
335+
PRAGMA_ENABLE_DEPRECATION_WARNINGS
336+
327337
// Invoke the InputReleased event. This is not replicated here. If someone is listening, they may replicate the InputReleased event to the server.
328-
InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputReleased, Spec.Handle, Spec.ActivationInfo.GetActivationPredictionKey());
338+
InvokeReplicatedEvent(EAbilityGenericReplicatedEvent::InputReleased, Spec.Handle, OriginalPredictionKey);
329339
}
330340
}
331341

Source/UnrealHelperLibrary/Public/AbilitySystem/Abilities/UHLGameplayAbility.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class UNREALHELPERLIBRARY_API UUHLGameplayAbility : public UGameplayAbility
5050
GENERATED_BODY()
5151

5252
public:
53+
UUHLGameplayAbility(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
54+
5355
UFUNCTION(BlueprintCallable, Category = "UHL GameplayAbility")
5456
EUHLAbilityActivationPolicy GetActivationPolicy() const { return ActivationPolicy; }
5557

UnrealHelperLibrary.uplugin

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"DocsURL": "https://github.com/Ciberusps/unreal-helper-library",
1111
"MarketplaceURL": "",
1212
"SupportURL": "https://github.com/Ciberusps/unreal-helper-library/issues",
13-
"EngineVersion": "5.4.0",
13+
"EngineVersion": "5.5.0",
1414
"FabURL": "com.epicgames.launcher://ue/Fab/product/19390f7a-1d31-46ee-a54c-511b7f1a8166",
1515
"EnabledByDefault": true,
1616
"CanContainContent": true,

0 commit comments

Comments
 (0)