“如果浏览器版本号是 86 版本之后的,需要修改以下内容:找到并打开引擎目录\Editor\ Data\PlaybackEngines\WebGLSupport\BuildTools\Emscripten\src 下的 library_pthread.js 文件。 之后将 Atomics.wake 改为 Atomics.notify” 按教程替换,浏览器报错
浏览器版本Version 111.0.5563.147 (Official Build) (64-bit)
UnityLoader.js:1178 exception thrown: TypeError: Atomics.wake is not a function,TypeError: Atomics.wake is not a function
at _emscripten_futex_wake (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:14226:20)
at ___pthread_mutex_unlock (wasm://wasm/0a7d4712:wasm-function[93152]:0x2237079)
at _malloc (wasm://wasm/0a7d4712:wasm-function[92672]:0x221f4bb)
at __ZN17LowLevelAllocator6MallocEm (wasm://wasm/0a7d4712:wasm-function[8743]:0x3331dc)
at __ZN21UnityDefaultAllocatorI17LowLevelAllocatorE8AllocateEmi (wasm://wasm/0a7d4712:wasm-function[8729]:0x332412)
at __ZN13MemoryManager8AllocateEmmRK10MemLabelId15AllocateOptionsPKci (wasm://wasm/0a7d4712:wasm-function[7336]:0x2bce6b)
at __Z15malloc_internalmmRK10MemLabelId15AllocateOptionsPKci (wasm://wasm/0a7d4712:wasm-function[7334]:0x2bc7de)
at __ZN9profiling19DispatchBuffersPool18PreallocateBuffersEv (wasm://wasm/0a7d4712:wasm-function[8658]:0x32e46c)
at __ZN9profiling10Dispatcher6EnableEj (wasm://wasm/0a7d4712:wasm-function[8657]:0x32e3a5)
at __ZN9profiling8Profiler10SetEnabledEb (wasm://wasm/0a7d4712:wasm-function[8656]:0x32e336)
at __ZN9profiling8Profiler16SetProfilingModeE13ProfilerModes (wasm://wasm/0a7d4712:wasm-function[8652]:0x32e2b2)
at __Z20profiler_set_enabledb (wasm://wasm/0a7d4712:wasm-function[8651]:0x32e291)
at __ZN9profiling8Profiler10InitializeEbm (wasm://wasm/0a7d4712:wasm-function[8645]:0x32d9dc)
at __Z19profiler_initializev (wasm://wasm/0a7d4712:wasm-function[8634]:0x32d09d)
at _InjectProfilerSample (wasm://wasm/0a7d4712:wasm-function[15911]:0x5c7510)
at blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:34693:48
at Object.ccall (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:449:17)
at _JS_Profiler_InjectJobs (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:5775:52)
at __Z15InitWebGLPlayeriPPc (wasm://wasm/0a7d4712:wasm-function[15913]:0x5c7665)
at _main (wasm://wasm/0a7d4712:wasm-function[15912]:0x5c7553)
at Object._main (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:40478:32)
at Object.callMain (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43363:28)
at doRun (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43399:58)
at run (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43411:3)
at runCaller (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43347:28)
at removeRunDependency (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:1038:4)
at blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:1049:4
at Worker.<anonymous> (blob:http://localhost:13553/d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:6841:8)
printErr @ UnityLoader.js:1178
callMain @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43376
doRun @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43399
run @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43411
runCaller @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:43347
removeRunDependency @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:1038
(anonymous) @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:1049
(anonymous) @ d155f4ec-b668-40bb-9f35-2d5e9ba0b4fc:6841
UnityLoader.js:417 Invoking error handler due to
Uncaught TypeError: Atomics.wake is not a function