I made a new blueprint class based on a widget Button. I have a function in my game widget that creates and adds a button to the screen and binds an on-clicked event. This new button appears on the screen and works whenever I click on it. However, I can’t seem to cast to anything on it.
I’ve tried casting to my gamemode, gameinstance, gamestate, playercharacter and playercontroller but they all fail to cast. I put a breakpoint and it seems that all the “get” values return null. Is there something here I am missing?
And yes, I have set all my custom modes,states, etc. to be used in the game. I am able to cast to them from my main widget and playercontrollers and other places.