Sheim
Sheim

Reputation: 61

Unreal Engine 4.18.2 "no default constructor exists for class "UUserWidget""

I have experienced a strange issue writing the constructor of UUserWidget-inherited class. The problem appears only (checked in several other) in this class. Code: .h .cpp UserWidget.h CompilingResult

Upvotes: 0

Views: 3545

Answers (3)

Richard Lee
Richard Lee

Reputation: 1

For others finding this and being none the wiser, as Op just says "fixed it in CPP". Its almost certainly due to missing the following include:

#include "Blueprint/UserWidget.h"

Upvotes: 0

Yannai Cohen
Yannai Cohen

Reputation: 23

add default constructor "UUserWidget();"

Upvotes: 2

DankMemesBot
DankMemesBot

Reputation: 98

Try to add this to your base class (UUserWidget):

UUserWidget();

That's because there is no default constructor for this class. The default constructor is one which takes no parameters.

Upvotes: 5

Related Questions