Forum rules - please read before posting.

Unity UI Prefab can't be automatically selected when pausing during cutscenes

Hello, even if Directly-navigate menus when paused and during cutscenes are set to true, automatic selection of a button does not work when using Unity UI Prefab, and only the cursor can be used for selection. It does work when using AC's UI though. I'm using the new Input System, and tried with several menus, including the default one.

Comments

  • As well as checking the global navigation boxes at the top, you'll also need to specify which Element should be selected when each Menu is turned on.

    These options are at the bottom of each Menu's properties panel - see the Auto-select first visible Element? and First selected Element fields.

    It's also possible to force the selection at any given time using the Menu: Select Action.

  • Yes I know that, but the issue is here even when specifying the first selected element. Am I the only one with this issue with Unity UI Prefab specifically during cutscenes ?

  • You mention this occuring specifically during cutscenes - is this to say it works during pause mode?

    Does running the Menu: Select Action manually once a Menu is open force the selection to work?

    If not, the use of Input System may be compounding things, as it relies on its own Event System.

    Does the issue occur if you switch back to Unity's default Input Manager, and remove any Event System object from the scene file?

  • I just created a new project with only AC and the default input system, I confirm the issue remains the same : no issue when pausing the game during gameplay, the pause menu will automatically select the first element or a specific one if asked to, but not when opened during a cutscene.
    The Menu Select action doesn't seem to work at all, I tried creating an external action list selecting a button and assigning it to ActionList when turn on but to no avail, no matter the combination of factor (with Run in background or Pause gameplay, or during gameplay or cutscenes).
    I hope all these infos can be useful somehow !

  • Oh wait, one more thing : the Menu Select action can actually work as long as the game is not paused ! I did manage to create a manual selection for my main title that way. However this fix is not applicable for the pause menu - or any other menu for that matter - with Pause game when enabled set to true.

  • Is the Menu itself set to be interactive during cutscenes, via the Clickable in Cutscenes? option?

  • I had completely missed these Appear Type parameters, the Manual option with clickable in cutscenes seems to be the best, the pause menu can be called at any time with it, while During gameplay and conversations doesn't do what it is supposed to.
    I don't think this is a good solution though, this forces us to use the menu select action while AC should be able to handle that on its own with the Appear type set to OnInputKey for the Pause menu. Have you managed to reproduce the issue I have with Unity UI Prefabs during gameplay ? Or is it just on my end ?

  • Forgot to add that my title screen menu now uses the Manual Appear type (I had left it to OnInputKey so far) and automatic selection of a button works perfectly without the need for the Menu Select action ! So that's a good thing, but the issue still remains for the pause menu, for which I just want to be able to leave it to OnInputKey and have a button automatically selected when pressing the Menu input during a cutscene, without the need of an additional action list.

  • There are a lot of fields and steps involved - if you can share screenshots/steps to recreate the specific issue you're having, I'll be able to more reliably recreate the situation. From what I understand of your issue, though:

    The ability to use Menus in cutscenes is tightly-controlled and limited to specific Appear type values - you would need to set the Appear type to Manual, which is best when dealing with more Menus with more fine details, such as being able to click during both cutscenes and pause mode.

    To replace the "On Input Key" behaviour, but with more control, use Active Inputs that listen out for your input and then turn the menu on/off. Active Inputs are a way of running ActionLists when an input is pressed.

    If you create an ActionList that first checks the Menu's enabled state with Menu: Check state, have it then run one of two Menu: Change state Actions to then turn it on/off accordingly. After turning it on, an additonal Menu: Select Action can be added if necessary.

    Apologies that this does require an additional ActionList, but with this technique you should be able to limit the logic to a single list, rather than having to assign anything in the Menu's ActionList when turn on field.

  • edited January 2023

    Well I've been using AC for a few years now and I had never seen that Active Inputs window o_0 It's quite convenient !
    While I maintain the ideal and intuitive solution would be for the Menu manager to handle the input and automatic selection on its own, creating this additional action list is not a headache either and produces the expected results, without the need for the Menu Select action !
    Still, if you want to try and reproduce the issue, just create a new project with only AC, open the Basement demo scene, enable all Directly-navigate options at the top of the Menu manager, set the source to Unity UI Prefab and either tick Auto select or set a first selected element, and then press play and pause the game during the opening cutscene, and you should see that automatic selection with Unity UI Prefab during cutscenes doesn't work out of the box.

    In any case, thank you for your help !

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.