This project is currently under active development. Features, APIs, and behavior may change frequently.
Experience our multichain game demo leveraging In-App and Smart Wallets for seamless gameplay, built in just three weeks - Web3 Warriors.
Build games for WebGL, Desktop, and Mobile using 1000+ supported chains, with various login options!
Wallet Provider | WebGL | Desktop | Mobile |
---|---|---|---|
In-App Wallet (Email, Phone, Socials) | ✔️ | ✔️ | ✔️ |
Private Key Wallet (Guest Mode) | ✔️ | ✔️ | ✔️ |
Wallet Connect Wallet (400+ Wallets) | ✔️ | ✔️ | ✔️ |
MetaMask Wallet (Browser Extension) | ✔️ | — | — |
Smart Wallet (Account Abstraction) | ✔️ | ✔️ | ✔️ |
✔️ Supported ❌ Not Supported — Not Applicable
Thirdweb's Unity SDK v5 leverages the robust .NET SDK for core functionality, providing a unified API and behavior across platforms.
- Unified API: Say goodbye to the WebGL Bridge. Now, enjoy a consistent experience across WebGL, Desktop, and Mobile platforms.
- Enhanced Composability: Use our SDK anywhere without worrying about its state. APIs are chain agnostic, enabling seamless interaction with multiple chains.
- Native Experience: The .NET core provides a native, predictable experience, making upgrades less daunting.
- Simplified
ThirdwebManager
:ThirdwebManager.Instance.SDK.GetContract
is nowThirdwebManager.Instance.GetContract
, returningThirdwebContract
.ThirdwebManager.Instance.SDK.Wallet.Connect
is nowThirdwebManager.Instance.ConnectWallet
, returningIThirdwebWallet
.- Handles multiple wallet connections and tracks the active wallet.
- The prefab is now much simpler and straightforward to setup.
- Optimized Package: Cleaner, lighter Unity package with minimal dependencies, enhancing performance. We took control of all the layers and rewrote them, further improving the experience when using thirdweb infra. No AWS SDK. Nethereum is used only for types/encoding. Newtonsoft.Json and EDM4U are included.
- Cross-Platform Consistency: No behavioral differences between platforms. What you see in the editor is what you get in WebGL, Standalone, and Mobile runtime platforms.
To achieve full .NET core functionality for WebGL, we include WebGLThreadingPatcher, which makes async tasks blocking on the main thread. This is due to Unity's lack of support for C# multithreading in WebGL. This mainly affects InAppWallet initial creation (not session resuming).
- Download: Head over to the releases page and download the latest
.unitypackage
file. - Explore: Try out
Scene_Playground
to explore functionality and get onboarded. - Learn: Explore the .NET SDK Documentation to find full API references.
Notes:
- Tested on Unity 2021 and 2022 LTS. Highly recommend using 2022 LTS.
- Example scenes are built with Unity 2022 LTS; they may look off in earlier versions.
- Newtonsoft DLL included; deselect if already installed to avoid conflicts.
- If using .NET Framework and encountering
HttpUtility
errors, createcsc.rsp
with-r:System.Web.dll
underAssets
. - Use version control and test removing duplicate DLLs if conflicts arise.
- Build Settings: Use
Smaller (faster) Builds
(IL2CPP Code Generation in Unity 2022). - Player Settings: Use IL2CPP over Mono.
- Stripping Level: Set
Managed Stripping Level
toMinimal
(Player Settings
>Other Settings
>Optimization
).
- Compression Format: Set to
Disabled
(Player Settings
>Publishing Settings
) for final builds. - Testing In-App Wallets (Social Login): Host the build or run it locally with
Cross-Origin-Opener-Policy
set tosame-origin-allow-popups
.
Example setup for testing In-App Wallet (Social Login) locally:
// YourWebGLOutputFolder/server.js
const express = require('express');
const app = express();
const port = 8000;
app.use((req, res, next) => {
res.header('Cross-Origin-Opener-Policy', 'same-origin-allow-popups');
next();
});
app.use(express.static('.'));
app.listen(port, () => console.log(`Server running on http://localhost:${port}`));
// run it with `node server.js`
No action needed for hosted builds.
- EDM4U: Comes with the package, resolves dependencies at runtime. Use
Force Resolve
fromAssets
>External Dependency Manager
>Android Resolver
. - Custom Schemes: Set custom schemes matching your bundle ID in
Plugins/AndroidManifest.xml
or equivalent for InAppWallet OAuth.
For any questions or support, visit our Support Portal.
Thank you for trying out the Thirdweb Unity SDK!