Rufus31415 / Simple-WebXR-Unity

⭐ Bringing WebXR to Unity 3D ! B-)
https://rufus31415.github.io/webxr/MRTK-HandInteraction/
MIT License
573 stars 82 forks source link

URP Support (Android) #48

Closed handzlikchris closed 2 years ago

handzlikchris commented 2 years ago

Hi,

Thanks for putting the tool together.

I'm wondering if it supports URP?.

I managed to succesfully run it using surface shader (3D project) but for URP I'm getting errors.

Tried 2 times once with clean URP project and second with upgrade of existing working surface-shader project to URP - same errors.

Thanks, Chris

PS: error if that helps at all

exception thrown: RangeError: Maximum call stack size exceeded,RangeError: Maximum call stack size exceeded
    at stackSave (https://192.168.1.114/Build/0.1.wasm:wasm-function[798]:0x6d82e)
    at https://192.168.1.114/Build/0.1.framework.js:27278:36
    at invoke_ii (https://192.168.1.114/Build/0.1.framework.js:17358:11)
    at __ZL34GetTypeInfoFromTypeDefinitionIndexi (https://192.168.1.114/Build/0.1.wasm:wasm-function[37763]:0xdcfdf6)
    at __ZN6il2cpp2vm14GlobalMetadata21GetTypeInfoFromHandleEPK27___Il2CppMetadataTypeHandle (https://192.168.1.114/Build/0.1.wasm:wasm-function[37824]:0xdd184b)
    at __ZN6il2cpp2vm14GlobalMetadata19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37823]:0xdd183e)
    at __ZN6il2cpp2vm13MetadataCache19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37820]:0xdd17fc)
    at __ZN6il2cpp2vm4Type8GetClassEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37724]:0xdcebaf)
    at __ZN6il2cpp2vm5Class14FromIl2CppTypeEPK10Il2CppTypeb (https://192.168.1.114/Build/0.1.wasm:wasm-function[37706]:0xdce56f)
    at __ZL18FromTypeDefinitioni (https://192.168.1.114/Build/0.1.wasm:wasm-function[37764]:0xdd0126)
    at _GC_call_with_alloc_lock (https://192.168.1.114/Build/0.1.wasm:wasm-function[39292]:0xe0133e)
    at Object.dynCall_ii (https://192.168.1.114/Build/0.1.framework.js:27543:37)
    at invoke_ii (https://192.168.1.114/Build/0.1.framework.js:17360:30)
    at __ZL34GetTypeInfoFromTypeDefinitionIndexi (https://192.168.1.114/Build/0.1.wasm:wasm-function[37763]:0xdcfdf6)
    at __ZN6il2cpp2vm14GlobalMetadata21GetTypeInfoFromHandleEPK27___Il2CppMetadataTypeHandle (https://192.168.1.114/Build/0.1.wasm:wasm-function[37824]:0xdd184b)
    at __ZN6il2cpp2vm14GlobalMetadata19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37823]:0xdd183e)
    at __ZN6il2cpp2vm13MetadataCache19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37820]:0xdd17fc)
    at __ZN6il2cpp2vm4Type8GetClassEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37724]:0xdcebaf)
    at __ZN6il2cpp2vm5Class14FromIl2CppTypeEPK10Il2CppTypeb (https://192.168.1.114/Build/0.1.wasm:wasm-function[37706]:0xdce56f)
    at __ZL18FromTypeDefinitioni (https://192.168.1.114/Build/0.1.wasm:wasm-function[37764]:0xdd0126)
    at _GC_call_with_alloc_lock (https://192.168.1.114/Build/0.1.wasm:wasm-function[39292]:0xe0133e)
    at Object.dynCall_ii (https://192.168.1.114/Build/0.1.framework.js:27543:37)
    at invoke_ii (https://192.168.1.114/Build/0.1.framework.js:17360:30)
    at __ZL34GetTypeInfoFromTypeDefinitionIndexi (https://192.168.1.114/Build/0.1.wasm:wasm-function[37763]:0xdcfdf6)
    at __ZN6il2cpp2vm14GlobalMetadata21GetTypeInfoFromHandleEPK27___Il2CppMetadataTypeHandle (https://192.168.1.114/Build/0.1.wasm:wasm-function[37824]:0xdd184b)
    at __ZN6il2cpp2vm14GlobalMetadata19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37823]:0xdd183e)
    at __ZN6il2cpp2vm13MetadataCache19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37820]:0xdd17fc)
    at __ZN6il2cpp2vm4Type8GetClassEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37724]:0xdcebaf)
    at __ZN6il2cpp2vm5Class14FromIl2CppTypeEPK10Il2CppTypeb (https://192.168.1.114/Build/0.1.wasm:wasm-function[37706]:0xdce56f)
    at __ZL18FromTypeDefinitioni (https://192.168.1.114/Build/0.1.wasm:wasm-function[37764]:0xdd0126)
    at _GC_call_with_alloc_lock (https://192.168.1.114/Build/0.1.wasm:wasm-function[39292]:0xe0133e)
    at Object.dynCall_ii (https://192.168.1.114/Build/0.1.framework.js:27543:37)
    at invoke_ii (https://192.168.1.114/Build/0.1.framework.js:17360:30)
    at __ZL34GetTypeInfoFromTypeDefinitionIndexi (https://192.168.1.114/Build/0.1.wasm:wasm-function[37763]:0xdcfdf6)
    at __ZN6il2cpp2vm14GlobalMetadata21GetTypeInfoFromHandleEPK27___Il2CppMetadataTypeHandle (https://192.168.1.114/Build/0.1.wasm:wasm-function[37824]:0xdd184b)
    at __ZN6il2cpp2vm14GlobalMetadata19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37823]:0xdd183e)
    at __ZN6il2cpp2vm13MetadataCache19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37820]:0xdd17fc)
    at __ZN6il2cpp2vm4Type8GetClassEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37724]:0xdcebaf)
    at __ZN6il2cpp2vm5Class14FromIl2CppTypeEPK10Il2CppTypeb (https://192.168.1.114/Build/0.1.wasm:wasm-function[37706]:0xdce56f)
    at __ZL18FromTypeDefinitioni (https://192.168.1.114/Build/0.1.wasm:wasm-function[37764]:0xdd0126)
    at _GC_call_with_alloc_lock (https://192.168.1.114/Build/0.1.wasm:wasm-function[39292]:0xe0133e)
    at Object.dynCall_ii (https://192.168.1.114/Build/0.1.framework.js:27543:37)
    at invoke_ii (https://192.168.1.114/Build/0.1.framework.js:17360:30)
    at __ZL34GetTypeInfoFromTypeDefinitionIndexi (https://192.168.1.114/Build/0.1.wasm:wasm-function[37763]:0xdcfdf6)
    at __ZN6il2cpp2vm14GlobalMetadata21GetTypeInfoFromHandleEPK27___Il2CppMetadataTypeHandle (https://192.168.1.114/Build/0.1.wasm:wasm-function[37824]:0xdd184b)
    at __ZN6il2cpp2vm14GlobalMetadata19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37823]:0xdd183e)
    at __ZN6il2cpp2vm13MetadataCache19GetTypeInfoFromTypeEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37820]:0xdd17fc)
    at __ZN6il2cpp2vm4Type8GetClassEPK10Il2CppType (https://192.168.1.114/Build/0.1.wasm:wasm-function[37724]:0xdcebaf)
    at __ZN6il2cpp2vm5Class14FromIl2CppTypeEPK10Il2CppTypeb (https://192.168.1.114/Build/0.1.wasm:wasm-function[37706]:0xdce56f)
    at __ZL18FromTypeDefinitioni (https://192.168.1.114/Build/0.1.wasm:wasm-function[37764]:0xdd0126)
printErr @ 0.1.loader.js:69
callMain @ 0.1.framework.js:29112
doRun @ 0.1.framework.js:29135
run @ 0.1.framework.js:29147
runCaller @ 0.1.framework.js:29083
removeRunDependency @ 0.1.framework.js:1163
(anonymous) @ 0.1.loader.js:697
Promise.then (async)
(anonymous) @ 0.1.loader.js:680
callRuntimeCallbacks @ 0.1.framework.js:1000
preRun @ 0.1.framework.js:1029
run @ 0.1.framework.js:29125
runCaller @ 0.1.framework.js:29083
removeRunDependency @ 0.1.framework.js:1163
receiveInstance @ 0.1.framework.js:1261
receiveInstantiatedSource @ 0.1.framework.js:1276
Promise.then (async)
doNativeWasm @ 0.1.framework.js:1289
(anonymous) @ 0.1.framework.js:1359
unityFramework @ 0.1.framework.js:21076
(anonymous) @ 0.1.loader.js:674
Promise.then (async)
loadBuild @ 0.1.loader.js:673
(anonymous) @ 0.1.loader.js:717
createUnityInstance @ 0.1.loader.js:702
script.onload @ (index):93
load (async)
(anonymous) @ (index):92
Rufus31415 commented 2 years ago

This seems to be a callstack size issue. This error is known on the internet. One of the solutions is to change the API compatibility level in WebGL player settings

handzlikchris commented 2 years ago

Thanks - shouldn't have assumed it something with this tool - works now