[UMG] C++ Slate Widget not Visible in Widget Blueprint Palette

Hi I created a slate widget in C++ and want to use it in widget blueprints. However, I cannot find it in the palette panel. And I also found some widgets in Slate module are not visible (like SSpinningImage). Anyone knows what should I do to add them to the palette?

Okay I checked the UMG module and had a guess that you have to create a UWidget and cache the SWidget as a pointer. Is my thought right? Thanks.

What is the parent class of your widget?

I just discussed this problem generally, and I proved my guess above. A child class of UWidget is required to hold the SWidget and used in widget blueprint. I created a USpinningImage to hold the SSpinningImage, and it worked.

Okay I figured it out. You need to create a Subclass of UWidget as an UObject to place it in the widget blueprint. This requires to include UMG module and files under Components/. In this new class you need to cache a shared pointer of your SWidget, and delegates you want the widget to interact with.

Use GetPaletteCategory() to name a new category, and you’ll find it in the Palette.