Adding new classes to C++ project

This is probably very simple, but I can’t wrap my head around.

I have created sample TPP project. When I browser it there are some things that I just don’t know how they end up in:*.

  1. *.generated.h in External Dependencies. I figured out it is in Intermediate folder. But how did it end up here in the first place ?

  2. I add new class header file to project. But I can’t reference it anywhere. I guess it have something to do with *.generated.h files, which brings us to first question.

  3. I thought I need to run *.bat script, but expect from regenerating base project from scratch it doesn’t seem to do much.

  4. There is also *Classes.h file. I guess I have to add all custom class includes here ?

Could we get some explanation on project structure and how to handle it ?

Ok. I figured out how this thing works. In case someone have the same problem:

  1. Add new class to Classes filter. When popup window showup browser to classes folder in you project [projectName]\Source\[ProjectName]\Classes
    And add header file here. do the same respectevily for cpp files (they are going to Private folder).

  2. Open header file and paste this:

        #include "TPPPlayerCamera.generated.h"
        UCLASS(Blueprintable)
        class ATPPPlayerCamera : public APlayerCamera
        {
        	GENERATED_UCLASS_BODY()
        };
    
  3. The open you cpp file and paste:

       #include "YourProjectName.h" //an file usually in public folder
        AYourClassName::AYourClassName(const FPostConstructInitializeProperties& PCIP)
            : Super(PCIP)
        {
        }
    

After that rebuild project. do not add anything inside classes before you rebuild.

I haven’t tested it but I think process for creating files in subfolder is similiar. First create Filter with you desired folder name and then create folder in Class or Private folders of your project.

Thank you, certainly clarified things for me a bit.

Thanks, helped me out as well!