Forum rules - please read before posting.

Graphic options template with URP

Hi!
unity 6000.0.47f1 + Adventure creator 1.84.3

I have a question: is the template graphic options compatible with URP and the latest version? I set it in different ways, as shown in the photo, but when I click Apply in the game, the setting changes strangely in both cases.
For example, when I click Low and then Apply, the label changes to Medium, etc. Swapping their order in the AC Menu does nothing; they mix in a different way.

When I change the quality of, for example, textures, the quality changes to custom, and after clicking apply, the settings change back to something else, e.g. Low.

Am I setting it up wrong, or are the scripts not compatible with URP?
Additionally, I am using a resolution of 2560x1080 21:9, and when I first enter the settings, the resolution label is empty and I get an error when I try to save. Only when I enter the settings a second time does it display my resolution.

Thank you in advance for your help. :smiley:

Comments

  • The Quality settings are independent of render pipeline, as I understand it.

    I'll attempt a recreation. Are any related messages appearing in the Console?

    Don't add a "Custom" option to Unity's Quality setings - the second screenshot is the correct setup.

    Additionally, I am using a resolution of 2560x1080 21:9, and when I first enter the settings, the resolution label is empty and I get an error when I try to save. Only when I enter the settings a second time does it display my resolution.

    What do you mean by "enter the settings", and what is the exact error?

  • It's hard for me to explain or find a reason. I'll post a link to a video showing the behavior I described.

    After entering the graphics settings, the resolution field is empty, and an attempt to save results in the following error:
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index

    (I know that the video shows the message “Quality Settings value mismatch,” but even with the correct quality levels in project settings, the same error occurs.)


  • edited September 30

    Additionally, I am using a resolution of 2560x1080 21:9

    2560x1080 is 21.33:9 - do you get the issue if you use 2520x1080 instead?

    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.

    I need the stacktrace as well - the full text that appears underneath this error.

    Have you updated the GraphicOptionsUI prefab's root Inspector with the Resolutions you wish to allow?

    (I know that the video shows the message “Quality Settings value mismatch,” but even with the correct quality levels in project settings, the same error occurs.)

    For the "Quality Settings value mismatch" issue, locate the Quality Settings dropdown in the GraphicOptionsUI prefab itself, and add additional options to it to match the number of Quality Settings you have, plus one more. They don't need to have their labels set - only the amount of them needs to match.

    Also related to Quality Settings: open up the GraphicOptionsUI script and look for the following around line 63:

    GraphicOptionsData graphicOptionsData = new GraphicOptionsData (GetDropdownValue (resolutionDropdown), fullScreenToggle.isOn, IsCustomQuality ? nonCustomQualityLevel : GetDropdownValue (qualityPresetDropdown), IsCustomQuality, GetDropdownValue (antiAliasingDropdown), GetDropdownValue (textureQualityDropdown), GetDropdownValue (vSyncDropdown));
    

    Try replacing it with:

    GraphicOptionsData graphicOptionsData = new GraphicOptionsData (GetDropdownValue (resolutionDropdown), fullScreenToggle.isOn, !IsCustomQuality ? nonCustomQualityLevel : GetDropdownValue (qualityPresetDropdown), IsCustomQuality, GetDropdownValue (antiAliasingDropdown), GetDropdownValue (textureQualityDropdown), GetDropdownValue (vSyncDropdown));
    

    Does that give any improvement?

  • I can't change my computer's resolution to 2520x1080, so I tried adding aspect ratio 2.37 to the supported aspect ratio. However, my resolution still doesn't appear in the dropdown menu.
    It only appears in the Label after returning to the settings again, even if the resolution is set to something else. This is shown in the second video from the build.

    I set the quality levels correctly, so there is no longer a “Quality Settings value mismatch” error. However, strange things still happen after clicking Apply when I changed line 63 as well - the Label does not match the dropdown option. This can be seen in the first video.

    full error message that appears when I try to save the settings without changing the resolution:
    ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index System.Collections.Generic.List1[T].get_Item (System.Int32 index) (at <314938d17f3848e8ac683e11b27f62ee>:0)
    AC.Templates.GraphicOptions.GraphicOptionsData.Apply (System.Collections.Generic.List1[T] resolutions) (at Assets/AdventureCreator/Scripts/Templates/GraphicOptions/Assets/Scripts/GraphicOptionsUI.cs:525) AC.Templates.GraphicOptions.GraphicOptionsUI.Apply () (at Assets/AdventureCreator/Scripts/Templates/GraphicOptions/Assets/Scripts/GraphicOptionsUI.cs:81) AC.Templates.GraphicOptions.GraphicOptionsUI.SaveAndApply () (at Assets/AdventureCreator/Scripts/Templates/GraphicOptions/Assets/Scripts/GraphicOptionsUI.cs:72) UnityEngine.Events.InvokableCall.Invoke () (at <1e74f08236fb4c1791a523c0bf197e6c>:0) UnityEngine.Events.UnityEvent.Invoke () (at <1e74f08236fb4c1791a523c0bf197e6c>:0) UnityEngine.UI.Button.Press () (at ./Library/PackageCache/com.unity.ugui@f3fac7af1578/Runtime/UGUI/UI/Core/Button.cs:70) UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f3fac7af1578/Runtime/UGUI/UI/Core/Button.cs:114) UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) (at ./Library/PackageCache/com.unity.ugui@f3fac7af1578/Runtime/UGUI/EventSystem/ExecuteEvents.cs:57) UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction1[T1] functor) (at ./Library/PackageCache/com.unity.ugui@f3fac7af1578/Runtime/UGUI/EventSystem/ExecuteEvents.cs:272)
    UnityEngine.EventSystems.EventSystem:Update() (at ./Library/PackageCache/com.unity.ugui@f3fac7af1578/Runtime/UGUI/EventSystem/EventSystem.cs:530)
    `

  • The screen resolution can't be changed in the Editor - but you can set the Game window to a specific resolution in advance to help with testing where it says "Free Aspect" at the top.

    When exiting the build after setting a resolution and Applying it, does the Dropdown appear filled in the next time you start the game?

    The reason this is empty upon startup may be because the game's default aspect ratio does not match any of those listed in the component.

    To fix the error message, in the same script, change line 523:

    if (screenResolutionIndex < resolutions.Count)
    

    to:

    if (resolutions.Count > 0 && screenResolutionIndex >= 0 && screenResolutionIndex < resolutions.Count)
    

    I cannot recreate your issue with the Quality dropdown. Does this occur with the original, unmodified, Graphic Options menu?

  • Okay, so I decided to add and configure the graphic options template again. And even though I had only modified the appearance of the menu before, it solved some of the problems. Unfortunately, I couldn't find the exact reason.

    The quality issues have been resolved and the resolution when fullscreen seems to be working fine but

    The problem remains when the game is windowed, then:

    • regardless of the current resolution saved, 1280x720 is displayed when you first enter the settings.
    • Each next time I enter the settings, regardless of the current resolution, the label displays my native 2560x1080 (the dropdown list has the correct one selected).
    • Despite this and the fact that I added 2.37 aspect ratio, the dropdown list does not contain my 2560x1080 resolution.

    I tried to capture these mistakes on video.

    After restarting the build, my resolution is still not on the list.

  • edited 8:04AM

    Thank you for your continued patience.

    Are you entering in an aspect ratio of "2.37"? If so, enter in the calculation instead - i.e. "2560/1080", so that the value is more accurate. Bear in mind, however, that the UI is only capable of listing resolutions that Unity supports in its Screen.resolutions array. I'm not sure if 2560x1080 would be listed there.

    I have, however, recreated the issue of the dropdown value appearing differently upon re-opening the Menu. I will look into this.

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.