The example shows how to deploy a simple Unity WebGL build on ICP in an asset canister. It just shows a Unity WebGL build with the URP template installed. The Unity WebGL build is deployed as frontend, no backend is needed in this sample.
The /frontend folder contains the pre-built Unity WebGL export. The frontend is deployed as an asset canister.
- Install icp-cli:
npm install -g @icp-sdk/icp-cli @icp-sdk/ic-wasm
Clone the example project:
git clone https://github.com/dfinity/examples
cd examples/hosting/unity-webgl-templateStart the local network:
icp network start -dDeploy the canisters:
icp deployThe URL for the frontend depends on the canister ID. When deployed, the URL will look like this:
http://{canister_id}.localhost:8000
Stop the local network when done:
icp network stop