Issue with "FTextureBuildSettings is undefined" and other errors during build in UE5

Hi! I’m facing an issue with three errors that you can see in the attached screenshot.

I created a project in Unreal Engine 5 and added two C++ classes: GameMode and Character. After that, I encountered the following errors during the build:

  1. member function declared with 'override' does not override a base class member (this error appears twice).
  2. identifier 'FTextureBuildSettings' is undefined.

I found that the error identifier 'FTextureBuildSettings' is undefined might be resolved by:

  • Adding the TextureCompressor module to the .Build.cs file.
  • Including #include "TextureCompressorModule.h".

I have already added the TextureCompressor module to the build file (screenshot attached), but I’m not sure in which file I need to write #include "TextureCompressorModule.h".
image

Could someone please guide me on how to properly resolve this issue and where exactly to place the #include?

Thanks in advance for your help!

I encountered exactly the same issue as you — both the 'FTextureBuildSettings' is undefined error and the 'override' does not override a base class member error.
This is not a problem with your local setup; it’s actually due to how Unreal’s build system works.
When you try to compile your game’s C++ code while the Unreal Editor is running, it can cause issues because the engine’s code and your game’s code are built together in the same process.

The correct workflow is to close the Unreal Editor before compiling, then reopen it after a successful build.
If you want to avoid closing the editor, you can try using Live Coding by pressing Ctrl + Shift + L in Visual Studio. However, Live Coding can sometimes fail, especially if you make larger changes.

The recommended and more stable approach is still to close the editor before compiling.

This issue confused me for a long time as well, so I hope this helps you out!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.