With GitHub pages, GitHub allows you to host a webpage from your repository.
Compile the game to WebGL
- Download and Install Unity
- Install the Solana.Unity-SDK following the instructions and import the example
- Compile the scene to WebGL (be sure to disable compression, as GH pages does not support serving compressed files)
Skip the compilation step
If you want to skip the compilation step, you can fork the SDK repository, which contained a pre-compiled WebGL build in the gp-pages branch
Host the demo on Github pages
- Create a new repository
- Navigate to the build folder containing the index.html
git add .
git commit -m "WebGL game"
git remote add origin <remote_repo_url>
git push origin <branch>
- You repository should now looks similar to the SDK gp-pages branch.
- Enable gh-pages deployment from the repository settings
Github will provide a url for the live deployment: garbles-labs.github.io/Solana.Unity-SDK
Learn how to setup a custom domain on Github pages
Publish your game as xNFT
Follow this guide to publish your game as an xNFT in less than 2 minutes.
Happy game development 🎈 and don’t forget to ⭐ the repo