Distance matching broke itself?

Hey guys, My game is based on Lyra Starter Game and I had this very weird thing happen and I cant figure out how to fix it.
I loaded my game today and pressed play and it wouldnt play cause two of my ABPs had errors in them. When I closed the game last night, there was no errors anywhere.
The error is in ABP_ItemAnimLayers, the nodes AdvanceTimeByDistanceMatching and SetPlayrateToMatchSpeed have missing plugs.
If I go to class settings and reparent the ABP to LyraAnimInstance, the errors go away. If I close the game and open it again, the errors are back. I then re parent them back to AnimInstance and the errors are gone again, until I reload my game.
I did not change anything, the animation matchin plugin is still loaded.
Side note, the EnhancedInput_1 and all those in the character BP also went bad, but I dont need them so I just deleted them.
Does anyone have any ideas?
I tried copying a new install of lyra starter game over my modded version and it doesnt fix it either.
I am using UE5.1.1 Github version, and the game compiles fine.

distanceMatchingIssue1
distanceMatchingIssue2

Doing more digging, it appears to be every function from AnimDistanceMatchingLibrary.h, it cant find any function from that code.
However, I can right click in the graph and add those nodes. I can also just right click on them and refresh and it finds the nodes… I compile and save, next time I open its broken again.

More info
There is this warning in the log right before all the errors
LogLinker: Warning: [AssetLog] G:\btl51MainStreams\beTheLast\Content\Characters\Animation\ABP_MotionMode_LayersBase.uasset: VerifyImport: Failed to find script package for import object ‘Package /Script/AnimationLocomotionLibraryRuntime’

hey, I had same issue.
the problem was that couple of assets and C++ classes were referencing animation blueprint with those functions. In C++ classes constructors contained ConstructorHelpers::FObjectFinder and hard coded references. Also some widgets were to blame. And since those finders were in constructors they were called during CDO creation phase, which is somewhat earlier than plugins are loaded.

So general idea is to break dependencies on ABP_Item_LayersBase.
for example do not link that ABP directly to main ABP instead do it in Player controller on Possesion. Use interfaces instead of direct casts to main ABP.

Also you could set breakpoint in LinkerLoad.cpp:3267 then go up the call stack to the first Verify call and look what path inside of this pointer and get all of problematic files right away

1 Like

I ended up making a new lyra project and migrating all my stuff over which fixed it also…
Your explanation is GREAT! Sounds like something the Lyra team should hear as I really didnt change anything about those assets .
Thank you!

1 Like

Hi, I have Same problem.

In my case, using the Link Anim Class Layer node in the event graph of the main Anim blue print causes problems when the editor is re-runed.

It’s serious that I can’t even use the Link Anim Class Layer node.

There is no direct reference to the main ABP in the LayerBase Anim blue print.

What’s the solution in this case?

I found a solution, it might help for 5.1. the function for distance matching is under the module AnimationLocomotion, and the origin set up for this plug-in is “default”. and What you need to do is change to “Predefault”

The path is here
C:\Program Files\Epic Games\UE_5.1\Engine\Plugins\Animation\AnimationLocomotionLibrary/AnimationLocomotionLibrary.uplugin

2 Likes