Unity www在iOS中加载本地音频错误

时间:2016-11-23 07:28:49

标签: unity3d unityscript unity5

错误:无法为资源\ 270,\ 216创建FMOD :: Sound实例(由于指定的声音/ DSP连接尚未就绪,因此无法执行操作。)

iOS本地音频路径:var / mobile / Containers / Data / Application / A8A2C6B9-90CB-4400-A3E3-5B531CE92D45 / Library / Caches / GHmsc / b18156b9-2085-4117-9c42-625ec415b691.mp3

IEnumerator LoadAudio()
{
    www = new WWW("file://" + "var/mobile/Containers/Data/Application/A8A2C6B9-90CB-4400-A3E3-5B531CE92D45/Library/Caches/GHmsc/b18156b9-2085-4117-9c42-625ec415b691.mp3");
    yield return www;
    if (www.error == null)
    {
        AudioClip audio = GetComponent<AudioClip>();
        audio = www.audioClip;

    }

}

使用的版本是5.3.5

1 个答案:

答案 0 :(得分:0)

我认为这可能是一个错误。你可以在这里阅读更多相关信息:

https://issuetracker.unity3d.com/issues/ios-audio-with-streaming-load-type-does-not-play-on-some-devices-running-ios-10