Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Anyone know how to play a hover sound on a button without using a event trigger?

Discussion in 'Audio & Video' started by dietrichdoh, Apr 24, 2023.

  1. dietrichdoh

    dietrichdoh

    Joined:
    Dec 4, 2019
    Posts:
    2
    Hey guys! Im trying to play simple hover sound on a toggle component whenever the "transition" is played and it highlights the button. All my google results said to use OnPointerEnter- but im using a controller for the game so this does not work. I tried making a reference to the toggle component, but dont see any flag for when this transition is taking place to play my highlighted sound. Functionally it works correctly. Please help!
     
  2. dietrichdoh

    dietrichdoh

    Joined:
    Dec 4, 2019
    Posts:
    2
    Ahhhh- sorta found a solution. You can make use of the "isSelected" event trigger instead of "onPointerEnter". Any other solutions are welcome!