How to correctly spawn an object using Blueprints

I made a seperate blueprint function for character stats to be displayed as a widget, everything seems fine, except the fact that it spews out an error at object creation function “Construct”. Not sure if I’m blind and did something wrong, or something has changed in how you construct a new objects in latest editions of UE.

#CombatUI > SpawnCharacterWidget

Error that I get upon BP compilation (Wrong class to spawn in ‘Construct Object from Class’):

Input pins:


#CombatUI > Event Graph


What do you mean? If you mean “BaseCharacterCombatPanel”, then it is selected as input in the details of the function definition, otherwise the Construct would be empty. + Why would I bother with function calls? The problem obviously is in the definition, not usage, which I stated with images and the compilation log

The call node ‘SpawnCharacterWidget’ in the CombatUI event graph needs something in the ‘class’ input. Pick your widget class in the ‘class’ dropdown. Right now you are passing null to ConstructBaseCharacterCombatPanel class input.

Function input pins just define what data can pass through. They will not actually initialize anything.

Well, you haven’t selected any class when calling the function.

If you develop a 2D widget, you just call CreateWidget to create a widget.

If you develop a 3D widget, you can see here (

If you want spawn an actor, you need to execute SpawnActor from class and give it a class.

Yes, you’re right, it did pass a NULL, BUT as I stated previously - it doesn’t really matter what you pass to the node. In fact, you don’t even have to use the function at all.