An example project to show how to use Phantom deeplinks to login and use Solana NFTs in Unity games and apps.
Follow me on Twitter for more frequent updates: @SolPlay_jonas
-
To use it in your game just include: https://github.com/Woody4618/Solana.Unity-SDK.git (maybe a few commits ahead or behind the garbles SDK) or https://github.com/garbles-labs/Solana.Unity-SDK.git in your unity package manager.
-
Import this unity package SolPlay_0_4_alpha.unitypackage.zip Or get the newest Unity package from the Releases tab on the right. and then import it in Unity Assets->importPackage.
Here is a Video which explains the process step by step: https://www.youtube.com/channel/UC517QSv61gMaABWIJ412_Lw/videos
If you want to participate, it's very welcome.
Packages used:
Epic Toon FX: https://assetstore.unity.com/packages/vfx/particles/epic-toon-fx-57772
Lunar console (Get the pro version here: https://github.com/SpaceMadness/lunar-unity-console Pro Version: https://assetstore.unity.com/packages/tools/gui/lunar-mobile-console-pro-43800
Garbels unity solana sdk. Check out their awesome game as well! Vr Pokemon! https://github.com/garbles-dev/Solana.Unity/tree/master/src
Solanart: https://github.com/allartprotocol/unity-solana-wallet
Tweetnacl (removed): https://github.com/dchest/tweetnacl-js/blob/master/README.md#random-bytes-generation
Gif loading: https://github.com/3DI70R/Unity-GifDecoder
Flappy Bird Game: https://github.com/diegolrs/Flappy-Bird
Unity Ui Extensions: https://github.com/JohannesDeml/unity-ui-extensions.git
So far the repository is only tested in IOS mobile, Android and WebGL.
Done:
- Login and getting Public key from phantom
- Loading and caching NFTs
- Nft meta data parsing + power level calculation
- Deeplink to minting page
- Deeplink to raydium token swap
- Transactions
- In game token and sol amount loading widget
- WebGL support
- IOS Support
- Android Support
- Smart contract interaction
- Token swap using Orca WhirlPools
- Minting NFTs using metaplex (Without candy machine)
- Minting NFTs (from candy machine V2)
Next up Todo:
- Animated Gifs
- Gtlf models
- Minting NFTs (from candy machine V2 with white list tokens)
- Maybe Staking?
- What else would you like?