Forum rules - please read before posting.

Resolution option dropdown hides options

I've added a resolution selector to my options menu as outlined in the tutorial https://adventurecreator.org/tutorials/adding-screen-resolution-option

Customers of my game have asked that I use a dropdown selection rather than a button selection due to the number of resolution options of their monitors.

I've attempted to switch the button selection to dropdown from the item action, but upon doing so, the options menu disappears after a resolution has been chosen from the dropdown. I'm not sure why because I'm calling the ActionApplyResolution ActionList just the same as before when it was a button, all I have changed is the changer from button to dropdown.

Comments

  • Make sure that your ActionList's When running is set to Run In Background, but there may be more to it.

    This is a Unity UI-based menu? What is its Appear type property set to?

  • edited September 2022

    I've changed Set resolution ActionList's when running to 'is set to Run In Background'. The Appear Type is set to 'Manual'.

    With those settings the Options menu still disappears when choosing the resolution setting from the dropdown.

  • edited September 2022

    If the Appear type is Manual, look for Menu: Change state Actions set to turn this Menu off. Instances of a particular Action type can be searched for in the Actions Manager.

    You can check if they're being run by attaching a comment to them via the cog icon in the ActionList Editor, and then opting to print them in the Console via the bottom of the Settings Manager.

  • I can't find any instance of Menu : Change state in any of these actions.

    The only change that I've made from the resolution settings tutorial at https://adventurecreator.org/tutorials/adding-screen-resolution-option is that I've changed UI basis from Button to Dropdown and the associated linked button.

    The dropdown is getting populated with the correct resolutions, so I know that it's recognized, but when choosing a new resolution nothing happens.

  • edited September 2022

    The dropdown is getting populated with the correct resolutions, so I know that it's recognized, but when choosing a new resolution nothing happens.

    Is the Engine: Apply resolution Action being successfully run? The Options menu being inadvertently closed may be interrupting it. Again, attaching a comment to the Action can help reveal if this is the case.

    I can't find any instance of Menu : Change state in any of these actions.

    The main alternative way the Menu can turn off is if you have a Button whose Click type is set to Turn Off Menu. Could such a Button be e.g. underneath the list such that clicking the list also clicks the Button?

    We can find out exactly why/how the Menu is turning off with a code adjustment. If you open Menu.cs, look for the TurnOff function (around line 2008). Just inside it, copy/paste the following:

    if (!IsOff () && title == "Options") Debug.Log ("Options menu was turned off");
    

    Look for the instance of this message in the Console at the moment the issue occurs, and copy/paste its content here - stacktrace included.

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.