This example demonstrates how to integrate Web3Auth's Plug and Play SDK into a Unity application. Web3Auth provides a seamless authentication solution that combines the security of blockchain wallets with the convenience of social logins.
- Social login support (Google, Facebook, Twitter, Discord, etc.)
- Email passwordless login
- Secure private key generation and management
- Cross-platform support (iOS, Android, Desktop, WebGL)
- Customizable UI
- Ethereum blockchain integration
- Unity 2020.3 LTS or higher
- .NET 4.x or higher
- Web3Auth Dashboard Account (Sign up here)
- Platform-specific requirements:
- iOS: Xcode 13.0+, iOS 13.0+ device
- Android: Android Studio, Android SDK 21+
- WebGL: Modern browser with Web3 support
- Clone this example:
git clone https://github.com/Web3Auth/web3auth-unity-examples.git
cd web3auth-unity-examples/unity-quick-start-
Open in Unity:
- Launch Unity Hub
- Click "Add project from disk"
- Select the
unity-quick-startdirectory - Open the project
-
Configure Web3Auth:
- Follow the Web3Auth Unity SDK Setup Guide for installation and configuration
- Get your Client ID from Web3Auth Dashboard
- Open the demo scene in
Assets/Scenes/Web3AuthDemo.unity - Select the Web3Auth game object
- Paste your Client ID in the inspector
The example code in this repository demonstrates:
- Basic Web3Auth initialization and setup
- Social login implementation
- User info retrieval
- Private key management
- Basic Ethereum blockchain interaction
Check out:
Assets/Scriptsdirectory for the implementation details- Web3Auth Unity Integration Guide for detailed configuration steps
- Platform Setup Guide for iOS, Android, and WebGL configuration
MIT License