How do we import 2d sounds at runtime? I’m using WWW and have something working fine where it imports a file from the local hd, but the sounds come in as 3D by default and I need to toggle them to 2D.
Use case:
Custom folder in the program directory that users can fill with their own music to play ingame. Music needs to be a 2d sound.
The code is basically like this:
....
public string url;
private string urlPrefix = "file://"+Application.dataPath+"/";
public void GetWww();
{
wwwObject = new WWW(urlPrefix+url.Value);
storeAudio.Value = wwwObject.audioClip;
//now magically set the clip to 2d
}
...