Products

Solutions

Developer

Company

Product

Solutions

Resources

Dev Tools

SDKs

Company

Pricing

Playground

Product

Solutions

Resources

Dev Tools

SDKs

Company

Pricing

Playground

Pioneer

Unity template featuring Account Abstraction, Session Keys, and Storage.

by

thirdweb

thirdweb

Category

Gaming

Frameworks

Unity

Getting Started

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.

Features

- Account Abstraction

- Session Keys

- Storage

Scenes

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. (Press Play 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.

Setup Instructions

1. Clone this repository.

2. Open in Unity 2022.3.17f1

3. Create a thirdweb api key

4. Make sure com.thirdweb.pioneer is an allowlisted bundle id for your API key, and enable Smart Wallets.

5. If testing in WebGL, set allowlisted domains to * or to your localhost url.

6. Find your ThirdwebManager in 00_Scene_Main and set the client id there.

7. Press Play!

Documentation

- To build the game, follow the build instructions

- Learn more from the Unity SDK Documentation

Start with thirdweb.

Build web3 apps with ease. Get instant access.

Start with thirdweb.

Build web3 apps with ease. Get instant access.

Start with thirdweb.

Build web3 apps with ease. Get instant access.