Skip to main content

Unity

With AppKit, you can easily let people interact with multiple EVM compatible wallets and blockchains.

Install

Let's get started by installing the package!

Prerequisites

  • Unity 2022.3 or above
  • IL2CPP code stripping level: Minimal (or lower)
  • Target platform: Android, iOS, Windows, macOS, WebGL
  • Gamma color space

Package

To install packages via OpenUPM, you need to have Node.js and openupm-cli installed. Once you have them installed, you can run the following commands:

openupm add com.walletconnect.web3modal

Configure

The minimum configuration required is filling in a Project ID and Metadata fields inside of WalletConnectProjectConfig scriptable object. The scriptable object is automatically created after package installation. You can find it in the Assets/WalletConnect/Resources directory.

Don't have a project ID?

Head over to WalletConnect Cloud and create a new project now!

Get startedcloud illustration
  • Id: The project ID is a unique identifier for your project.
  • Name: The project name is a human-readable name for your project.
  • Description: The project description is a human-readable description for your project.
  • URL: The project URL
  • Icons: At least one icon is required for the project.

Other fields are optional and will be covered in the next sections.

Implement

  1. Add Web3Modal prefab from Packages/Web3Modal/Prefabs to your scene.
  2. Initialize Web3Modal from your script
public async void Start()
{
await Web3Modal.InitializeAsync();
}
  1. Open the modal
public void OpenModal()
{
Web3Modal.OpenModal();
}