diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d1dd4eb..839c884 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,7 @@ env: MINIMUM_VERSION: 2019.4 # EXCLUDE_FILTER: The excluded versions of Unity. EXCLUDE_FILTER: "(2020.2.0|2021.1|2023.3)" + PROJECT_PATH: . on: workflow_dispatch: @@ -21,7 +22,7 @@ on: push: branches: - develop - - develop-preview + - "develop-*" tags: - "!*" paths-ignore: @@ -71,11 +72,11 @@ jobs: steps: - name: 🚚 Checkout ($${{ github.ref }}) if: github.event_name == 'push' - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: 🚚 Checkout pull request (pull_request_target) if: github.event_name == 'pull_request_target' - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 0 @@ -85,25 +86,27 @@ jobs: run: | git config user.name "GitHub Actions" git config user.email "actions@github.com" - git merge origin/${{ github.event.pull_request.base.ref }} --no-edit + git rebase ${{ github.event.pull_request.base.sha }} + git log --oneline -n 10 - name: 📥 Cache library uses: actions/cache@v4 with: - path: Library - key: Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }} + path: ${{ env.PROJECT_PATH }}/Library + key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }} restore-keys: | - Library-${{ matrix.unityVersion }}- - Library- + ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}- + ${{ env.PROJECT_PATH }}-Library- - name: 🛠️ Build Unity Project (Test) - uses: game-ci/unity-builder@v4 + uses: game-ci/unity-builder@main timeout-minutes: 45 with: customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} targetPlatform: StandaloneLinux64 allowDirtyBuild: true customParameters: -nographics + projectPath: ${{ env.PROJECT_PATH }} env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} @@ -118,6 +121,7 @@ jobs: customParameters: -nographics checkName: ${{ matrix.unityVersion }} Test Results githubToken: ${{ github.token }} + projectPath: ${{ env.PROJECT_PATH }} env: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }} diff --git a/Packages/src/Runtime/UIParticle.cs b/Packages/src/Runtime/UIParticle.cs index 3f4feb9..b24676a 100644 --- a/Packages/src/Runtime/UIParticle.cs +++ b/Packages/src/Runtime/UIParticle.cs @@ -17,7 +17,7 @@ namespace Coffee.UIExtensions /// /// Render maskable and sortable particle effect ,without Camera, RenderTexture or Canvas. /// - [Icon("Packages/com.coffee.ui-particle/Icons/UIParticleIcon.png")] + [Icon("Packages/com.coffee.ui-particle/Editor/UIParticleIcon.png")] [ExecuteAlways] [RequireComponent(typeof(RectTransform))] [RequireComponent(typeof(CanvasRenderer))] diff --git a/Packages/src/Runtime/UIParticleRenderer.cs b/Packages/src/Runtime/UIParticleRenderer.cs index fc1ea73..92cf049 100644 --- a/Packages/src/Runtime/UIParticleRenderer.cs +++ b/Packages/src/Runtime/UIParticleRenderer.cs @@ -15,7 +15,7 @@ using UnityEngine.UI; namespace Coffee.UIExtensions { - [Icon("Packages/com.coffee.ui-particle/Icons/UIParticleIcon.png")] + [Icon("Packages/com.coffee.ui-particle/Editor/UIParticleIcon.png")] [ExecuteAlways] [RequireComponent(typeof(RectTransform))] [RequireComponent(typeof(CanvasRenderer))] @@ -283,10 +283,6 @@ namespace Coffee.UIExtensions || !transform.lossyScale.GetScaled(_parent.scale3DForCalc).IsVisible() // Scale is not visible. || (!_particleSystem.IsAlive() && !_particleSystem.isPlaying) // No particle. || (_isTrail && !_particleSystem.trails.enabled) // Trail, but it is not enabled. -#if UNITY_2018_3_OR_NEWER - || canvasRenderer.GetInheritedAlpha() < - 0.01f // #102: Do not bake particle system to mesh when the alpha is zero. -#endif ) { Profiler.BeginSample("[UIParticleRenderer] Clear Mesh"); @@ -315,6 +311,13 @@ namespace Coffee.UIExtensions #endif { ResolveResolutionChange(psPos, scale); + + // fix: second and subsequent bursts not displayed when world simulation and non-looping. (#326) + if (!_particleSystem.IsLocalSpace() && !main.loop && _particleSystem.time == 0) + { + _delay = true; + } + Simulate(scale, _parent.isPaused || _delay); if (_delay && !_parent.isPaused)