Skip to content

Commit

Permalink
Support WebGL on 2023.2
Browse files Browse the repository at this point in the history
  • Loading branch information
durswd committed Jan 3, 2024
1 parent da9a4b2 commit 6207e26
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 2 deletions.
45 changes: 44 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,47 @@ jobs:
name: WebGL_3-1-8
path: ./Dev/Plugin/Assets/Effekseer/Plugins

webgl_3-1-38:
name: WebGL Build with emsdk 3.1.38
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Cache emsdk
id: cache
uses: actions/cache@v1
with:
path: ./emsdk
key: ${{ runner.os }}-emsdk-3_1-38

- name: install emsdk 3.1.38
if: steps.cache.outputs.cache-hit != 'true'
run: |
git clone --depth 1 https://github.com/emscripten-core/emsdk.git
cd emsdk
./emsdk install sdk-3.1.38-64bit
cd ..
- run: sh scripts/clone_dependencies.sh
- run: |
./emsdk/emsdk activate sdk-3.1.38-64bit
source ./emsdk/emsdk_env.sh
cd ./Dev/Cpp/webgl
mkdir build2019
cd build2019
emcmake cmake -DCMAKE_BUILD_TYPE=Release ..
make
cp libEffekseerUnity.bc ../../../Plugin/Assets/Effekseer/Plugins/WebGL/3.1.38-64bit/
- name: Upload math result for webgl
uses: actions/upload-artifact@v1
with:
name: WebGL_3-1-38
path: ./Dev/Plugin/Assets/Effekseer/Plugins

merge:
name: merge
runs-on: ubuntu-latest
needs: [android, mac_ios, windows, webgl_1-38,webgl_2-0-19,webgl_3-1-8]
needs: [android, mac_ios, windows, webgl_1-38,webgl_2-0-19,webgl_3-1-8,webgl_3-1-38]
steps:
- uses: actions/checkout@v2
- name: Download Android
Expand Down Expand Up @@ -206,6 +243,11 @@ jobs:
with:
name: WebGL_3-1-8

- name: Download webgl 3.1.38
uses: actions/download-artifact@v1
with:
name: WebGL_3-1-38

- name: Copy
run: |
mv Android/Android/libs/arm64-v8a/libEffekseerUnity.so Dev/Plugin/Assets/Effekseer/Plugins/Android/libs/arm64-v8a/
Expand All @@ -217,6 +259,7 @@ jobs:
mv WebGL_1-38/WebGL/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/
mv WebGL_2-0-19/WebGL/2.0.19-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/2.0.19-64bit/
mv WebGL_3-1-8/WebGL/3.1.8-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/3.1.8-64bit/
mv WebGL_3-1-38/WebGL/3.1.38-64bit/libEffekseerUnity.bc Dev/Plugin/Assets/Effekseer/Plugins/WebGL/3.1.38-64bit/
mv Windows/x86/EffekseerUnity.dll Dev/Plugin/Assets/Effekseer/Plugins/x86/
mv Windows/x86_64/EffekseerUnity.dll Dev/Plugin/Assets/Effekseer/Plugins/x86_64/
- name: Upload math result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ public class EffekseerPluginSwitcher
{
static readonly string tempFilePath = "Temp/EffekseerPluginSwitcher";

#if UNITY_2022_2_OR_NEWER
#if UNITY_2023_2_OR_NEWER
static readonly string bcPath = "WebGL/3.1.38-64bit/libEffekseerUnity.bc";
#elif UNITY_2022_2_OR_NEWER
static readonly string bcPath = "WebGL/3.1.8-64bit/libEffekseerUnity.bc";
#elif UNITY_2021_2_OR_NEWER
static readonly string bcPath = "WebGL/2.0.19-64bit/libEffekseerUnity.bc";
Expand Down
8 changes: 8 additions & 0 deletions Dev/Plugin/Assets/Effekseer/Plugins/WebGL/3.1.38-64bit.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6207e26

Please sign in to comment.