Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Add SCompoundWidget to UUserWidget

I have a UMG widget I setup so the artist can move elements around and change the look of the UI, and I'm using Slate to add text to the UI dynamically when needed, and hopefully cache commonly used variables. I'm successfully able to find the desired element of the UUserWidget, but I can't figure out how to convert my SCompoundWidget to a UWidget.

 void UCollectiblesUI::AddItemToUI(FText ItemName)
     ItemToAdd = ItemName;
     if(UVerticalBox *vb = Cast<UVerticalBox>(GetWidgetFromName("VerticalBox_196")))
         TSharedPtr<SItemName> i = SNew(SItemName).textName(ItemToAdd);

How would I go about converting an SCompoundWidget to a UWidget?

Product Version: UE 4.13
more ▼

asked Oct 15 '16 at 06:58 AM in C++ Programming

avatar image

138 8 17 25

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Just wrap your SCompoundWidget with a UWidget, and use that.

more ▼

answered Oct 15 '16 at 09:57 AM

avatar image

332 21 21 36

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question