2

I have built my game for WebGL platform and tried to run it on MAMP localhost. I am getting the following alert message in Google Chrome (Version 44.0.2403.125 (64-bit)) and in Safari (Version 8.0.3 (10600.3.18)).

Error Message

An error occurred running the Unity content on this page. See your browser's JavaScript console for more info. The error was:

Uncaught abort() at Error
    at jsStackTrace (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:1000:13)
    at stackTrace (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:1017:22)
    at abort (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:5234547:25)
    at _pthread_create (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:10991:59)
    at __ZN6il2cpp2os10ThreadImpl3RunEPFvPvES2_ [il2cpp::os::ThreadImpl::Run(undefined?F?*, void, void*)] (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:80702:9)
    at __ZN6il2cpp2os6Thread3RunEPFvPvES2_ [il2cpp::os::Thread::Run(undefined?F?*, void, void*)] (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:73176:8)
    at Array.__ZN6il2cpp6icalls8mscorlib6System9Threading6Thread15Thread_internalEP12Il2CppThreadP14Il2CppDelegate [il2cpp::icalls::mscorlib::System::Threading::Thread::Thread_internal(Il2CppDelegate?**)] (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:60773:3)
    at _Thread_Thread_internal_m22186 (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:4700724:38)
    at _Thread_Start_m7769 (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:4701257:9)
    at _Scheduler__ctor_m22217 (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:4701621:2)

Any idea! how to resolve this issue?

4

1 回答 1

2

The key line in the error message is this one:

at _pthread_create (http://localhost:8888/Development/WebGL_Unity_V.5.0.2.js:10991:59)

Threads are not supported on WebGL (yet). At some point in the future, browsers may support threads for WebGL. For the time being though, you'll need to use code paths in WebGL that do not require threads.

于 2015-08-10T11:27:24.597 回答