Be the first to post for 'Connecting UMG to C++'!

If you’re reading this, there probably aren’t very many posts yet. But don’t worry, you can be the first! Either create a new post or just reply to this one to say ‘hi’.

1 Like

My description of the lesson’s error

I receive multiple errors saying “Non-optional” widget binding “Host” (or) “Join” not found.
I’d say these errors are due to the UButtons *pointers not actually being bound to the corresponding widgets yet.

edit: It seems that I was semi-right, after looking at the documentation I was right about the pointers not being bound.
However I did not know yet why this was the case.

1 Like

In this lesson your buttons definition is in a private section…only work in a public section
class PUZZLEPLATFORM_API UMyUserWidget : public UUserWidget
{
GENERATED_BODY()
public:

		UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
		class UButton* Host;
	    UPROPERTY(BlueprintReadWrite, meta = (BindWidget))
		class UButton* Join;

	
	
};

Ah, yes, theses should be at least protected I think.

Privacy & Terms