Unity 4.14.0 - WalletConnect Upgrades

External Wallet UX issues? Not anymore!

Massive upgrade to the WalletConnect SDK

In previous versions of our SDK, choosing WalletConnect was akin to choosing MetaMask as a WalletProvider when connecting. We wanted to make sure we captured most of the WalletConnect features and have the two connection methods achieve different things, respectively:

  • Provide a simple interface for a single MetaMask connection using the native MM SDK, where you can easily customize the prefab, and in WebGL use the browser extension instantly without UI.
  • Make WalletConnect the option to support now over 400 wallets using a standalone modal that fits right into your desktop and mobile games.

We've now reached the point where we can gladly say WalletConnect is a stable option for developers who want to support external wallets, perhaps alongside web2 login options thirdweb provides - it has been customized to be fully integrated with the thirdweb Unity SDK, and you can now reach a wider audience easily.

To connect using WalletConnect, as usual, simply call SDK.Wallet.Connect and the magic will happen automatically.

using Thirdweb;

public async void ConnectWallet()
{
    // Reference to your Thirdweb SDK
    var sdk = ThirdwebManager.Instance.SDK;

    // Configure the connection
    var connection = new WalletConnection(
      provider: WalletProvider.WalletConnect,
      chainId: 1
    );

    // Connect the wallet
    string address = await sdk.Wallet.Connect(connection);
}

WalletConnect Updates

  • Support for additional wallets: you can now connect to 400+ different wallets using their respective deeplinks, cross-platform.
  • WalletProvider_WalletConnect now fully utilizes the WalletConnect UI Modal.
  • You can customize which wallets to include, this feature was previously only available for WebGL, add the wallet ids to your ThirdwebManager's WalletConnect Options to use this.
  • Support for selecting different accounts for wallets that integrate this feature.
  • Support for connecting to multiple chains, and switching networks without being prompted until the next request comes in (big UX difference specially on mobile!)
  • All issues with reconnection have been fixed, disconnect and reconnect as you please, with any wallet you like!
  • All issues with mobile deeplinking and redirection have been fixed.
  • UI adapts to screen size and orientation.

Special thanks to the WalletConnect team for help with debugging and integration to get this to the finish line.

Preview: Standalone target (Desktop)

b312e809bd60bed0a30ca1323a6eb9db-1
07842b7a8754e062eebceb0f222e2cd4
0b5b29b305e3f683c45ea81419cfed24

Preview: Mobile target (will scale down based on phone screen size)

b7824a675cba5b3e693b6f22aca7d640
c673368b6c41ca37ad2587efffff2f2d
a4756c6d80b1820b3b1d2b9fd230840a

Miscellaneous updates

  • [WebGL] Updated bridge.
  • [Native] Improved network switching functionality for the MetaMask WalletProvider.
  • [Cross-Platform] Added support for new chains.

Try it out: https://github.com/thirdweb-dev/unity-sdk/releases/tag/v4.14.0