2D Game Example
Last updated
Was this helpful?
Last updated
Was this helpful?
This section showcases the Cronos play Gaming SDK integration with the Cronos chain, aiming to bring Unity games into the Cronos ecosystem. In particular, we will show how to do a basic integration of the Cronos play with the Cronos chain including:
Connecting to Cronos networks;
Installaiton of the SDK;
Obtaining a sample NFT and;
Import Sample package from Unity Asset Store
(Version 2020.3.25f1 or later)
Network Name: Cronos Mainnet Beta
New RPC URL: https://evm-dev.cronos.org/
Chain ID: 25
Currency Symbol: CRO
Block Explorer URL: https://explorer.cronos.org/
Sufficient funds on deployer address
For Crypto.com Onchain Wallet integration, please refer to our .
Step 3a. [Unity] Double click the Level1
scene under Assets/Scenes
directory
Drag the Transfer721
prefab under Assets/Web3Unity/Prefabs/WebGL
dir into the scene.
Update the Contract
address under Transfer721Script
object inspector
Update the To Account
address to your desired wallet address
Switch to WebGL platform
Click the Player Setting
button
Select Web3GL-2020
under Resolution and Presentation
tab
Set Compression Format
to Disabled
under Publishing Settings
tab
After that, click Build and Run
button and you are ready to play.
Bolt Kit: Platformer Tutorial Assets
and click ImportERC20 example
ERC721 example
ERC1155 example
1. Connect your wallet via metamask or walletconnect
2. Click Create NFT
under YOUR COLLECTION
tab
3. Create and sign the transaction after uploading the image
4. Copy the contract address and image URL from the NFT modal
5. Paste into the corresponding input box inside Unity inspector
1. Fill in the price at list item modal and confirm
2. Sign approval and create item transaction
3. View the listed item in Marketplace tab
Download the tutorial bolt kit from and import the assets into the blank new project. Below are the steps for importing Tutorial Projects - Bolt Kit from Unity. See .
For a detailed explanation, please refer to
* For acquiring the NFT, you can create your own (see ), or mint an ERC721 NFT at our (see ).
The above guideline documentation only highlights the basic integration between ChainSafe and Cronos chain. You can download the full source code of the above sample game . For other ERC protocol methods, please refer to the .