UWidget is not defined.

Hi !

I am using UMG in one of my projects, and today I added a C++ class to the project (derived from nothing). But during code compiling, an error occurs and the editor tells me that hot reload failed. In the log, I have multiple errors from the compilers, but I think that almost all of them come from that one :

UWidget : base class not defined in the file TextBlock.h of the engine, in the line that declares the TextBlock class :

class UMG_API UTextBlock : public UWidget

Do you think there is an include missing ? In this case, in which file is the UWidget class defined ?

Thanks :slight_smile:

EDIT : When I include the UWidget file, a part of the errors disappears, but a part stays. I think it comes from the Macro :

class UMG_API UTextBlock : public UWidget

because I have an error on this line : missing ‘;’ before …

I hope I am not doing bad things…

Ok, that was a tricky problem.

I tried to inherit the textblock class yesterday, but it didn’t work, and i had these errors. So I deleted these files, and the errors disappeared. But I did a checkout with git, so the files came back, and the errors with them. I have now properly deleted these files, and committed with Git.