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.

AudioSource.IsPlaying() would be nice

Discussion in 'Wish List' started by tolm, Jul 25, 2009.

  1. tolm

    tolm

    Joined:
    Feb 4, 2008
    Posts:
    61
    Animation has Animation.IsPlaying(string name) to check if a specific animation is playing. It would be nice to have something similar for checking if a specific audio clip is playing, e.g. AudioSource.IsPlaying(AudioClip clip).

    (And I know that there are ways of keeping track of it myself. I'm just pointing out that it would be convenient if it was built in.)
     
  2. antenna-tree

    antenna-tree

    Joined:
    Oct 30, 2005
    Posts:
    5,324
  3. tolm

    tolm

    Joined:
    Feb 4, 2008
    Posts:
    61
    And what if you want to check if a clip started with PlayOneShot() is playing?