Forum rules - please read before posting.

Unity button hover sound

Hi Chris,

I have some menus using AC menus, but some menus using unity (scene). In my scene, in canvas, I add a button. And already link canvas and unity button to AC menu. I also add hover sound to the button. In test, when cursor over the button, the sound played. It is good. But when the cursor leaves the button, the sound played again. Is it normal? Or I made something wrong. As hover sound only played when cursor over AC button, no sound will be played when cursor leave the AC button. It is different. Pls help, thanks.

Comments

  • What are your AC/Unity versions?

    Make sure that the problematic Button has a unique hover sound assigned. Is that same sound played when leaving the button, or is it playing a different sound assigned elsewhere?

  • Hi Chris,

    I am using unity 2022.3.9f1 and AC 1.78.4
    I start a new project to test, it is the same result. The hover sound is the same sound assigned in AC menu. If I remove the sound assigned in AC menu, there is no sound played if cursor over or leave the button.

  • Recreated, thanks for the details.

    If you open up AC's PlayerMenus script, look for the following around line 2189:

    if (mouseOverMenu != null && (lastElementIdentifier != elementIdentifier || lastMenuIdentifier != menuIdentifier))
    

    Replace it with:

    if (mouseOverMenu != null && (lastElementIdentifier != elementIdentifier || lastMenuIdentifier != menuIdentifier) && elementIdentifier != -1)
    

    Does that fix it?

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.