Usage with Unity SDK
Quick Started
The quickest way to get started is to use the interactive Connect Wallet component builder.
This playground allows you to modify the theme, size, and supported wallets of the Connect Wallet component and preview the changes in real time.
You can then copy the code snippet and add it directly to your app.
For details on how to use the Connect Wallet component in an app and set up a project, read the guide below and use your generated code snippet for the ConnectWallet
component.
Guide
The ConnectWallet
prefab allows users to connect their wallet to your game.
It uses the ThirdwebManager to determine which networks to display as well as the secondary UI related to certain providers such as WalletConnect.
You can set up which wallets you want to support from the Prefab_ConnectWallet Inspector directly.
When a user clicks the button, a dropdown of supported wallets will appear. The user can then select their preferred wallet to connect to the game; once connected, the button will show the user’s balance and an option to switch networks if multiple networks are set up through the ThirdwebManager.
The prefab is located at: Assets/Thirdweb/Examples/Prefabs/Prefab_ConnectWallet.prefab
.