Forum rules - please read before posting.

Button Visibility after loading issue

Hello
Sorry for my English.
I have a problem with the visibility of the menu button (Unity UI in scene) after loading a saved game.
I have a scene that is saved at the beginning. In this scene there is a hotspot that opens a window. When the window opens, the button becomes visible. After clicking, the button closes the window and hides.

If I press the load button when the window is open (the button is visible), everything is fine.

But if the window is closed (the button is hidden) and I click on the load button - after loading and opening the window, the button still remains hidden and I cannot force the button to be visible.

I noticed that this problem disappears if I change the "when invisible" setting to "disable intractability". Now "disable object" is selected there.

To be honest, I'm a little confused and don't understand why this happens if the visibility state of menu elements is recorded along with variables when saving the game.
AC v1.75.3

Thx alot

Comments

  • edited January 2023

    In a backup/duplicate project, does this issue occur with the latest AC release as well?

    Have a look at the UI's Hierarchy at the time the issue occurs - what parent objects does it have, and are they disabled when the Menu should display?

    Share screenshots of the UI's hierarchy and the Menu's properties in the Menu Manager, and I'll help to try to spot what's wrong.

  • I believe I've recreated this - if it's the same issue, you can disregard the above.

    Try checking Always reload scene when loading a save file? in the Settings Manager's "Scene loading" panel - does that fix it?

  • Try checking Always reload scene when loading a save file? in the Settings Manager's "Scene loading" panel - does that fix it?

    Thank you very much again, Chris. It really works.
    I would really appreciate it if you could explain why this problem occurs.

  • edited January 2023

    If a Button is set to have its GameObject disabled when hidden, then AC will not be able to "find" it again when attempting to re-link it when loading a save-file.

    Reloading the scene resets the GameObject's enabled-state, making it visible to AC once again.

    To be clear: this is a bug - and I will introduce a fix to remedy this, without a need to check the option, as part of the next update.

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.