error C1083: Cannot open include file: 'myclass.generated.h': No such file or directo

I got a problem for how to include my class into our unreal 4 4.2 game.

I put my my files under the

myGameRoot\Source\ShooterGame\

and use “generate.bat”
to include it. but it still can not include my class in.

how can I deal with it?

thank you very much.

The root folder of your project and of you source must be the same name. You cant use MyGame as the root name and then ShooterGame as the source root.

Example. C:\Users\Anton\Documents\Unreal Projects\MyGame\Source\MyGame\ bla bla bla.

Then just right click on your .uproject file and select “Generate Visual Studio Project files”