[4.5] TP_2dSidescroller template-generated PCH inconsistent with 'add code to project' generated files

Engine version: 4.5 Github

The 2d sidescroller template creates a PCH with the name [ModuleName]Private.h which is included correctly in the default code generated when creating a new project.

However, code generated in-editor using the ‘add code to project’ wizard expects a PCH named [ModuleName].h, and this leads to compilation errors.

Steps to repro:

  1. Create new 2d_Sidescroller C++ project
  2. Verify [ProjectName]Private.h exists in the Public folder
  3. Use Add Code wizard to create actor class, name irrelevant
  4. Open up the created class’s implementation file
  5. Verify implementation is including [ProjectName].h instead.

On examination of the other templates, I can see that they all lack the ‘Private’ suffix on their PCH, so I presume that this is an error with the sidescroller template specifically.
Unfortunately, the templates are unversioned so I cannot submit a pull request to make the necessary changes.

Hi twiddle,

Thank you for bringing this to our attention. I have submitted a report about this issue to our development team (TTP 349736).

Hi twiddle,

I just wanted to provide an update on this issue. A fix was entered for this a couple weeks ago, and I just ran through my test case with our latest internal build and the header files are now named correctly in the 2D Side Scroller template.

The GitHub commit for this fix is here.