xi57
(Xist)
May 15, 2022, 10:52pm
1
After some minor modifications to base LyraGame
code, I now have a Lyra-based pawn that implements the Gameplay Ability System, Gameplay Cues & Gameplay Tags. (ALyraPawn
does not implement those itself).
Here’s a 5 minute video showing what I did. I also documented it at this Github Gist .
Long story short:
Export some required LyraGame classes/interfaces
Add module dependencies
Derive from ALyraPawn
Add the missing functionality
The video:
The Gist with more detailed instructions:
# Updating ALyraPawn to implement Gameplay Ability System, Gameplay Cues and Gameplay Tags
ALyraPawn as shipped in UE 5.0.1 does not implement Gameplay Ability System, Gameplay Cues or Gameplay Tags.
This gist documents how I was able to do so. Hopefully Epic updates Lyra to do this themselves in the future, but for now, here you go.
Lyra Source Diffs
diff --git a/Source/LyraGame/Character/LyraHeroComponent.h b/Source/LyraGame/Character/LyraHeroComponent.h
index 312623d..921feb3 100644
--- a/Source/LyraGame/Character/LyraHeroComponent.h
+++ b/Source/LyraGame/Character/LyraHeroComponent.h
@@ -22,7 +22,7 @@ class ULyraInputConfig;
* A component used to create a player controlled pawns (characters, vehicles, etc..).
*/
UCLASS(Blueprintable, Meta=(BlueprintSpawnableComponent))
-class ULyraHeroComponent : public ULyraPawnComponent
+class LYRAGAME_API ULyraHeroComponent : public ULyraPawnComponent
This file has been truncated. show original
XCL_Pawn.cpp
#include "Character/XCL_Pawn.h"
#include "LyraGameplayTags.h"
#include "AbilitySystem/LyraAbilitySystemComponent.h"
#include "Character/LyraPawnExtensionComponent.h"
#include "GameFramework/PawnMovementComponent.h"
// Sets default values
AXCL_Pawn::AXCL_Pawn()
This file has been truncated. show original
There are more than three files. show original
3 Likes