From 7c24f460f6c378cfc803d084cba239b7083744fa Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 20 Feb 2025 13:08:22 +0800 Subject: [PATCH 1/2] ci --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2a667869..3d2f4661 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -143,4 +143,46 @@ jobs: UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} with: targetPlatform: StandaloneLinux64 + buildMethod: Editor.Builder.BuildPackage + + build-webgl: + name: Build WebGL + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + lfs: true + + # Git LFS + - name: Create LFS file list + run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id + + - name: Restore LFS cache + uses: actions/cache@v3 + id: lfs-cache + with: + path: .git/lfs + key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }} + + - name: Git LFS Pull + run: | + git lfs pull + git add . + git reset --hard + # Unity Cache + - uses: actions/cache@v3 + with: + path: Library + key: Library-WebGL-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }} + restore-keys: | + Library-WebGL- + # Build + - name: Build Unity WebGL + uses: game-ci/unity-builder@v4 + env: + UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} + UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} + UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} + with: + targetPlatform: WebGL buildMethod: Editor.Builder.BuildPackage \ No newline at end of file From 46fb8b82af69c493a2a0e17972e56093bb003e7c Mon Sep 17 00:00:00 2001 From: Nasr Date: Thu, 20 Feb 2025 13:09:04 +0800 Subject: [PATCH 2/2] brkl --- Assets/Dojo/Runtime/WorldManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Assets/Dojo/Runtime/WorldManager.cs b/Assets/Dojo/Runtime/WorldManager.cs index 83ddbf75..46c14451 100644 --- a/Assets/Dojo/Runtime/WorldManager.cs +++ b/Assets/Dojo/Runtime/WorldManager.cs @@ -18,6 +18,7 @@ public class WorldManager : MonoBehaviour async void Awake() { #if UNITY_WEBGL && !UNITY_EDITOR +break wasmClient = new ToriiWasmClient(dojoConfig.toriiUrl, dojoConfig.relayWebrtcUrl, dojoConfig.worldAddress); await wasmClient.CreateClient(); #else