After Hot Reload, "Could not find a function named..."

I have a custom C++ component, BeatemupHealthComponentCPP, with a method BasicTakeDamageHit. BasicTakeDamageHit is a BlueprintNative event and is setup like so:

UFUNCTION(Category = Health, BlueprintCallable, BlueprintNativeEvent)
void BasicTakeDamageHit(int damageAmount);
void BasicTakeDamageHit_Implementation(int damageAmount);

I have a call to this method in the level blueprint for debug purposes, and everything works correctly when I initially boot the editor. However, if I edit the C++ project in visual studio and rebuild or do a hot-reload in the unity editor, there’s a chance that the editor will no longer recognize the method. The node where I call it gives the error “Could not find a function named ‘BasicTakeDamageHit’ in ‘BeatemupHealthComponentCPP’. Make sure ‘BeatemupHealthComponentCPP’ has been compiled for K2Node_CallFunction_1”.

What might be causing this error? Is there a way to fix it?

Hey, currently having this problem,
did you found a fix ?

What is funny is that it’s always the same method of a particular component that cause problem

Got the same problem after hot reloading

Does Refresh All Nodes (under the file menu in the blueprint editor) fix the problem?

no, it refreshes everything, but the error stays

edit: it seems like only two blueprints are affected at the same time. i started to work on the project again and after making a few changes, one of the two affected classes changed to a recent edited one.

If it works as expected on first load and not after the hot reload I’d suggest moving this to bug reports.