Creating Header-Only Files?

Trying to figure out how to create an USTRUCT in a file separate header file (without being defined in other class header) manually (in Visual Studio) and I came . This solved my problem, somewhat. IntelliSense broke somehow after doing all the stuff, which is annoying.

One possible workaround is to use the class wizard in Unreal Editor to create a new class with no base class selected. With this we don’t need to move the files around and regenerate project file. Once the class is created, we can just remove all the functions we don’t need and make it a struct. Then add all the macros and include the headers an USTRUCT needs. IntelliSense should work just fine.

I don’t know why Epic has not added option to create struct in the class wizard.

Anyway your reply is still informative. Thank you.

1 Like