Cannot cast to widget blueprint

Hello sorry for a stupid question but i need help im currently following

and in part 6 i have to cast to my widget blueprint but i am unable to cast to mine no matter what i try can someone help me how can i do this screenshot example of it not appearing ive tried with context on and off including with experimental on and off, ive also had lots of problems casting in other blueprints also with 4.5. sorry for bad spelling and grammar also.

thank you for your time.

You shouldn’t need to cast anything to your widget at all. Instead, on the widget, cast to MyCharacter. or even better, create an interface with Getter functions. But, if you really want to cast to your widget, use Cast To User Widget, it should automatically link your variable there up to the widget object.

Personally, I would recommend interfaces though. Then you can just call the get functions directly and there is some protection against things going screwy.

okay thank you for the advise I was just following the guide said to do that but thank you ill give interfaces a go.

have a good day.

Ok, let me know how that works for you. I use it on my own widgets, and it works REALLY well, not to mention it’s faster. If you need some examples, let me know and I can send you some screen shots.

okay will do thanks and screenshots would be great to help get the grasp of it thank you again.

Stumpzilla, I am moving this to a new answer thread for space reasons. See the Screenshots attached.

Ok, this assumes that you have already created the widget. Create an object variable on your widgit of type My Character, make sure that in the variable details it is set to public and exposed as a pin. On your characters Event Begin Play, you initialize the widget, and set a local variable for it. Right Click on the event graph and "Get reference to self". Make a Cast To User Widgit, and pin the reference to the Player Character input pin.

Create a new blueprint interface, and set up some default Get/Set Functions. Make sure you have a Return Value for the type you want to return to your Widgit. Save and Compile the BP

On your Character interface, look in the blue print details and add the interface that you just created. Save and Compile. The functions that you defined in the interface should show up in your character BP function list. Open up the editor for the function, and do whatever you need to do, then put the output to the return value pin. NOTE It is immensely helpful if you create a new category for your functions and add them all to that category.

On your widget, Bind the variable that you want to update to a function. Inside that function, drag the character reference you created earlier onto the graph. Drag off the output pin. In the context menu, if you created the category for your interface functions in your My Character blueprint, you should see that Category in the context menu, and your interface functions inside that category. If you did not put them in a category, they will show up under the Default category. If you do not see either of those, check your context ticbox in the top right of the context menu.

I will update you when I do this when home thank you very much for taking the time to do a in depth explanation for me more than I expected thank you again.

Never heard back from you. Did that work out for you?