Pay to open the Magic Treasure Chest. Randomly win rewards including gold currency and prize NFTs.
Getting Started
- Download this repo (*.zip or *.git)
- Download the Unity Editor
- Open this repo in the Unity Editor
- Follow the
ReadMe.asset
instructions within Unity - Enjoy
See docs.moralis.io/unity for more info.
Bonus: Service Type
This game features flexibility on the service layer. Toggle the TheGameServiceType
enum to explore various ways that the game communicates with external services. Select the ReadMe.asset
, select the TheGameConfiguration.asset
, and choose the TheGameServiceType
value. See the screenshots below.
Documentation
README.md
- The primary documentation for this repoAssets/Moralis Web3 Unity SDK Samples/Web3MagicTreasureChest/Documentation/ReadMe.asset
- Select this asset in Unity to get started
Configuration
Unity Target
- Standalone MAC/PCUnity Version
- Use this VersionUnity Rendering
- Universal Render Pipeline (URP)Unity Aspect Ratio
- Game View 10x16
Unity Structure
Unity/
- Open this folder in the Unity EditorUnity/Assets/Moralis Web3 Unity SDK Samples/Web3MagicTreasureChest/Scenes/
- Open any Scene. Press 'Play'!
Smart Contract Structure
SmartContracts/Hardhat/
- Open this folder in the Visual Studio Code EditorSmartContracts/Hardhat/Instructions.txt
- The primary documentation for smart contracts
Dependencies
Moralis Web3 Unity SDK
- Already included via Unity Package Manager as this Version
Video: Create a Web3 Magic Treasure Chest game for Unity
Thumbnail | TimeStamps |
---|---|
Project
Project | ReadMe | TheGameConfiguration |
---|---|---|
Scenes
Intro | Authentication | Settings |
---|---|---|
ViewCollection | Game | Game |
---|---|---|
Moralis
- Moralis provides a single workflow for building high performance dapps. Fully compatible with your favorite web3 tools and services.
- See moralis.io for more info.
Web3 Unity SDK
- This SDK brings the power of Moralis to your Unity projects.
- See docs.moralis.io/unity for more info.
Need Help?
- Contact us in the Moralis Forum.
- See forum.moralis.io/unity for more info.