From dc120884f68a5fee1775d039fc7bca0ee0e404b5 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Sun, 28 Jun 2026 13:28:24 +0900 Subject: [PATCH 1/3] fix: support "disable domain reload" on Unity 6.6 or later --- .../PreloadedProjectSettings.cs | 24 ------------------- .../Runtime/Internal/Utilities/FrameCache.cs | 2 ++ .../Internal/Utilities/UIExtraCallbacks.cs | 17 +++++++------ 3 files changed, 12 insertions(+), 31 deletions(-) diff --git a/Packages/src/Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs b/Packages/src/Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs index d5ef507..2636779 100644 --- a/Packages/src/Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs +++ b/Packages/src/Runtime/Internal/ProjectSettings/PreloadedProjectSettings.cs @@ -59,21 +59,6 @@ namespace Coffee.UIParticleInternal s_BuildingPlayer = false; Initialize(); } - -#if UNITY_2019_3_OR_NEWER - [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] - private static void OnDomainReload() - { - foreach (var t in TypeCache.GetTypesDerivedFrom(typeof(PreloadedProjectSettings<>))) - { - var defaultSettings = GetDefaultSettings(t); - if (defaultSettings != null) - { - defaultSettings.OnDomainReload(); - } - } - } -#endif } private static void Initialize() @@ -166,10 +151,6 @@ namespace Coffee.UIParticleInternal protected virtual void OnInitialize() { } - - protected virtual void OnDomainReload() - { - } } internal abstract class PreloadedProjectSettingsEditor : Editor @@ -255,11 +236,6 @@ namespace Coffee.UIParticleInternal break; } } - - protected override void OnDomainReload() - { - s_Instance = null; - } #else public static T instance => s_Instance != null ? s_Instance : s_Instance = CreateInstance(); #endif diff --git a/Packages/src/Runtime/Internal/Utilities/FrameCache.cs b/Packages/src/Runtime/Internal/Utilities/FrameCache.cs index ada0824..efc2d3a 100644 --- a/Packages/src/Runtime/Internal/Utilities/FrameCache.cs +++ b/Packages/src/Runtime/Internal/Utilities/FrameCache.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using UnityEditor; using UnityEngine; namespace Coffee.UIParticleInternal @@ -9,6 +10,7 @@ namespace Coffee.UIParticleInternal private static readonly Dictionary s_Caches = new Dictionary(); #if UNITY_EDITOR && UNITY_2019_3_OR_NEWER + [InitializeOnLoadMethod] [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] #elif UNITY_EDITOR [InitializeOnLoadMethod] diff --git a/Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs b/Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs index 038b114..587f0ed 100755 --- a/Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs +++ b/Packages/src/Runtime/Internal/Utilities/UIExtraCallbacks.cs @@ -18,12 +18,6 @@ namespace Coffee.UIParticleInternal private static readonly FastAction s_OnScreenSizeChangedAction = new FastAction(); private static Vector2Int s_LastScreenSize; - static UIExtraCallbacks() - { - Canvas.willRenderCanvases += OnBeforeCanvasRebuild; - Logger.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor"); - } - /// /// Event that occurs after canvas rebuilds. /// @@ -72,7 +66,7 @@ namespace Coffee.UIParticleInternal CanvasUpdateRegistry.IsRebuildingLayout(); #if TMP_ENABLE // Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`. - typeof(TMPro.TMP_UpdateManager) + var _ = typeof(TMPro.TMP_UpdateManager) .GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static) .GetValue(null); #endif @@ -83,6 +77,7 @@ namespace Coffee.UIParticleInternal } #if UNITY_EDITOR && UNITY_2019_3_OR_NEWER + [InitializeOnLoadMethod] [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)] #elif UNITY_EDITOR [InitializeOnLoadMethod] @@ -91,9 +86,17 @@ namespace Coffee.UIParticleInternal #endif private static void InitializeOnLoad() { +#if UNITY_2019_4 || UNITY_2020_2_OR_NEWER + Canvas.preWillRenderCanvases -= OnBeforeCanvasRebuild; + Canvas.preWillRenderCanvases += OnBeforeCanvasRebuild; +#else + Canvas.willRenderCanvases -= OnBeforeCanvasRebuild; + Canvas.willRenderCanvases += OnBeforeCanvasRebuild; +#endif Canvas.willRenderCanvases -= OnAfterCanvasRebuild; s_IsInitializedAfterCanvasRebuild = false; s_LastScreenSize = default; + Logger.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor"); } /// From c9a97e41d5352519d81962af8d328406c847cec1 Mon Sep 17 00:00:00 2001 From: mob-sakai <12690315+mob-sakai@users.noreply.github.com> Date: Sun, 28 Jun 2026 20:44:59 +0900 Subject: [PATCH 2/3] chore: update wf --- .github/workflows/release.yml | 6 +++--- .github/workflows/test-urp.yml | 12 ++++++------ .github/workflows/test.yml | 13 +++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fcc7bb..decebb3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,7 +27,7 @@ jobs: split_to: ${{ steps.summary.outputs.split_to }} steps: - name: ๐Ÿšš Checkout (${{ github.ref_name }}) - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: ๐Ÿ”– Run semantic release uses: cycjimmy/semantic-release-action@v6 @@ -67,7 +67,7 @@ jobs: contents: write steps: - name: ๐Ÿšš Checkout (${{ needs.release.outputs.merge_to }}) - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: ref: ${{ needs.release.outputs.merge_to }} fetch-depth: 0 @@ -88,7 +88,7 @@ jobs: contents: write steps: - name: ๐Ÿšš Checkout (${{ needs.release.outputs.tag }}) - uses: actions/checkout@v5 + uses: actions/checkout@v7 with: ref: ${{ needs.release.outputs.tag }} fetch-depth: 0 diff --git a/.github/workflows/test-urp.yml b/.github/workflows/test-urp.yml index ac8f55c..1a255d1 100644 --- a/.github/workflows/test-urp.yml +++ b/.github/workflows/test-urp.yml @@ -7,9 +7,9 @@ run-name: ๐Ÿงช Test URP (${{ github.event.pull_request.title || github.ref_name env: # MINIMUM_VERSION: The minimum version of Unity. - MINIMUM_VERSION: 6000.1 + MINIMUM_VERSION: 6000.0 # EXCLUDE_FILTER: The excluded versions of Unity. - EXCLUDE_FILTER: '(2020.2.0|2021.1|2023.3)' + EXCLUDE_FILTER: "(2017|2018|2023.3)" PROJECT_PATH: ParticleEffectForUGUI_URP on: @@ -85,10 +85,10 @@ jobs: unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }} steps: - name: ๐Ÿšš Checkout ($${{ github.ref }}) - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: ๐Ÿ“ฅ Cache library - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: ${{ env.PROJECT_PATH }}/Library key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }} @@ -97,7 +97,7 @@ jobs: ${{ env.PROJECT_PATH }}-Library- - name: ๐Ÿ› ๏ธ Build Unity Project (Test) - uses: game-ci/unity-builder@v5 + uses: game-ci/unity-builder@main timeout-minutes: 45 with: customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} @@ -111,7 +111,7 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} # - name: ๐Ÿงช Run tests - # uses: game-ci/unity-test-runner@v4 + # uses: game-ci/unity-test-runner@main # timeout-minutes: 45 # with: # customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9fa132e..028739c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ run-name: ๐Ÿงช Test (${{ github.event.pull_request.title || github.ref_name }}) env: # MINIMUM_VERSION: The minimum version of Unity. - MINIMUM_VERSION: 2020.3 + MINIMUM_VERSION: 2019.4 # EXCLUDE_FILTER: The excluded versions of Unity. EXCLUDE_FILTER: "(2017|2018|2023.3)" PROJECT_PATH: . @@ -45,7 +45,8 @@ jobs: steps: - name: ๐Ÿ”‘ Secrets check run: | - if [ -z "$UNITY_EMAIL" ] || [ -z "$UNITY_PASSWORD" ] || [ -z "UNITY_LICENSE" ]; then + echo "Checking secrets for ${{ github.actor }} ..." + if [ -z "$UNITY_EMAIL" ] || [ -z "$UNITY_PASSWORD" ] || [ -z "$UNITY_LICENSE" ]; then echo "Error: UNITY_EMAIL, UNITY_PASSWORD, and UNITY_LICENSE secrets must be set." | tee -a $GITHUB_STEP_SUMMARY >&2 echo "Error: See https://game.ci/docs/github/test-runner#basic-setup" | tee -a $GITHUB_STEP_SUMMARY >&2 echo "Error: Set the secrets at ${{ github.server_url }}/${{ github.repository }}/settings/secrets/actions" | tee -a $GITHUB_STEP_SUMMARY >&2 @@ -84,10 +85,10 @@ jobs: unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }} steps: - name: ๐Ÿšš Checkout ($${{ github.ref }}) - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: ๐Ÿ“ฅ Cache library - uses: actions/cache@v5 + uses: actions/cache@v6 with: path: ${{ env.PROJECT_PATH }}/Library key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }} @@ -96,7 +97,7 @@ jobs: ${{ env.PROJECT_PATH }}-Library- - name: ๐Ÿ› ๏ธ Build Unity Project (Test) - uses: game-ci/unity-builder@v5 + uses: game-ci/unity-builder@main timeout-minutes: 45 with: customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} @@ -110,7 +111,7 @@ jobs: UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }} - name: ๐Ÿงช Run tests - uses: game-ci/unity-test-runner@v4 + uses: game-ci/unity-test-runner@main timeout-minutes: 45 with: customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }} From 93e38622ee8a4d6fbecf0daa394040617ad38911 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 29 Jun 2026 05:12:05 +0000 Subject: [PATCH 3/3] chore(release): 4.13.2 [skip ci] ## [4.13.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.1...v4.13.2) (2026-06-29) ### Bug Fixes * support "disable domain reload" on Unity 6.6 or later ([dc12088](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/dc120884f68a5fee1775d039fc7bca0ee0e404b5)) --- Packages/src/CHANGELOG.md | 7 +++++++ Packages/src/package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Packages/src/CHANGELOG.md b/Packages/src/CHANGELOG.md index dc5d397..41a63e4 100644 --- a/Packages/src/CHANGELOG.md +++ b/Packages/src/CHANGELOG.md @@ -1,3 +1,10 @@ +## [4.13.2](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.1...v4.13.2) (2026-06-29) + + +### Bug Fixes + +* support "disable domain reload" on Unity 6.6 or later ([dc12088](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/dc120884f68a5fee1775d039fc7bca0ee0e404b5)) + ## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26) diff --git a/Packages/src/package.json b/Packages/src/package.json index 4f844c5..6f6f183 100644 --- a/Packages/src/package.json +++ b/Packages/src/package.json @@ -2,7 +2,7 @@ "name": "com.coffee.ui-particle", "displayName": "UI Particle", "description": "This package provides a component to render particle effects for uGUI.\nThe particle rendering is maskable and sortable, without the need for an extra Camera, RenderTexture, or Canvas.", - "version": "4.13.1", + "version": "4.13.2", "unity": "2018.2", "license": "MIT", "repository": {