What object should I cast in the cast function?

Hey there!
I have a little problem…
I have an UMG with an OnClick Event. I want to cast to the Main Menu to accsess the widget switcher.
So: OnClick I want to access from one umg to another the widget switcher index.
But my question is:
To what object should I cast in the cast function?
I’ve attached some screenshots.

Thank you for all your help guys!

Mhh, I’m not sure, but can I access the widget switcher in the Main Menu with Get All widget of class?

Hi LtF,

Maybe this can help you.


Yes right. Or maybe create reference controller character for this if dont’t want this use.

You should create/show/hide widgets in your main HUD class. And store references to them there also. With this you can get any main widget (main menu, pause menu, player hud) from it with:

Get Player Controller → Get HUD → Cast To YourHUD → get reference to wigdet