Both the header and the source file are successfully created, but the source file contains only the #includes, without “MyClass::MyClass(<the objectinitializer parameter>) {}”.
So, i try to add it manually, but, when i try to compile, i get this error
“error C2084: function ‘MyClass::MyClass(const FObjectInitializer &)’ already has a body”.
May it be due to the fact that another engine version was used in the tutorials?
I really hope someone could help me, since i have no idea of what i’m doing wrong.
With the upcoming 4.7, GENERATED_UCLASS_BODY is deprecated so you’ll want to have GENERATED_BODY(). The difference is that everything below is now private in the header so you want it to look like this:
class MyClass
{
GENERATED_BODY()
public:
MyClass(const FObjectInitializer& ObjectInitializer);
};