x

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"

Widget component cast not working

I'm kind of new to Blueprint with UMG, so maybe my thought process is completely wrong here, but this is what I am doing:

1) Created a widget component named "DebugWidget"

2) Set the widget component class type to "DebugWidget", which is just a simple widget with an image exposed as a variable.

3) Cast the widget component to my DebugWidget so I can retreive the image and change the color of it.

Step 3 is failing and I have absolutely no clue to why this would happen, unless if somehow the widget component holds a reference inside to the DebugWidget, without actually being it....

So how do I do something like this correctly?

alt text

Product Version: Not Selected
Tags:
widgetcastfail.jpg (56.8 kB)
more ▼

asked Dec 11 '14 at 08:32 AM in Blueprint Scripting

avatar image

Roel
2.4k 69 42 141

avatar image Darknoodles Dec 16 '14 at 01:14 PM

I have the same issue. I just need to get a variable and the cast fails every time (when the editor doesn't crash, as it does every two minutes, for random reason like popping up the context menu in graph...)

I think the 3d widget is just broken currently and we will have to wait for an update. If i have something new i'll let you know.

avatar image Roel Jan 05 '15 at 08:08 PM

Bump! Anyone?

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

1 answer: sort voted first

Hi there,

I was having the exact same problem, and I found your question while trying to find a solution.

I managed to get it working (YAY!). Basically, I was trying to cast the Widget Component in my blueprint the original Widget Blueprint.

When I was trying to get it working I just typed in "widget" into the context menu and found "Get User Widget Object".

I then plugged this into the cast as you had previously done and it worked. :)

On your one, just replace "Debug Widget" Widget Component with "Get User Widget Object". Hopefully it should work.

Here is a picture below, and it works! Let me know how you get on.

alt text All the best! :)

widget cast.jpg (74.9 kB)
more ▼

answered Jan 19 '15 at 01:55 PM

avatar image

AgentMilkshake1
285 13 18 33

avatar image Roel Jan 26 '15 at 06:16 PM

You're a hero!

avatar image PremiereBoris Apr 04 '15 at 04:14 PM

I know this is late, but thank you.

avatar image AgentMilkshake1 Apr 21 '16 at 12:52 PM

Hey Roel, could you mark this off as the Answer :) thanks

avatar image MykonCodes May 16 '15 at 11:30 AM

Thaaaaanks!

avatar image og1sha Oct 10 '16 at 12:57 PM

Thanks man, i was really bugged by this!

avatar image BrunoChaves Jun 21 '17 at 02:53 PM

Doesn´t have this "Get User Widget Object" option in my case. I´m trying to cast a widget from another widget, anyone maths with the option you mentioned.

avatar image Zexus_ Feb 26 '19 at 10:00 AM

Same, I can't find it too!

avatar image Nebula Games Inc Mar 01 '19 at 04:46 AM

This may help. Shows how to get widget references from other widgets. The trick is to find out where the widget was "created" and store it as a variable you can access from other BPs. I also explain the "get user widget object" node, as it isn't clear from the above screen shot.

https://www.youtube.com/watch?v=BdARbvNrvQE

avatar image Nick Jackson Feb 10 '18 at 05:10 AM
  • on the answer

avatar image gnoumph Sep 16 '18 at 06:49 PM

Yay! Thanks dude :D

avatar image Raycng Oct 30 '18 at 02:45 PM

Thank you so much!

(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