Bootstrap your Game
Sequence's Unity SDK includes a range of features to help you bootstrap your game.
Import our boilerplates from the samples in Unity's Package Manager
and can create them using the BoilerplateFactory as shown below. Feel free to adjust the UI and logic inside the samples to fit your needs.
Ensure that your codebase has access to the Sequence.Boilerplates.asmdef assembly.
Checkout the BoilerplateController.cs for more integration examples.
Login
Create the SequenceLoginWindow prefab to authenticate users as a Guest, with Email OTP, Google- or Apple Sign In.
Checkout the Authentication section for more details on how to configure your project for each login option.
BoilerplateFactory.OpenSequenceLoginWindow(parent);Parameters
parent (Transform)
Transform inside of a Canvas object.
In-Game Shop
Accelerate your game growth by selling items directly to your players. Create the SequencePlayerProfile prefab to
show an In-Game Shop that utilizes game items from a ERC1155 contract, which users purchase using any custom or
existing ERC20 currency.
Primary Sales Contract: Learn how to set up and deploy contracts for launching a primary sale.
BoilerplateFactory.OpenSequenceLoginWindow(parent, wallet, chain, collectionAddress, saleContractAddress, itemsForSale, onClose);Parameters
parent (Transform)
Transform inside of a Canvas object.
wallet (IWallet)
The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.
chain (Chain)
The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.
collectionAddress (string)
ERC1155 contract address. Deploy your own contract on Builder first.
saleContractAddress (string)
ERC1155 Sale contract address when you deploy your sale on Builder.
itemsForSale (int[])
Array of token Ids which you wish to sell to your players.
onClose (Action)
Optional. Callback when the user closes this window.
Daily Rewards
Reward users with NFTs or Collectibles for playing your game for consecutive days. Deploy our server boilerplate which performs the mint transaction whenever they claim their reward.
Make sure to deploy our Daily Rewards Server Boilerplate
BoilerplateFactory.OpenSequenceDailyRewards(parent, wallet, chain, apiUrl, onClose);Parameters
parent (Transform)
Transform inside of a Canvas object.
wallet (IWallet)
The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.
chain (Chain)
The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.
apiUrl (string)
The API url you receive after deploying the required server boilerplate.
onClose (Action)
Optional. Callback when the user closes this window.
Player Profile
Create the SequencePlayerProfile prefab to manage your current profile. This includes functionalities such as Sign Out,
linking external wallets, sending native tokens, and QR code to receive funds.
BoilerplateFactory.OpenSequencePlayerProfile(parent, wallet, chain, onClose);Parameters
parent (Transform)
Transform inside of a Canvas object.
wallet (IWallet)
The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.
chain (Chain)
The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.
onClose (Action)
Optional. Callback when the user closes this window.
Inventory
Create the SequenceInventory prefab to show all items owned by a user from any ERC1155 or ERC721 contract.
BoilerplateFactory.OpenSequenceInventory(parent, wallet, chain, collectionAddress, onClose);Parameters
parent (Transform)
Transform inside of a Canvas object.
wallet (IWallet)
The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.
chain (Chain)
The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.
collectionAddress (string)
ERC1155 or ERC721 contract address. Deploy your own contract on Builder first.
onClose (Action)
Optional. Callback when the user closes this window.
Sign Messages
Create the SequenceSignMessage prefab to show a modal that lets you sign a specified text.
BoilerplateFactory.OpenSequenceSignMessage(parent, wallet, chain, onClose);Parameters
parent (Transform)
Transform inside of a Canvas object.
wallet (IWallet)
The wallet instance you receive from the SequenceWallet.OnWalletCreated event after completing the login process.
chain (Chain)
The chain type (Ethereum, Sepolia, ..) on which the specified contract is deployed.
onClose (Action)
Optional. Callback when the user closes this window.