Search Unity

Question Button don't play sound (small question)

Discussion in 'UGUI & TextMesh Pro' started by rizkyzhainuri, Jan 21, 2023.

  1. rizkyzhainuri

    rizkyzhainuri

    Joined:
    Dec 8, 2022
    Posts:
    4
    I added AudioSource and attached the sound file, unchecked Play on Awake and assigned OnClick function to the button. But the sound don't play when the button clicked/pressed. Am I doing it wrong? I am new to unity.

    here is my screenshot :
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,492
    This is the 2D forum. I'll move your post to the UI forum.
     
  3. rizkyzhainuri

    rizkyzhainuri

    Joined:
    Dec 8, 2022
    Posts:
    4
    ow I'm sorry I didn't know
     
  4. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,492
    Not a problem, lots of new devs here post in 2D about UI. It sort of makes sense but it's a different feature set and different team with a dedicated forum. :)