I mention SixDOF Movement because the error below seems movement component related and it is a recent addition to my project. Everything works well in editor, and plays as expected, but I can’t build the project.
Issue:
Today, building my project for Windows 64 I got a build error. The complete error is:
UATHelper: Packaging (Windows): D:\Games\UE_5.2\Engine\Source\Runtime\Engine\Classes\GameFramework\CSFloatingPawnMovement.h(1): Error: Expected an include at the top of the header the follows all other includes: '#include "CSFloatingPawnMovement.generated.h"'
There was a post with another use who had this same issue and found a solution. Here’s a link to the post. If this doesn’t resolve the problem, post back here and we can look into other alternatives.
I did see that. I put the “CSFloatingPawnMovement.generated.h” include as the last line in the file: \Games\UE_5.2\Engine\Source\Runtime\Engine\Classes\GameFramework\CSFloatingPawnMovement.h to try to resolve the error. So that top section in the file now looks like:
Error: Class 'UFloatingPawnMovement' shares engine name 'FloatingPawnMovement' with class 'UFloatingPawnMovement
Even if I create a brand new UE 5.2 project from scratch, I get this error. I also verified my Unreal Engine install and all plugins (I only have one).
This was my fault! Not surprising. This response by a gentleman in the LootLocker Discord helped me out:
This seems unrelated to any LootLocker code. But in general for Unreal Engine; any code file in the project in the header you need to add include “.generated.h” as the last of the include statements. So without any knowledge of your project it seems to say that somewhere you have a code file named “CSFloatingPawnMovement.h” (and .cpp but we don’t care about that at the moment) and in that file you have either added #includes after the .generated one, or the .generated one is missing.
[10:56 PM]
Or for that matter you’ve changed the filename but missed changing it in the .generated line.
I had casually duplicated the FloatingPawnMovement.h file and Unreal did not like that. I wasn’t using it.