Hi
I have a problem with files added outside the editor to my VS project. I’ve added to files MainMenuWidget.h and MainMenuWidget.cpp that contain code of my menu widget. But after adding them(Through Visual Studio File -> New File) to my project I can’t normally build it. It gives me the following error:
EXEC : error : The first include statement in source file 'C:\**\Unreal Projects\TowerDefense\Source\TowerDefense\GameModes\Menu\MainMenuWidget.cpp' is trying to include the file 'TowerDefense.h' as the precompiled header for module 'TowerDefense', but that file could not be located in any of the module's include search paths.
I’ve tried rebuilding project files, but this doesn’t help.
It only builds when I rebuild a whole project. Why is that so? What is the proper way to add new source files to project, since I’m probably doing something wrong.
Thanks in advance.