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?