简体   繁体   中英

Error when trying to connect Metamask to Unity

I'm developing a decentralised videogame using Unity. To connect Unity to Metamask I'm using a library called Web3GL. When I try to connect my account to Metamask this message pops-up在此处输入图像描述 I've been experiencing this problem for a long time now and I really don't know what to do about this. The fun part is that when I try to build and run directly from Unity it works but when I embed the game inside my webpage I receive this pop up? Does anyone know how to help me?

The error points me to library code that I've never touched so I don't think I've created the problem.

This is a problem caused by encoding issues. You're probably using Brotli encoding in your WebGL builds (Build -> Player Settings -> Publishing Settings -> Compression Format) . And it's known that somehow in local servers without HTTPS, this error may persist. (I'll investigate more and edit my answer including the reason in the future, hopefully). In order to get rid of the issue you may disable Brotli encoding or turn on Decompression Fallback in Publishing Settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM