Forum rules - please read before posting.

Resolution to NOT be reset every time you restart

edited January 16 in Technical Q&A

Using the Graphic Options download how do you ensure the resolution is NOT reset every time you restart the game?

Also, my cursor disappears under the dropdowns? Any idea why? See screenshots here:

https://www.dropbox.com/scl/fo/d9pit277whoefjetsfeog/h?rlkey=fghosb2yp6wyzqc8mg10mre88&dl=0

And finally, any chance you can allow TMP for teh dropdowns?

«1

Comments

  • edited January 16

    Thanks

  • Using the Graphic Options download how do you ensure the resolution is NOT reset every time you restart the game?

    It should retain the change automatically. Are other options (e.g. Anti-aliasing) being restored correctly?

    Also, my cursor disappears under the dropdowns? Any idea why? See screenshots here:

    Are you using Unity UI for your cursor rendering? Select it in the Hierarchy at the time to see its state, and check that it's not being drawn underneath.

    And finally, any chance you can allow TMP for teh dropdowns?

    Replace Dropdown in the GraphicOptionsUI script with TMPro.TMP_Dropdown.

  • edited January 17

    It should retain the change automatically. Are other options (e.g. Anti-aliasing) being restored correctly?

    How would I check this? GOG tested the game and they delivered the verdict taht it is resetting every time the game is started. I tested and they are right, it defaults back to the starting resolution on opening the build each time

    Are you using Unity UI for your cursor rendering? Select it in the Hierarchy at the time to see its state, and check that it's not being drawn underneath.

    Yes I am using Unity UI for my cursor.sort order is 100, it is only the dropdowns that the cursor is behind. See screenshot

    https://www.dropbox.com/scl/fi/pvxdvqdgcol9y0i0f7syb/Cursor-Rendering.png?rlkey=6ihp0hoa2ytn3p01bf579jqid&dl=0

  • edited January 18

    How would I check this?

    Change another option, Apply, and restart.

    Yes I am using Unity UI for my cursor.sort order is 100, it is only the dropdowns that the cursor is behind.

    After selecting it in the Hierarchy, pause the game and view it in the Scene window. If it shows when the Dropdown object is disabled, it's a sorting issue.

  • So all graphic options do not save. How can I fix this please?

  • Replace Dropdown in the GraphicOptionsUI script with TMPro.TMP_Dropdown.

    Everytime Dropdown is mentioned in the script?

  • After selecting it in the Hierarchy, pause the game and view it in the Scene window. If it shows when the Dropdown object is disabled, it's a sorting issue.

    So it does seem to be a sorting issue, not sure how to 'sort' it though, See screenshots. thanks!

    https://www.dropbox.com/scl/fo/opf6lf105fy5j5ra8t9wc/h?rlkey=a59rbwj4tniyevtqmebstzdjt&dl=0

  • So all graphic options do not save. How can I fix this please?

    Did you Apply the Graphic Option's included Template file? Aside from copying over the Menu, you also need:

    • A Global String variable named "GraphicOptionsData", with its Link to set to Options Data.
    • The Graphic Options UI component's Global String Variable field also set to "GraphicOptionsData".
    • The Apply function of the Graphic Options UI prefab called via an Object: Send message Action, hooked into the OnBeginGame event in the Events Editor.

    The Template will make these changes for you. Check that these three are so.

    Everytime Dropdown is mentioned in the script?

    Yes.

    So it does seem to be a sorting issue, not sure how to 'sort' it though, See screenshots. thanks!

    Your last screenshot sorts it by raising the cursor prefab's Sort Order - make this change to the prefab.

  • Did you Apply the Graphic Option's included Template file?

    Yep

    A Global String variable named "GraphicOptionsData", with its Link to set to Options Data.

    Already applied when I applied the template

    The Graphic Options UI component's Global String Variable field also set to "GraphicOptionsData".

    Already applied when I applied the template

    The Apply function of the Graphic Options UI prefab called via an Object: Send message Action, hooked into the OnBeginGame event in the Events Editor.

    Already applied when I applied the template

    However, when I look at the Global variable, it says 'This variable will be stored in PlayerPrefs and not in saved game files.' could that be the issue, and if so how do I rectify?

    Thanks

  • PS I replaced every Dropdown in the GrahpicOptionsUI script and it wouldn't work for me, I could not drag a TMP into the slot

    https://www.dropbox.com/scl/fo/m2r3kdpwxvx1wpbqrsxps/h?rlkey=mv1csd5fcnefzr1ecobkun76u&dl=0

  • Your last screenshot sorts it by raising the cursor prefab's Sort Order - make this change to the prefab.

    Tried this, but the game resets the sort order back to 100 when in play mode.
    See video:

    https://www.dropbox.com/scl/fi/ppr5tj7twngvb268i0ey6/CursorSort.mov?rlkey=mza8dunsmitbruo1kxaz9udwk&dl=0

  • edited January 20

    However, when I look at the Global variable, it says 'This variable will be stored in PlayerPrefs and not in saved game files.'

    That's as it should be.

    Does the issue occur in the Editor? Open up the Save File Manager and look in the "Profile properties" panel's "Linked Variables" section. What data is set for the variable?

    PS I replaced every Dropdown in the GrahpicOptionsUI script and it wouldn't work for me, I could not drag a TMP into the slot

    Don't change the variable names - only the types.

    Tried this, but the game resets the sort order back to 100 when in play mode.

    Remove line 58 from the UnityUICursor script.

  • Does the issue occur in the Editor? Open up the Save File Manager and look in the "Profile properties" panel's "Linked Variables" section. What data is set for the variable?

    Sorry, I cannot see this on the Manager? Am I being blind?

    See screenshot

    https://www.dropbox.com/scl/fi/b1fct2rgcuawbekmp50ms/Save-File-Game-Manager.png?rlkey=j8nqa1gabk2alx3721apg9y6x&dl=0

  • edited January 21

    I mistook the label - it's there as "GraphicOptionsData", and it's being set.

    Does the issue occur in the Editor?

    The data suggests the Quality Preset is set to the first option - is this the case, and what does the same screenshot show if you switch to the second and click "Apply"?

    As you've made changes to the script / UI styling, also test the menu out in a fresh project that only has both AC and the unmodified template applied.

  • Hi, here are videos showing option change in the editor:

    and my new imported project with the save data.

    See both videos here:

    https://www.dropbox.com/scl/fo/dj5sog977m5s1al14x4ab/h?rlkey=0fbw1ai8ueo51ojtzt5lkj5r8&dl=0

  • They appear to be working in the Editor - but you need to exit/enter play mode, rather than reload save games, to confirm.

    Is this the case, and does the issue occur in the new project's build?

  • So the test build DOES work, and remembers the graphic options settings. So what in my project could be causing the options not to save?

  • Double-check the Apply function is being called - open your Events Editor and check the Action being run.

    You can also add a Debug.Log line to the GraphicOptionUI script's Apply function:

    Debug.Log ("Apply data. Got existing? " + (graphicOptionsData != null));
    

    What are all instances of this in full that appear in the Console upon starting the game?

  • So, one of the Graphic Options events had the action list trigger missing, I have now added it, but it still all reverts back on opening the build again.

    https://www.dropbox.com/scl/fo/dj5sog977m5s1al14x4ab/h?rlkey=0fbw1ai8ueo51ojtzt5lkj5r8&dl=0

    Below is what comes up when I click apply after choosing a graphic options and hitting apply.

    Apply data. Got existing? True
    UnityEngine.Debug:Log (object)
    AC.Downloads.GraphicOptions.GraphicOptionsUI:Apply () (at Assets/AdventureCreator/Downloads/Graphic options/Assets/Scripts/GraphicOptionsUI.cs:67)
    AC.Downloads.GraphicOptions.GraphicOptionsUI:SaveAndApply () (at Assets/AdventureCreator/Downloads/Graphic options/Assets/Scripts/GraphicOptionsUI.cs:56)
    UnityEngine.EventSystems.StandaloneInputModule:ProcessMouseEvent ()
    AC.OptionalMouseInputModule:Process () (at Assets/AdventureCreator/Scripts/Menu/OptionalMouseInputModule.cs:193)
    UnityEngine.EventSystems.EventSystem:Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:385)

  • And just to clarify, the save of the graphic options shouls be automatic right? Not just being implemented through saving manually?
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.