I have a UWidgetComponent attached to the root component of my AActor. I used UMG to make a widget with an UEditableTextBox and selected the UMG widget as the Widget Class in the BP editor. How do I access the components of the UWidgetComponent if it’s based on a blueprint class?
I figured I could make a simple UUserWidget class to base the BP on instead:
UCLASS()
class QUATERNIONV3_API UQTerminal : public UUserWidget
{
GENERATED_BODY()
protected:
virtual void NativeConstruct() override;
private:
UPROPERTY(meta = (BindWidget))
class UEditableTextBox* CLI;
void HandleTextCommitted(const FText& Text, ETextCommit::Type CommitType);
public:
};
But then I’d have to cast the UWidgetComponent to a UQTerminal when I want to interface with the UEditableTextBox. Is there not a more succinct way to do this?
Moreover, is there a more efficient way of rendering dynamic 2D text in world space? The UWidgetComponent jitters whenever it moves.