Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.17 KB

README.md

File metadata and controls

50 lines (31 loc) · 2.17 KB

unity-pioneer

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!

Screenshots

pioneer

Documentation

Contributing

Contributions are always welcome! See our open source page for more information.

Support

For help or feedback, please visit our support site