Resolving Circular Dependency

I figured it out. In the ShooterGame example in the ShooterGame.h they #include a header file called ShooterGameClasses.h this file contained a #include to every class in the project. Its is actually auto generated by the Unreal Engine. I looked in my project and found I too have a MyProjectClasses.h however mine was empty. You can’t add anything to that file since it is auto generated and will delete anything you add to it. I instead added all the includes into MyProject.h then I simple #include MyProject.h for every classes. This will insure no circular dependencies are created even when two classes refence each other.

2 Likes