Forum rules - please read before posting.

Toggle Menu Item and Global Variable issue

I have 2 different menus that have a Toggle menu item, both set to ToggleType: Variable , Global Bool: "Fullscreen?".

When running I can set the toggle to OFF or ON (and the state changes on the label), but it doesn't update the other menu that uses the same Toggle menu item (linked to the same global variable). In other words, when I trigger the other menu, the Full Screen toggle State doesn't match. It's as if the state text isn't updating the value of the global variable on both menus.

Am I doing something wrong?





Comments

  • Are both Menus displaying at the same time?  If not, how are you accessing one from the other?

    AC and Unity versions?
  • Not at the same time. The Main Menu, which loads on the start of the game has the Toggle menu item (Full Screen Toggle). The Options Menu, which is turned on from the InGame menu has the other Toggle menu item (Full Screen Toggle). The label text is updating correctly when the button is toggled, but both menus aren't synchronized. If I toggle it Off/On while on the Main Menu, the Options menu doesn't display the correct Off/On value when it's opened.
  • Right, and how do you get to the Options menu?  I'm assuming that these are based off the default Menus, so that the Pause menu has a Button that crossfades to Options.

    Again, I'll need your AC and Unity versions as well.
  • The Options menu appears by an Actionlist that performs a Menu:Change State, Change type: Turn On Menu. Yes, they are based on the default Menus. Should I add some sort of update to the menu in the actionlist?
  • Unity: 2018.2.11
    AC: 1.65.2
  • Having trouble recreating this.  How about the variable itself?  If you bring up the realtime value of it in the Variables Manager, is it being correctly changed by both toggles?

    Is it linked to anything, e.g. Options Data?  If so, does it sync if you disable this link?
  • Thank you for helping me with this.

    After watching the variable update in realtime I found the problem. My Play button was causing a game reset, which in turn reset the Fullscreen variable. AC is working properly. Sorry it was my Actionlist that was causing the variable change back to it's initial value due to the game reset.

    Thank you again!
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.