Cooking for Windows can't find native UFunction

Hi everyone,
I have been fighting with the packaging/cooking pipeline for some days now and although I was able to eliminate most problems I am stuck at this one:
I have a native C++ ACharacter derived class which has a function KnockUp(float _Dur) that is exposed as an UFunction. Inside the editor everything is working as expected and neither the blueprint compiler nor the ingame runtime complains about said function. It executes as it is supposed to.
However, when I cook or package the game does not recognize the function and simply throws an error message:

“LogBlueprint:Error: [Compiler SeismicToss] Error Could not find a function named “KnockUp” in ‘MobaCharacter’.”

I already checked the generated header file for the reflection part and everything is there. Additional functions to the same AMobaCharacter class also work in the editor but crash upon packaging. As soon as I remove all calls to those functions the game packages just fine but that does not solve the problem at hand. This is not restricted to that specific class. tl; dr; Newly declared UFunctions cannot be packaged.
Before that error occurred I tried to add Steam support to the game for which I had to activate the Steam plugin. I suspect it has something to do with that but of course I already tried reverting all the changes I made to no success.

Attached you can find the full log although the only relevant part is this:
UE4Editor-Cmd: [2016.09.18-15.18.38:650][ 0]LogCook:Display: Cooker output 172DED934F19F035E7B4FCABDE5B4D48: [2016.09.18-15.18.35:547][ 0]LogBlueprint:Error: [Compiler Toss] Error Could not find a function named “MakeAirborne” in ‘MobaCharacter’.

I guess in the end I will try to create a fresh project and migrate all my code and assets over hoping that it is just some weird behaviour not associated with the assets themselves but maybe someone experienced something similar before.

Greetings,
Schadek

do you filter your code with some macros or something like that? do you have more then one code module?

Hello Schadek,

I basically have the same question as . What kind of setup is behind this? Have you tried the migration thing you mentioned yet? What were the results if so?

Hi you two,
so far I do not separate code with macros of any kind. With ‘code module’ do you mean ones made by myself or already existing but not included ones? I added some modules related to UMG, AI and multiplayer given by the engine:

PublicDependencyModuleNames: “Core”, “CoreUObject”, “Engine”, “InputCore”, “UMG”, “Slate”, “SlateCore”, “OnlineSubsystem”, “OnlineSubsystemUtils”, “Sockets”, “GameplayTasks”
and
DynamicallyLoadedModuleNames: “OnlineSubsystemSteam”, “OnlineSubsystemNull”

I migrated my code and all assets to a blank new C++ project and everything worked from the start. I am not sure whether I should just close the topic and be done with it or search for the cause to not repeat it in the future.

I’ll be marking this as the answer since you resolved your issue, but if it does happen again, please let us know and we’ll be happy to attempt to help. When we spoke of multiple modules, I was referring to these types of modules: Gameplay Modules in Unreal Engine | Unreal Engine 5.1 Documentation