This repository contains the official Unity sample for Reown AppKit. It demonstrates wallet connection, message signing, transactions, balance queries, contract reads, and runtime network switching across multiple EVM chains. Use it as a reference implementation and for local testing.
This sample demonstrates:
- Wallet connection: Connect via WalletConnect
- Social Logins: Google, X (Twitter), Discord, Apple, and GitHub authentication
- Multi-Chain Support: Ethereum, Optimism, Arbitrum, Ronin, Avalanche, Base, and Polygon
- Session Management: Automatic session resumption across app restarts
- Signing Operations: Personal sign for messages
- Transactions: Send ETH and interact with smart contracts
- Balance Queries: Check wallet balances using Reown Blockchain API
- Contract Reading: Read data from smart contracts (demonstrated with WCT staking contract)
- Network Switching: Change between supported chains at runtime
- SIWE (optional): One-Click Auth, disabled by default (see below)
Handles initial app setup including debug console initialization and analytics configuration. Also provides useful console commands for debugging:
accounts- Lists all connected accountssessionProps- Prints WalletConnect session propertiessession- Prints active WalletConnect sessionwebwallet <url>- Set custom web wallet URL
The main initialization script for AppKit. This is where we configure:
- Project ID and metadata
- Supported chains and networks
- Social login providers
- Custom wallets (platform-specific test wallets from Reown)
- SIWE configuration (commented out by default)
This script initializes AppKit and loads the main menu scene.
Contains the main UI and interaction logic. Demonstrates various AppKit features through buttons:
- Connect wallet
- Switch networks
- View account details
- Sign messages
- Send transactions
- Get balance
- Read smart contracts
- Disconnect
Each button handler shows best practices for error handling and user feedback.
- Unity 6.4 (can be backported to Unity 2023+ with minimal effort by manually downgrading some third-party packages)
- IL2CPP code stripping level: Minimal (or lower)
- Gamma color space for the best look
- Open the project in Unity
- Open the Init scene (usually the first scene in Build Settings)
- Press Play in the Unity Editor
- Click "Connect" to open the AppKit modal and connect a wallet
The sample will automatically try to resume your previous session when you restart.
This sample comes with a pre-configured sample Project ID that is set up for specific bundle IDs and package names.
For production use or if you change the bundle ID/package name, you need to:
- Create your own Project ID at Reown Dashboard
- Configure your app's bundle ID (iOS) and package name (Android) in the dashboard
- Replace the
projectIdinAppKitInit.cswith your new Project ID
If your Android build crashes on startup:
- Go to Tools → Sentry in Unity menu
- Uncheck "Enable Sentry"
- Rebuild the project
This is a known issue with the Sentry integration in the sample that will be fixed in the future.
The sample includes Sign-In with Ethereum (SIWE) support, but it's commented out by default.
To enable SIWE:
- Open
AppKitInit.cs - Uncomment the
SiweConfigsection (lines 27-39) - Update the
domainandurito match your application - Uncomment the
siweConfig = siweConfigline inAppKitConfig(line 47)
For more details, see the SIWE documentation.
This sample is designed to get you started quickly, but there's much more to explore:
- Installation Guide - Complete setup instructions
- Usage Documentation - Detailed API reference and examples
- Options - Configure AppKit behavior
- Actions - Available operations and methods
- Events - Listen to wallet and network changes
- Customization - Customize the modal UI
- SIWE - One-Click Auth implementation
- GitHub Issues - Report bugs or request features
- Reown Dashboard - Manage your projects
- Documentation - Full AppKit Unity documentation
Thank you for your interest in the AppKit Unity sample 🙇♂️