How to add WalletConnect to a custom scene

This guide will show you how you can add WalletConnect button to a custom scene to connect game players wallet with game.

Step1 : Go to project hierarchy and add a canvas to it.

Step2 : Go to EasyChain->Prefabs folder and drag and drop the Wallet Connect Panel prefab to the canvas.

Change App Data

The App Data section of the WalletConnect contains a description, name, icon and a url which will be displayed on the signing messages on the wallet. You can change these details as follows.

Step3 : Expand the added Wallet Connect Panel prefab and click on Wallet Connect game object to see the inspector. In the inspector, go to the Wallet Connect script and find App Data Section.

Step4 : Once you change these data you will see them on wallet signing messages and in session details as following.

Build application

After setting up above information you have to hide/show wallet connect buttons according to the platform you are going to run the application.

For windows/mac/android

Step5 : Expand the added Wallet Connect Panel prefab and select Connect Button game object.

Step6 : Click on following check box on the inspector to enable the wallet connect button.

Step7 : Then select Connect Button Metamask, Connect Button Trust Wallet game objects.

Step8 : Click on following check box on the inspector to remove the tick to disable those two wallet connect buttons.

For IOS

Step5 : Expand the added Wallet Connect Panel prefab and select Connect Button game object.

Step6 : Click on following check box on the inspector to remove the tick to disable the wallet connect button.

Step7 : Then select Connect Button Metamask, Connect Button Trust Wallet game objects.

Step8 : Click on following check box on the inspector to add the tick to enable those two wallet connect buttons.

Last updated