Forum rules - please read before posting.

While browsing menu, I can hear the audio for a fraction of a second

To be more specific, here's what happens.
For example, music might be going on, or a a speech might be playing.
I then press the Esc button, the pause menu opens, and the sound stops.
However, when I click, for example, on Options, I can hear, for a fraction of a second, the speech (or the music) which goes forward. The same happens when I press Back, etc.

Basically, in the time that it's "loading" the other menu, it keeps playing.
My guess, it's as if, despite the fact that the gameplay should be paused, when it is moving from one menu to the other, it resumes for a tiny second. Any way to prevent this?
To note, I have tried both enabling and disabling the fade effect everywhere.

Comments

  • And this is in v1.46?

    Try this: set the Options button's Click type to Run Action List, and then use two Menu: Change state Actions to crossfade the two menus.  You can then edit the ActionLists' properties (in it's Inspector) to uncheck Unfreeze 'pause' menus?  This should prevent the game from being unpaused for a split-second, and therefore keep the audio muted.
  • Yes, it's 1.46.
    I lost myself in the Actionlist, sorry: what do you mean "to crossfade the two menus"?
    The only option that I see there is "Turn on menu", but if I put the Options menu, it will open the options menu over the old menu...
    Also, I'm not sure how to get back then, I assume that I have to do the opposite on the "Back" button of the options menu?

    I'm really sorry.

    The problem also happens when I open the Save and Load menu though, so I guess I have to do the same there too...
  • No problem.  Let's not worry about Save and Load for now - and just see if this works for Options before moving on.

    If you open up the Menu Manager, select the "Pause" Menu, and the "OptionsButton" element within it, you can edit the menu button that takes you from the Pause to the Options menu.  It's default Click type is set to Crossfade, and set to switch to Options.  What you want to do is change the Click type to Run ActionList, and then assign a new ActionList that uses two Menu: Change state Actions: one to turn off Pause, and another to turn on Options.  So long as you check "Wait until finished?" in the first Action, then the Options menu will not appear before Pause has disappeared.  Again, don't forget to uncheck Unfreeze 'pause' menus? in it's properties.
  • edited June 2015
    Gotcha. I tried, unfortunately it does not seem to work, the problem is still there :(.
    I have also tried to take out the "wait until finished" in the second action but it makes no difference in this case.

    Here's a screen of the Actionlist, just to be sure I got it right:
    image
    btw, I'm using a sound prefab set to Music with AC's Radio Martini track who plays on Awake to test.
  • I'll have to look further into this - let me come back to you.
  • OK - seems this may be very simple to fix.  I think it's because of the Pause menu's ActionList when turn on asset, DeselectInventory, which is causing the game to momentarily un-pause the game while it runs.

    Select the asset (it's in /AdventureCreator/Demo/InvActionLists, and uncheck Unfreeze 'pause' menus? in it's Inspector.  It should be that you can go back to crossfading between your menus normally, so I apologise for the hassle with the previous answer.
  • edited June 2015
    Hey Chris, I just tried that too but... no luck either :(
    Just to be clear, I am not using the asset you spoke about because I had already replaced the action that happens when the Menu is turned on with another one. However, mine is only slightly different:
    - Deselect Inventory
    - Turn Off Inventory (in case it's open)
    - Lock Menu (Inventory)

    I went and de-checked Unfreeze pause menus anyway but... no change. Unfortunately.

    I even thought that maybe something is wrong with my audio setup. I can post a detailed description if needed. However, I just tried to literally copy paste just my char, the music and the terrain into a new scene and the problem still occurs.
    It happens only during the menus...

    edit: just made a quick try, I took off completely my ActionList that runs when the menu is opened, and the problem still occurs. However, I didn't have the time to test this in a build but only in the editor so take this with a little grain of salt.
  • edited June 2015
    Load up the 3D demo game (set the 3D demo managers first), and see if the problem persists.  That's what I'm using to test against, so it's important that we're both going by the same thing when solving this.  You can test is easily while the intro plays - the music that plays during the opening is not set to play when the game is paused.
  • edited June 2015
    Right, sorry.
    So, first I tried it "vanilla version", and the error happens even there.
    Then, I tried to make your previous adjustement, and you're right, it seems to be gone.

    This had me thinking, and I think I nailed what's the problem.
    The problem was the "Temp Resolution" actionlist that's set to run when the options menu opens. I had forgotten about it, and that's why the problem was happening even when I had removed the actionlist that opens when the menu itself opens.
    When I removed it, the error is gone. So I just put it back, unchecked "unfreeze pause menus" and voila. Problem solved.

    However, I'm confused as to why this was happening in the Save and Load menus, too.
    Grrrr Unity....

    edit: okay, *sigh* actually, I still heard the audio for a fraction of a second again when I clicked on "quit" (lol?) but honestly I don't really care anymore about that.
  • If you check "List active ActionLists in Game window" at the bottom of the Settings Manager, then you can see the current "game state" in the top left corner.  It should remain Paused throughout when you navigate the pause menus (this is what the "Unfreeze" button does - if checked, the game will go into Cutscene mode for a split-second while the ActionList runs).  This may help you figure out that last bit.
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.