Components/Widget.h only available in Editor build

I updated my project from 4.19 to 4.20 and since the update i can’t build any other target than the Editor. Building the game gives the following error:
fatal error C1083: Cannot open include file: ‘Components/Widget.h’: No such file or directory
No other errors or warnings.

The file is there and can be opened. It builds fine on Editor as target.

What could be the cause?
I already deleted all directories except Content, Config and Source and regenerated the VS project files.

I found the problem: UMG needs to be added to the dependency modules in build.cs.

2 Likes

This helped me for same issue with 4.27. Thank you!