← Protocols
ChainSafe Gaming SDK
Dev Tooling·Ethereum · Polygon · Avalanche · Base · BNB Smart Chain · Arbitrum · SKALE · Cronos · EVM

ChainSafe Gaming SDK

01Description

Open-source Web3 gaming toolkit from ChainSafe. The flagship `web3.unity` SDK is a C# Unity package that wraps wallet connect (WalletConnect, MetaMask, embedded), contract reads/writes, NFT minting, marketplaces, and lootboxes across 200+ EVM chains and 30+ wallets. An Unreal plugin and platform-agnostic services (NFT minter, marketplace, identity) round out the stack.

02Best for
  • 01Unity games (WebGL, mobile, desktop) adding Web3 features
  • 02Unreal Engine titles via the ChainSafe Unreal plugin
  • 03multi-chain games across 200+ EVM networks
  • 04in-game NFT minting and marketplace flows
  • 05studios that want an open-source SDK rather than a managed platform
03Install
  • git clone https://github.com/ChainSafe/web3.unity.git
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_CHAINSAFE_PROJECT_IDClientChainSafe Gaming project ID from the developer dashboard (gaming.chainsafe.io).
CHAINSAFE_API_KEYServerServer-side API key for the ChainSafe NFT minter / marketplace services.
05Prompt snippet
Install the ChainSafe `web3.unity` package via UPM (Unity Package Manager) from the GitHub repo or the Unity Asset Store, configure the `Web3Builder` with your `ChainConfig` (chainId, RPC, currency) and a `ProjectConfig` (ChainSafe project ID), and call services like `Web3.Evm.SendTransaction`, `Web3.ContractBuilder.Build(abi, address).SendTransaction(method, args)`, or `Web3.Erc721.MintWithReceipt`. For Unreal, use the `ChainSafe Web3 Unreal` plugin (Blueprints + C++ wrappers around the same JSON-RPC). Wallet connect supports WalletConnect v2, embedded social login, and MetaMask via deep link on mobile. NFT minting and marketplace listings can flow through the ChainSafe-hosted services or directly to your own contracts.
06Gotchas
  • Unity WebGL builds cannot use system MetaMask directly — `web3.unity` ships a JSLib bridge that must be present in the build, and missing it gives a silent 'no provider' error at runtime. Always test the WebGL pipeline on a clean export.
  • Mobile (iOS/Android) wallet connect uses deep links; your Unity build needs URL scheme entries in `Info.plist` / `AndroidManifest.xml` or WalletConnect sessions hang on a black screen returning to the app.
  • Each EVM chain has its own currency for gas — the SDK does not auto-bridge or sponsor gas; integrate a paymaster (Pimlico, ZeroDev) or an embedded-wallet provider (Sequence, Web3Auth) if you want gasless UX. Game-chain quirks (Xai uses XAI, SKALE uses sFUEL) need explicit chain configs.
  • The Unreal plugin lags the Unity SDK in feature parity — some services (lootbox, NFT minter) are Unity-only; verify the feature you need is wrapped in the Unreal plugin before committing.
  • ChainSafe-hosted minter and marketplace are custodial-ish: assets are minted from a ChainSafe-controlled deployer unless you bring your own contracts — withdrawal/transfer of those assets to peer-to-peer venues works on-chain, but the metadata pipeline depends on ChainSafe's pinning service.
  • `web3.unity` is MIT-licensed and community-maintained — for production AAA studios, expect to fork and patch rather than rely on upstream-only support, and pin a release tag rather than `main`.
07Alternatives