Hi,
I’m just starting with slate and I have some difficulties to understand the way a new Slate class should be created.
On one side, if I inherit from SCompoundWidget, it’s pretty straight forward but if I want to follow Epicx Docs, if I create a menu screen I should inherit from SUserWidget.
But by using SUserWidget, it have a strange implementation in the cpp file :example
you need to create a class ‘impl’ with a redefinition of the New of your main class with something like :
TSharedRef<SUserWidgetExample> SUserWidgetExample::New()
{
return MakeShareable(new SUserWidgetExampleImpl());
}
Why that?? because if I inherit from SCompoundWidget, I already got a TSharedRef from SNew. and SUserWidget inherit from SCompoundWidget…
I must miss something, but I can’t get it.
Thanks for your feedback.