Timeline for AudioSource.isPlaying is not working in Unity WebGL Build
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 23, 2022 at 11:13 | comment | added | Bennett Keller | Audio has been really funky in webgl for a long time, there are some controls that haven't worked in various unity versions (time, pitch, to name a few). I personally have a lot of comments in my audio code that rules out doing operations on webgl. For what you're looking for, I'd use audio length, and check the duration since you called play like @Zibelas mentioned. That's pretty standard for webgl from what I've seen. | |
| Sep 22, 2022 at 12:01 | history | edited | DMGregory♦ | CC BY-SA 4.0 |
Cleanup
|
| Sep 22, 2022 at 11:57 | comment | added | DMGregory♦ | Please remember to read tag descriptions. Unity has not supported the deprecated language unityscript in the better part of a decade. The code you've written there is c#. It's still C#, even if you're writing it in a Unity game. | |
| Sep 22, 2022 at 11:54 | history | edited | DMGregory♦ |
edited tags
|
|
| Sep 22, 2022 at 11:09 | comment | added | Zibelas |
While maybe not the direct solution, since you know how long the clip is with clp.length, instead of using audioSource.isPlaying you could just use a timer in your while condition and continue once the timer is bigger than the clip time
|
|
| Sep 22, 2022 at 9:42 | history | asked | Manoj Balaji M | CC BY-SA 4.0 |