Unity3D AR应用程序WebGL构建报告错误

时间:2017-06-21 21:31:45

标签: javascript unity3d augmented-reality unity-webgl

我是业余AR开发人员,在业余时间从事一个项目。该项目的理想构建是WebGL应用程序。但是,我在Unity中创建的WebGL构建不会运行。我尝试在Chrome和Firefox上以及免费的虚拟主机网站上运行index.html。当我尝试运行该文件时,收到此错误:

An error occured running the Unity content on this page. See your browser JavaScript console for more info. The error was:
uncaught exception: abort("To use dlopen, you need to use Emscripten's linking support, see https://github.com/kripken/emscripten/wiki/Linking") at jsStackTrace (signTest1WGL.asm.framework.unityweb:2:27465)
stackTrace (signTest1WGL.asm.framework.unityweb:2:27636)
abort (signTest1WGL.asm.framework.unityweb:4:30633)
_dlopen (signTest1WGL.asm.framework.unityweb:2:184717)
c0k (blob:20:1)
g9k (blob:20:1)
mSk (blob:20:1)
SMg (blob:7:1)
CSg (blob:7:1)
BSg (blob:7:1)
_Nj (blob:4:1)
s0g (blob:7:1)
A3f (blob:6:1)
$7f (blob:6:1)
l5i (blob:4:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
WAk (blob:15:1)
cBk (blob:15:1)
bBk (blob:15:1)
HTk (blob:20:1)
vql (blob:28:1)
invoke_iiiii (signTest1WGL.asm.framework.unityweb:2:336227)
yGh (blob:10:1)
GEh (blob:10:1)
JQe (blob:8:1)
TKf (blob:5:1)
IQe (blob:8:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
Xeg (blob:6:1)
Weg (blob:6:1)
a5f (blob:6:1)
Jdk (blob:15:1)
l5i (blob:4:1)
csl (blob:28:1)
invoke_iiii (signTest1WGL.asm.framework.unityweb:2:353269)
WAk (blob:15:1)
KEk (blob:15:1)
WM (blob:9:1)
p9 (blob:16:1)
frb (blob:11:1)
_qb (blob:11:1)
r$a (blob:13:1)
Iqb (blob:11:1)
JQ (blob:9:1)
xda (blob:16:1)
_9 (blob:16:1)
aaa (blob:16:1)
V9 (blob:16:1)
A8 (blob:16:1)
z8 (blob:16:1)
x8 (blob:16:1)
u8 (blob:16:1)
iZ (blob:16:1)
WY (blob:16:1)
callMain (signTest1WGL.asm.framework.unityweb:4:28998)
doRun (signTest1WGL.asm.framework.unityweb:4:29701)
run (signTest1WGL.asm.framework.unityweb:4:29887)
runCaller (signTest1WGL.asm.framework.unityweb:4:28515)
removeRunDependency (signTest1WGL.asm.framework.unityweb:2:34431)
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/</unityFileSystemInit</<@blob:https://signtest1.000webhostapp.com/5a52587b-4b95-e748-aec6-c32e11164deb:2:357
doCallback (signTest1WGL.asm.framework.unityweb:2:143411)
done (signTest1WGL.asm.framework.unityweb:2:143549)
done (signTest1WGL.asm.framework.unityweb:2:126612)
storeLocalEntry (signTest1WGL.asm.framework.unityweb:2:125072)
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/reconcile/</<@blob:https://signtest1.000webhostapp.com/5a52587b-4b95-e748-aec6-c32e11164deb:2:126838
UnityLoader["73d8c219198d5cb59ea52845978d71e1"]/loadRemoteEntry [loadRemoteEntry/req.onsuccess] (signTest1WGL.asm.framework.unityweb:2:125422)

If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.

令人困惑的是,这个项目在我的笔记本电脑摄像头(Mac)和我的iPhone上都按预期运行。只有在我选择使用WebGL问题构建时才遇到这些问题。

我对WebGL很新,我对解决这个错误知之甚少。我如何解决此错误并使用WebGL正确运行Unity项目?

此网站也在https://signtest1.000webhostapp.com/托管 您可以查看错误并在那里查看控制台。

1 个答案:

答案 0 :(得分:1)

我发现构建这个Unity项目的问题是我在Unity中使用了Vuforia AR软件包。 Vuforia仅支持本机移动开发,并且与WebGL完全兼容。

我确实遇到过这个问题的潜在解决方法,其形式为argon.js,这是一个用于在Web应用程序中添加增强现实的JavaScript框架。理论上,该框架允许Vuforia项目在所有Web浏览器中运行。 argon.js的文档可以在这里找到:

https://www.argonjs.io/

很好地理解JavaScript很有帮助。