Why the custom UGameViewportClient class cannot be compile?

Hi everyone, I am a fresher on UE4 and I am working on the version 4.5.1. Because I need to override the UGameViewportClient, I generate the class in the editor “Add code to project”->“show all classes” and add an expanded
class of UGameViewportClient.

The problem is: it cannot pass the compile even I didn’t change anything else.
When I get rid of the class it can be compiled again. What’s wrong with my process?

Thanks very much.

Oh! I have fixed it. Because I don’t know that everything #include in .h file should put before the “*.generated.h”, the first time I add a #include “Engine.h” didn’t work.

Excuse that I asked an awkward question.

The question should be marked solved!