ChainSafe / web3.unity

🕹 Unity SDK for building games that interact with blockchains.
GNU Lesser General Public License v3.0
908 stars 234 forks source link

Wallet Connect WebGL Support (Especially Mobile) #1060

Open felixnomina opened 1 month ago

felixnomina commented 1 month ago

Summary An easy way for devs to connect their MetaMask wallet (or others) from mobile browser which doesn't have extension (ie. chrome)

Suggested features or ways to address the summary I have tried using the web3modal package from wallet connect here https://docs.walletconnect.com/appkit/unity/core/installation

I follow the installation document and just add a script (in pic) and a button with text in a scene (Unity 2022.3.10f1) main

I build it in a new unity webgl project and test it using vscode live server from both my desktop and mobile device. It successfully connect the MetaMask wallet in both desktop and mobile browser, so I assume this implementation of Wallet Connect works in WebGL. It would be nice if this could be integrated into current ChainSafe SDK, so that Wallet Connect work on WebGL too, especially on mobile browser.

Motivation While people can play WebGL game on desktop to connect with their wallet extension, I think it is crucial to support mobile devices too because it is more accessible to a lot of people. A lot of people spend times way more on mobile devices now, so this feature will be really helpful

Acceptance Criteria Successfully connect a wallet from wallet app like MetaMask when opening WebGL build from mobile browser

Additional Context Some screenshots of connecting wallet from mobile browser image image image image image

Final Steps

Estimations | 5 | Moderate efort | A few days | Mediium complexity | Moderate |

sneakzttv commented 1 month ago

Thank you, we will look into this :)