Skip to content

Commit 957bde0

Browse files
Add as submodule
1 parent 00557e5 commit 957bde0

15 files changed

Lines changed: 26 additions & 1172 deletions

File tree

.github/workflows/Build.yml

Lines changed: 22 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build project
1+
name: Build
22

33
on:
44
push:
@@ -8,87 +8,50 @@ on:
88
workflow_dispatch: {}
99

1010
jobs:
11-
checklicense:
12-
name: Check for UNITY_LICENSE in GitHub Secrets
13-
runs-on: ubuntu-latest
14-
outputs:
15-
is_unity_license_set: ${{ steps.checklicense_job.outputs.is_unity_license_set }}
16-
steps:
17-
- name: Check whether Unity activation should be done
18-
id: checklicense_job
19-
env:
20-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
21-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
22-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
23-
run: |
24-
if [[ -n "${UNITY_LICENSE}" ]]; then
25-
echo "is_unity_license_set=true" >> $GITHUB_OUTPUT
26-
else
27-
echo "is_unity_license_set=false" >> $GITHUB_OUTPUT
28-
fi
29-
30-
buildForAllSupportedPlatforms:
11+
build:
3112
name: Build for ${{ matrix.targetPlatform }}
32-
needs: checklicense
33-
if: needs.checklicense.outputs.is_unity_license_set == 'true'
3413
runs-on: ubuntu-latest
3514

3615
strategy:
3716
fail-fast: false
3817
matrix:
39-
targetPlatform:
40-
- StandaloneWindows64
18+
unityVersion: [2022.3.23f1] # Change to your Unity version
19+
targetPlatform: [StandaloneWindows64]
4120

4221
steps:
43-
- name: Checkout repository and submodules
22+
- name: Checkout repository
4423
uses: actions/checkout@v4
4524
with:
46-
fetch-depth: 0
4725
lfs: true
48-
submodules: 'recursive'
26+
submodules: true # ⬅️ IMPORTANT for Cesium submodule
4927

50-
- name: Setup .NET SDK
51-
uses: actions/setup-dotnet@v4
28+
- name: Set up cache for Library folder
29+
uses: actions/cache@v3
5230
with:
53-
dotnet-version: '6.0.x'
31+
path: Library
32+
key: Library-${{ matrix.targetPlatform }}
33+
restore-keys: |
34+
Library-
5435
55-
- name: Install Native Build Dependencies
36+
- name: Install build dependencies
5637
run: |
5738
sudo apt-get update
58-
sudo apt-get install -y cmake ninja-build clang g++ zip unzip
39+
sudo apt-get install -y cmake ninja-build g++ python3
5940
60-
- name: Build Cesium native plugin
41+
- name: Build Cesium Native Bindings
42+
working-directory: Assets/Plugins/CesiumForUnity
6143
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
70-
71-
- name: Cache Library folder
72-
uses: actions/cache@v3
73-
with:
74-
path: Library
75-
key: Library-${{ matrix.targetPlatform }}
76-
restore-keys: Library-
77-
78-
- name: Free up disk space for Android (if needed)
79-
if: matrix.targetPlatform == 'Android'
80-
uses: jlumbroso/free-disk-space@v1.3.1
44+
chmod +x build.sh
45+
./build.sh --target UnityEditor
8146
82-
- name: Build Unity project
47+
- name: Build with Unity
8348
uses: game-ci/unity-builder@v4
84-
env:
85-
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
86-
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
87-
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
8849
with:
50+
unityVersion: ${{ matrix.unityVersion }}
51+
projectPath: ./
8952
targetPlatform: ${{ matrix.targetPlatform }}
9053

91-
- name: Upload build artifact
54+
- name: Upload Build Artifacts
9255
uses: actions/upload-artifact@v4
9356
with:
9457
name: Build-${{ matrix.targetPlatform }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
[submodule "Assets/Plugins/CesiumForUnity"]
22
path = Assets/Plugins/CesiumForUnity
33
url = https://github.com/CesiumGS/cesium-unity.git
4+
[submodule "Assets/Assets/Plugins/CesiumForUnity"]
5+
path = Assets/Assets/Plugins/CesiumForUnity
6+
url = https://github.com/CesiumGS/cesium-unity.git
Submodule CesiumForUnity added at d704aaf

Assets/TutorialInfo.meta

Lines changed: 0 additions & 8 deletions
This file was deleted.

Assets/TutorialInfo/Icons.meta

Lines changed: 0 additions & 9 deletions
This file was deleted.

Assets/TutorialInfo/Icons/URP.png

-23.5 KB
Binary file not shown.

Assets/TutorialInfo/Icons/URP.png.meta

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)