I receive the following error when I implement the webgl export on my website:
UnityLoader.js:1 Invoking error handler due to
Uncaught TypeError: Cannot read property ‘length’ of undefined
UnityLoader.js:1 Uncaught TypeError: Cannot read property ‘length’ of undefined
at Object.md5 (UnityLoader.js:1)
at Object.loadCode (UnityLoader.js:1)
at processAsmCodeJob (UnityLoader.js:1)
at a.callback (UnityLoader.js:1)
Is it possible that the errors have something to do with my site being on https?
I just created a completely empty webgl project and received the same error as I got in the first post.
You can test it out yourself here: Empty10FastFingers.com
My site runs on AWS, might this be the reason I see these errors? At the moment I don’t have the files in an S3 bucket, I read somewhere that this might fix some webgl issues.
I’ve been trying to build a Polymer based web-component to load Unity WebGL content - and keep hitting this problem, both locally with polymer --server and when bundled and uploaded to Firebase for hosting.
In fact the web-component works fine when using the polymer demo code, but fails when it’s added to a project (I’m pretty sure my paths are all correct).
My repo is davie-robertson/unity-webgl (all WIP- until I can get this fixed)
Can anyone help with the root cause?
EDIT: FIXED it was looking for an entry in the .json file of the webgl build content called:
"graphicsAPI": ["WebGL 2.0", "WebGL 1.0"],
I was using a newer version of unityloader.js with an older .JSON file that didn’t have this entry
Plsssss help me. Is your repo updated? I’m trying to create a element with the webgl content for about a week and had no success. I cloned your repo but it seems it is missing files. Can you give me some tips on how to do it?
EDIT: Well I found another repo from you. You made it happen with polymer 2 and based on what you did I was able to do it with polymer 3. Thanks man