Skip to content

Commit 2faef4a

Browse files
Update Build.yml
1 parent 4b0b40a commit 2faef4a

1 file changed

Lines changed: 21 additions & 16 deletions

File tree

.github/workflows/Build.yml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -47,28 +47,33 @@ jobs:
4747
lfs: true
4848
submodules: true
4949

50-
# Use pre-built Cesium package approach
51-
- name: Download and setup Cesium for Unity
50+
- name: Setup .NET SDK
51+
uses: actions/setup-dotnet@v4
52+
with:
53+
dotnet-version: '6.0.x'
54+
55+
- name: Install Native Build Dependencies
5256
run: |
53-
# Download latest release from Cesium Unity releases
54-
wget -O cesium-unity.tgz https://github.com/CesiumGS/cesium-unity/releases/latest/download/cesium-unity.tgz
55-
56-
# Extract to Packages directory
57-
mkdir -p Packages
58-
cd Packages
59-
tar -xzf ../cesium-unity.tgz
60-
61-
# Ensure proper permissions
62-
chmod -R 755 .
57+
sudo apt-get update
58+
sudo apt-get install -y cmake ninja-build clang g++ zip unzip
59+
60+
- name: Build Cesium native plugin
61+
run: |
62+
mkdir -p Assets/Plugins/CesiumForUnity/native~/build
63+
cd Assets/Plugins/CesiumForUnity/native~/build
64+
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release
65+
cmake --build . --config Release
66+
67+
# This is the new step to generate the C# bindings for Cesium.
68+
- name: Build Cesium C# bindings (Reinterop)
69+
run: dotnet publish Assets/Plugins/CesiumForUnity/Reinterop~ -o Assets/Plugins/CesiumForUnity
6370

6471
- name: Cache Library folder
6572
uses: actions/cache@v3
6673
with:
6774
path: Library
68-
key: Library-${{ matrix.targetPlatform }}-cesium
69-
restore-keys: |
70-
Library-${{ matrix.targetPlatform }}
71-
Library-
75+
key: Library-${{ matrix.targetPlatform }}
76+
restore-keys: Library-
7277

7378
- name: Free up disk space for Android (if needed)
7479
if: matrix.targetPlatform == 'Android'

0 commit comments

Comments
 (0)