Hello everyone.
I want to create a WebGL version of one of my Android games.
I am using Unity 2021.3.12f1 Apple Silicon.
The first and second scenes get loaded fine. But as soon as I click with the mouse cursor following error occurs in Chrome and Safari:
An error occurred running the Unity content on this page. See your browser JavaScript console for more info. The error was:
abort() at jsStackTrace@http://localhost:59016/Build/WebGL.framework.js:1267:23
stackTrace@http://localhost:59016/Build/WebGL.framework.js:1288:23
abort@http://localhost:59016/Build/WebGL.framework.js:38:54
___cxa_allocate_exception@http://localhost:59016/Build/WebGL.framework.js:2938:7
wasm-stub@[wasm code]
wasm-stub@[wasm code]
52229@[native code]
@http://localhost:59016/Build/WebGL.framework.js:1048:25
invoke_iiii@http://localhost:59016/Build/WebGL.framework.js:14116:22
wasm-stub@[wasm code]
Here is the error in the console:
exception thrown: RuntimeError: unreachable,RuntimeError: unreachable
at il2cpp::vm::Exception::Raise(Il2CppException*, MethodInfo*) (http://localhost:59016/Build/WebGL.wasm:wasm-function[1730]:0xa79f7)
at il2cpp_raise_exception (http://localhost:59016/Build/WebGL.wasm:wasm-function[35628]:0x6ab4bf)
at scripting_raise_exception(ScriptingExceptionPtr) (http://localhost:59016/Build/WebGL.wasm:wasm-function[51341]:0xe9e481)
at Input_CUSTOM_GetTouch_Injected(int, Touch&) (http://localhost:59016/Build/WebGL.wasm:wasm-function[50962]:0xe80be5)
at Input_GetTouch_Injected_m04E25DD035583531339AB310FBDD4F5A30817F87 (http://localhost:59016/Build/WebGL.wasm:wasm-function[7845]:0x22b2e3)
at Input_GetTouch_m75D99FE801A94279874FA8DC6B6ADAD35F5123B1 (http://localhost:59016/Build/WebGL.wasm:wasm-function[7844]:0x22b2a1)
at GameController2_Update_m2016C88A6DC3907F0A690187AC0541C086EA27AE (http://localhost:59016/Build/WebGL.wasm:wasm-function[30219]:0x60135d)
at RuntimeInvoker_TrueVoid_t4861ACF8F4594C3437BB48B6E56783494B843915(void ()(), MethodInfo const, void*, void**, void*) (http://localhost:59016/Build/WebGL.wasm:wasm-function[34392]:0x694ed2)
at il2cpp::vm::Runtime::InvokeWithThrow(MethodInfo const*, void*, void**) (http://localhost:59016/Build/WebGL.wasm:wasm-function[35591]:0x6aa14c)
at dynCall_iiii (http://localhost:59016/Build/WebGL.wasm:wasm-function[52229]:0xeeddc9)
at http://localhost:59016/Build/WebGL.framework.js:1048:20
at invoke_iiii (http://localhost:59016/Build/WebGL.framework.js:14116:10)
at il2cpp::vm::Runtime::Invoke(MethodInfo const*, void*, void**, Il2CppException**) (http://localhost:59016/Build/WebGL.wasm:wasm-function[35566]:0x6a9851)
at il2cpp_runtime_invoke (http://localhost:59016/Build/WebGL.wasm:wasm-function[35637]:0x6ab8e6)
at scripting_method_invoke(ScriptingMethodPtr, ScriptingObjectPtr, ScriptingArguments&, ScriptingExceptionPtr*, bool) (http://localhost:59016/Build/WebGL.wasm:wasm-function[51423]:0xea5192)
at ScriptingInvocation::Invoke(ScriptingExceptionPtr*, bool) (http://localhost:59016/Build/WebGL.wasm:wasm-function[50213]:0xe48145)
at MonoBehaviour::CallUpdateMethod(int) (http://localhost:59016/Build/WebGL.wasm:wasm-function[50159]:0xe444a9)
at MonoBehaviour::Update() (http://localhost:59016/Build/WebGL.wasm:wasm-function[50160]:0xe444be)
at void BaseBehaviourManager::CommonUpdate() (http://localhost:59016/Build/WebGL.wasm:wasm-function[38361]:0x739f3b)
at BehaviourManager::Update() (http://localhost:59016/Build/WebGL.wasm:wasm-function[38360]:0x739cbc)
at InitPlayerLoopCallbacks()::UpdateScriptRunBehaviourUpdateRegistrator::Forward() (http://localhost:59016/Build/WebGL.wasm:wasm-function[49922]:0xe200cb)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (http://localhost:59016/Build/WebGL.wasm:wasm-function[38190]:0x728cb2)
at ExecutePlayerLoop(NativePlayerLoopSystem*) (http://localhost:59016/Build/WebGL.wasm:wasm-function[38190]:0x728d4e)
at MainLoop() (http://localhost:59016/Build/WebGL.wasm:wasm-function[47974]:0xd04e82)
at dynCall_v (http://localhost:59016/Build/WebGL.wasm:wasm-function[52225]:0xeedd8e)
at http://localhost:59016/Build/WebGL.framework.js:1048:20
at browserIterationFunc (http://localhost:59016/Build/WebGL.framework.js:9380:13)
at callUserCallback (http://localhost:59016/Build/WebGL.framework.js:7570:3)
at Object.runIter (http://localhost:59016/Build/WebGL.framework.js:7631:4)
at Browser_mainLoop_runner (http://localhost:59016/Build/WebGL.framework.js:7545:20)