I use BlueprintNativeEvent because I need it implemented in my CPP file and it can also be overridden in my derived class of C++ as well as Blueprint. (Not sure this is correct way to meet my require but I think this should work)
Then I create a blueprint based on a class that is derived from this class (called S_C_Anby_Attack_Base). Which overrides that function, check the picture below:
After I finished configuring all my blueprints, everything worked fine, I could play the game as intended. But a weird thing happened after I restarted my editor. After I closed it and restarted it, it said my parent function was not valid for my blueprint and it converted my function to a full member function.
You can find the Parent node has disappeared and the function is a new member function, not the override function. But my base blueprint is fine.
I don’t know what I did wrong, hope the community can help me with this because I can’t find the answer anywhere.
Update: One thing I did before it acted weird is I renamed all my BlueprintNativeEvent functions to be “BPN_” + “Function Name”, after that it started to behave wrong. Not sure this will help to identify the issue or not.
Simple question just to make sure. Have you tried recompiling in your IDE then loading the editor up again? The BP says the function is no longer part of the class. It’s possible something happened for the new compiled project just to not have saved those last changes.
Interesting. You can also see if you can create the child function in the event graph of the BP and see if the parent node can be called there. I usually override my BlueprintNativeEvents that way and have not had an issue.
Also, as I mentioned above, if the function is no longer part of the class, it shouldn’t work for my base attack blueprint too, but that blueprint works fine. Only those blueprints derived from the base attack blueprint won’t work.
I found the solution, I think this is some internal issue about Unreal, when I change the name of the function, it messes up the link between Blueprint and the function. I found that I can’t call the parent node in Attack Base blueprint, even if it works as intended. So I right-click the node, and click “Refresh Nodes”, then I can call the parent, and fix everything else.