Unity SDK Template showcasing how to grant signing access to an app for games using external wallets. This flow helps avoid their users needing to sign every transaction post onboarding.
Preferably, you would grant the session key to a backend wallet (the thirdweb Engine product provides this feature) and handle execution there. In this example, we use an ephemereal signer.
- Account Abstraction
- Session Keys
- Storage
Contains three scenes:
00_Scene_Main
: Introduction, wallet connection, ERC1155 Claiming using session keys (granting signing permissions to the game).01_Scene_Game
: Placeholder for gameplay, move forward to claim additional ERC20 tokens. (WASD or arrow keys to move, go forward for next step)02_Scene_Inventory
: Displays total NFTs and Tokens held, showcases IPFS storage upload to share results. (PressPlay Again
to reconnect without having to sign with MM again using session keys)
Platforms supported: WebGL, Standalone.
Note: This template showcases connecting to a Smart Wallet using external wallets, before ultimately granting a session key to a local wallet - preferring Metamask extension for WebGL and WalletConnect for native.
- Clone this repository.
- Open in Unity 2022.3.17f1
- Create a thirdweb api key
- Make sure
com.thirdweb.pioneer
is an allowlisted bundle id for your API key, and enable Smart Wallets. - If testing in WebGL, set allowlisted domains to
*
or to your localhost url. - Find your
ThirdwebManager
in00_Scene_Main
and set the client id there. - Press Play!
- To build the game, follow the build instructions
- Learn more from the Unity SDK Documentation
Contributions are always welcome! See our open source page for more information.
For help or feedback, please visit our support site