Forum rules - please read before posting.

Menu sounds won't play

I have specified my scene's default sound to point to a prefab looking like this:
https://1drv.ms/u/s!Amz_vh8OYDX3utNGJxk6an44GWNwLQ

But when I hook up a hover/click sound to any button in my menu - no sound is being played.

If I play the same sound using the "Sound:Play one-shot" action I can hear the sound (though it's not registering visually when I look at my Audio Mixer).

Footsteps sound works fine though (and is registering under the SFX group in the Audio Mixer).

Any ideas?

Comments

  • Is the default Sound object actually in the scene? Don't link it to a prefab file in the Assets folder.

    What's the volume set to in the AudioSource at runtime? Do any error messages play?

  • Thanks man, having it in the scene made it work!

    I misunderstood the following warning message to mean that pointing to a prefab (in my own project) would work in every scene: "Cannot play sound since no Default Sound Prefab is defined - please set one in the Scene Manager."

    Since I want the menu sounds to be the same in all my scenes - do I need to make sure that every scene has its DefaultSound set to an instance of the same prefab (added manually into each scene's hierarchy), or is there a more global way of doing it?

  • edited January 2019

    Since I want the menu sounds to be the same in all my scenes - do I need to make sure that every scene has its DefaultSound set to an instance of the same prefab

    Yes, but clicking "Create" beside the field in the Scene Manager will automatically assign it for you. I'll tweak the warning text to make it more clear.

  • Got it, thanks!
  • I run into the same problem. But adding the Default Sound didn't solve my problem.

    I have several custom UI using Unity UI Prefab (e.g. the Conversation menu). I linked the sfx to Hover Sound, but it doesn't play. It works in the default Conversation Menu that uses the Adventure Creator source.

    I don't receive any warnings or errors.

    Any idea what I may have missed?

  • What if you switch the default Conversation Menu's Source to Unity Ui Prefab?

    How are you navigating the menu - directly, or with the mouse - and what's your AC version?

  • I also have an issue with menu button hover sounds not playing on non-paused Unity UI menus. I have an animated start scene which runs a Start Game Unity UI menu. No hover sounds are heard even if a Default Sound has been added to the Scene settings.

    If the menu is set to "Pause game when enabled", hover sounds play as intended. Is there a workaround to get button hover sounds playing on non-paused menus?

    (I'm on Windows 10, unity 2019.4, AC 1.71.7)

  • I will need steps to recreate the issue - see my questions above.

    I cannot recreate such an issue with the 3D Demo's Pause menu, if I assign a hover sound, prevent is from pausing, and switch to Unity UI. Is this the same for you?

  • Hmm, I just tried the 3D demo and like you it works there. Must be an issue with my scene or setup somehow. I have both music and ambiance running in the background.

    I've worked around it by creating a custom script and adding an event trigger to play a sound on Pointer Enter/Select, and that works. I'll look into it some more and see if I can find what causes it.

  • Try using the Demo's Menu Manager in your own scene, and your own Menu Manager in the Demo scene - that should help pinpoint if the issue lies with your Menu, or the scene.

  • Sorry for the late response. I am using Unity2019.4.6f1 & AC1.71.8. I am using directly navigating menu with keyboard. All my menus don't pause the game when activated (except the Pause manu), and I use the Engine: Manage systems Action to enable direct navigation.

    I've used the Conversation UI to test, which has no "Pausing game when enabled" option as it appears during conversation. The testing results are:

    A. In my own scene:
    1. AC default menu + AC UI : Has sound
    2. AC default menu + Unity Prefab : No sound

    B. Basement demo scene:
    1. AC default menu + AC UI : Has sound
    2. AC default menu + Unity Prefab : No sound

  • Using my manager in the demo scene gives no luck as well. What else may I try?

  • edited August 2020

    The AC Demo relies on mouse-navigation and pausing to use the Pause menu, so I'm presuming you made changes to the Demo's managers for your Demo scene test.

    You'd also need to enable direct-navigation of gameplay menus if you've prevented the Demo's Pause menu from pausing the game.

    Can you share exactly what changes you made for your "B2" test, using the Demo game Managers? That way, I should be able to accurately recreate the problem.

  • I didn't make changes to the scene, but I am using my set of Managers. Would sending you my managers be enough?

  • Hmm, since I have made so many custom changes to my project, I think I will use a custom way in my case.

  • Don't worry - I've recreated the issue. I shall have this addressed in the next update.

  • Thanks in advance!

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.