Creating UserWidgets in c++ for use in blueprints?


I was wondering how I could make UUserWidgets in C++, setup various widget components like canvas panels, buttons etc. for later use in blueprints? I need the widget components to be displayed in my widget-tree.

I remember myself doing this a while ago, but can’t remember how. I believe I created a widget component in both blueprint and c++ and binded them together somehow, but ideally I only want to create, for instance, a canvas panel in my C++ class and make it show up and be interactable in my blueprint widget.

How can I achieve such a thing? Thanks in advance! :slight_smile: