I am using Menu pop-ups to display a short tutorial over a period of time, usually at the beginning of a game or level. I am also using them for other things like location hints when you enter an area and objective pop-ups. I'm not sure if this is the best way to accomplish this, but I found it quite easy to do with the action list asset and fading.
However, the player can restart the game at any point and I would have to hardcode a menu turn off during the restart action-list to make sure nothing remains when the scene is re-loaded and was wondering if there is a way to accomplish an auto-turn off for these menus instead? I have about 15 menus which will have to be hardcoded to turn off including the pause menu, any ideas?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @GAaron.
If the Engine: End game Action is used with the Restart Game command, you can use the Reset Menus too? option to revert all Menus back to their default states. Have you got this option checked?
It's also possible to hook into the OnAfterChangeScene custom event to turn off a Menu via script:
Thanks Chris, I'm actually using the Reset Scene command, is there no automation using this method?
(edit)
PlayerMenus.GetMenus() might do it actually..
(edit 2)
Here is my solution, it just iterates through all the menus and turns them off without requiring a persistent object (Currently what I need) but if I needed to target specific ones I'd group them by title and just check if the title contains "tutorial" or whatever before turning them off: