there’s no way there is no built in way to play an audio file until it ends using a single command, but nothing in the scripting reference database has turned up
i’m trying to make it so that one sound will play when an observer value is between 25 and 75, but another, different sound will play if the value drops below 25. Not overlapped sound mind you, the first one will play until it ends its loop, then the next will play.
how do i do this without using some crazy audio.length - audio.time crap?
No. That’s what Play() does, already. What you’re talking about is having a clip play immediately after the end of another. That is not a common requirement, as Unity is designed to facilitate making 3D interactive content, not jukeboxes.
I’m not saying that what you’re doing should not be possible. I’ve actually made a jukebox in Unity before. And switching between various looping clips can be a great way to get variation into a sustained sound. However, unless Unity ever incorporates using an array of audio clips for AudioSource.clip, this just won’t be useful to many people.