I’m trying to create my subclass of UUserWidget (UTargetInfoWidget) in C++.
How should I go about this? doesn’t seem to like widgets, and you can’t instantiate UObjects without some sort of constructing object (UWorld, GEngine, etc). Additionally, suggests that the return be stored in a TSharedPtr or TSharedRef, which you can’t use for UObjects.
In 4.5 there are some CreateWidget<T> global functions you can use. For 4.4, probably best to use the same one Blueprints use, UWidgetBlueprintLibrary::Create. is for Slate widgets, you wont use it at all in UMG unless you’re implementing a new primitive (non-uuserwidget) widget, that wraps an existing Slate widget.