Unity // WebGL构建和streamingAssetsPath

时间:2015-11-06 16:44:20

标签: unity3d unity-webgl

我有一个引用.json文件的Unity版本。在构建之后,此文件将保留在Streaming Assets文件夹中。当我使用下面的代码行在我的脚本中调用文件时(使用LitJson),构建在桌面上运行良好:

jsonString = File.ReadAllText(Application.streamingAssetsPath + "/quatData.json");

但是,使用WebGL构建时,我在控制台中收到的错误是:

IsolatedStorageException: Could not find a part of the path "/http:/localhost:3333/StreamingAssets/quatData.json".

控制台中的路径几乎是quatData.json的正确位置,但我相信http前面的斜杠会导致链接失败。任何想法为什么这不起作用或为什么在构建后有斜杠?

0 个答案:

没有答案
相关问题