Audio Source in WebGL Asset bundle
Hi, I'm having problems with testing WebGL build asset bundle objects which have audio.
Is there any known issue(s) / special tips for including objects with audio sources in an asset bundle for the WebGL build?
Unity Version: 2019.2.8f1 Personal
So far, here is a minimal example:
1 - created an empty object with just 1 audio source component and nothing else, with audio clip in the source
2 - built this into 1 asset bundle for WebGL target platform
3 - For testing, in my script loaded this asset bundle from a Windows local folder into the scene, and instantiated this object from the bundle
4 - Then played game in editor, object appears (ie has been instantiated from folder), and can see audio clip file is in the object in Inspector -
but script AudioSource.Play() command fails to play the audio clip in the audio source
5 - pressed play button to stop the game playing in editor
6 - Editor freezes completely, Unity crashes, no possibility to see if error message.
Above behaviour happens consistently for me in Unity if doing these exact steps.
But, if I repeat above steps with BuildTarget.StandaloneWindows instead of WebGL, but everything else same as above, this works, the sound plays, game works, and Unity does not crash, no problems.
So how can I test WebGL build target assetbundle instantiated objects properly in the Unity editor?
Do I have to test it from a URL type address for it to work properly?
Or is there something else I'm doing wrong here?