Header only through ue4?


Is it somehow possible to create a header through the ue4?
Because when I create one with Visual Studio by my self it always ends up in the \Intermediate\ProjectFiles folder

the only solution for me right now is to create a “None” class in the ue4 editor and delete the .cpp file

You can just move it to the Source/(YourProject) folder, or change the folder in the Add new item window.

what about the PROEJCT_API (e.g: class MYPROJECT_API AObject .... {} )
its automatically added through the editor, is it recommended to add this?
and #pragma once too?

I’ve never used #pragma once, instead I used #ifndef
therefore it was a bit confusing to me :slight_smile:
thanks for your answer!

Well you will have to write the file yourself and add whatever is required for your implementation. As for the examples you mention, #pragma once should always be used. For the *_API macro there’s a pretty good answer here What does COREUOBJECT_API & ENGINE_API macro? - C++ - Unreal Engine Forums