Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Extend Audio Clip on Button

Discussion in 'UI Toolkit' started by dacoursey, Sep 21, 2019.

  1. dacoursey

    dacoursey

    Joined:
    Dec 17, 2016
    Posts:
    40
    Hello all, I am not sure of the right terminology to use, but I have a button that plays a sound.

    Right now it plays until finished and stops, but I would like to convert it to keep playing as long as the button is down and stop when when not being pressed.

    Do I need to prep the audio clip in any way? How do I modify the playing to stay active?

    Thanks for looking!
     
  2. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
  3. dacoursey

    dacoursey

    Joined:
    Dec 17, 2016
    Posts:
    40
    Sorry, I tried there first and getting no traction so I was shotgunning.

    Thanks for the heads up!