How to define a USTRUCT in a plugin?

I have created som c++ classes and now i want to put all of this in a plugin.
Now i struggle in recreating my ustructs for the plugin.
To define my plugins i normaly create a new c++ class over the wizard choosing none parent class.
then i delete the .cpp file and change the .h file to:

#pragma once

#include "MyClass.generated.h"

struct FMyClass

wich works fine but when i try to declare my new class and change the target module to the plugin
it dosent work.
when hot reload in the editor it compiles but ignores this file completly when i compile it in visual studio it dosent recognize the .generated.h file (even tho that i can open and look into this file)
and so has problems with the macro USTRUCT and everything below. the compiler says syntaxerror in

Thanks in advance
kind regards


Hi !

You should add a default constructor to your struct :


Also, plugins are not compatible with hot reload, only your main module will hot reload

if adding ctor doesn’t fix the problem, could you share with us the output log of visual studio ?

( the way you declare struct looks fine to me )


the struct don#t need a constructor.
I was missing to include engine.h
and then i have to completly close the editor and reopen it ti see my struct in blueprints.
what a struggle to just create a struct -.-