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.
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