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?
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.
All the best! :)
answered Jan 19 '15 at 01:55 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here