We recently completed reorganizing the assets in an Unreal Engine 5.3 project that uses the Gameplay Ability System (GAS) and gameplay cues. Part of the reorg. involved renaming a package from /OpenPF2Core
to /OpenPF2
, for which we added this to DefaultOpenPF2.ini
(since this is in a plugin; otherwise it would have gone in DefaultEngine.ini
):
[CoreRedirects]
+PackageRedirects=(OldName="/OpenPF2Core",NewName="/OpenPF2",MatchSubstring=true)
This seems to work fine for everything else, but gameplay cues now fail to load. I see errors like this in the engine log:
[LogStreaming] Async loading code requires MountedPath PackagePaths (/OpenPF2Core/OpenPF2/Optional/Abilities/Attacks/GCN_InflictDamage).
[LogAbilitySystem] Late load of GameplayCueNotify /OpenPF2Core/OpenPF2/Optional/Abilities/Attacks/GCN_InflictDamage.GCN_InflictDamage_C failed!
The warnings repeat every time that the cue is supposed to fire.
The snippet I have in Config/DefaultGame.ini
is as follows:
[/Script/GameplayAbilities.AbilitySystemGlobals]
+GameplayCueNotifyPaths="/OpenPF2/OpenPF2/Optional/Abilities/Attacks"
If I change the GameplayCueNotifyPaths
value, the warnings disappear, but the gameplay cue still fails to function.
How can I fix this issue?
The real issue here is that the path inside each gameplay cue is using the old package name rather than the new package name, so when the cue gets discovered and loaded by the Gameplay Cue Manager (GCM) in the engine, it attempt to look for the old package instead of the new one, fails to find that package, and concludes that it is not mounted. Basically, package redirects don't affect package paths the GCM sees.
To fix this, I just needed to open up the Gameplay Cue blueprints in the editor, go to the "File" menu, select "Refresh All nodes" (sic), then compile and save the blueprint. After this, the log warnings disappeared and cues started working again.
You can see that this was the problem because the error message was citing the old path (/OpenPF2Core
) rather than the new one. I also enabled additional logging (by adding the snippet below to DefaultEngine.ini
) so I could confirm that all the packages were being mounted properly:
[Core.Log]
LogPackageName=VeryVerbose