First off, this is not a question, it’s a fix. I just didn’t know where to put this so here it goes.
I was creating a widget to show controls that wouldn’t interrupt gameplay.
It is just a small button in the top right of the screen that said “To Show Controls Press Here.” Once clicked it would make that button fade away and a new border contained box showing all of the controls would slide in from the right, also containing a button to close that new box showing the controls.
It worked fine and I was happy with it until I noticed that pressing Space Bar, which is a gameplay control, would replay the last animation of the widget that was played. This would happen for either the onClicked animation that would fade the button and show the controls, or the button to hide the controls box.
I was able to fix this by adding a Set Focus to Game Viewport action right after the onClicked event.
I think this would also work by putting the Set Focus at the end, I don’t remember.
