x157 / x157.github.io

46 stars 7 forks source link

Migrating Lyra's Animation System to GFP? #13

Closed RiddMa closed 1 year ago

RiddMa commented 1 year ago

When I try to duplicate Lyra binaries into my GFP for extending them, I got these compile errors, and the Editor crashes when I try to PIE.

LogBlueprint: Error: [AssetLog] <Path-to-my-GFP>\Content\Characters\Heroes\Mannequin\Animations\ABP_Mannequin_Base.uasset: [Compiler] The property [None] for gameplay tag [Event.Movement.ADS] could not be found.
LogBlueprint: Error: [AssetLog] <Path-to-my-GFP>\Content\Characters\Heroes\Mannequin\Animations\ABP_Mannequin_Base.uasset: [Compiler] The property [None] for gameplay tag [Event.Movement.WeaponFire] could not be found.
LogBlueprint: Error: [AssetLog] <Path-to-my-GFP>\Content\Characters\Heroes\Mannequin\Animations\ABP_Mannequin_Base.uasset: [Compiler] The property [None] for gameplay tag [Event.Movement.Reload] could not be found.
LogBlueprint: Error: [AssetLog] <Path-to-my-GFP>\Content\Characters\Heroes\Mannequin\Animations\ABP_Mannequin_Base.uasset: [Compiler] The property [None] for gameplay tag [Event.Movement.Dash] could not be found.
LogBlueprint: Error: [AssetLog] <Path-to-my-GFP>\Content\Characters\Heroes\Mannequin\Animations\ABP_Mannequin_Base.uasset: [Compiler] The property [None] for gameplay tag [Event.Movement.Melee] could not be found.

Is there a proper way to do this? Or what need to be fixed?


Edit: I just found that the GameplayTagPropertyMap in ClassDefaults somehow been reset to none after copy-paste. Fixed that and it compiled.

But: I'm referencing this post from your blog. I wonder how should I correctly (for the sake of future development) extend Lyra in a way that's not going to break things when Lyra upgrades. I end up just copying like everything from the /Game folder to /<MyGFP> folder and rename them. Combined with LYRAGAME_API not being added to every class and struct, I found it questionable to duplicate and modify those assets to try keep them separated from Lyra code, when inheriting from LyraGame classes I have to compile and find unexported classes and add LYRAGAME_API export. Maybe just do changes in the Lyra source code would be better?

x157 commented 1 year ago

I found it questionable to duplicate and modify those assets to try keep them separated from Lyra code

Agreed. I only duplicate Lyra stuff when I cannot use it as-is. If it requires any changes, then I duplicate it and use the one with my changes.

when inheriting from LyraGame classes I have to compile and find unexported classes and add LYRAGAME_API export

Yes, this is very common with Lyra. Epic does not export things by default, so when you try to use things they haven't yet exported, you have to export them yourself.

x157 commented 1 year ago

For faster help, join the Unofficial Lyra Dev Discord:

https://discord.gg/RS99Jcur6q

x157 commented 1 year ago

It seems like you got this solved, so I'm marking it as closed.