You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-06-29 20:13:43 +00:00
Compare commits
5 Commits
5.0.0-prev
...
5.0.0-prev
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee2655d0cf | ||
|
|
69826078ec | ||
|
|
93e38622ee | ||
|
|
c9a97e41d5 | ||
|
|
dc120884f6 |
12
.github/workflows/test-urp.yml
vendored
12
.github/workflows/test-urp.yml
vendored
@@ -7,9 +7,9 @@ run-name: 🧪 Test URP (${{ github.event.pull_request.title || github.ref_name
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# MINIMUM_VERSION: The minimum version of Unity.
|
# MINIMUM_VERSION: The minimum version of Unity.
|
||||||
MINIMUM_VERSION: 6000.1
|
MINIMUM_VERSION: 6000.0
|
||||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
# 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
|
PROJECT_PATH: ParticleEffectForUGUI_URP
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -85,10 +85,10 @@ jobs:
|
|||||||
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Checkout ($${{ github.ref }})
|
- name: 🚚 Checkout ($${{ github.ref }})
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: 📥 Cache library
|
- name: 📥 Cache library
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ${{ env.PROJECT_PATH }}/Library
|
path: ${{ env.PROJECT_PATH }}/Library
|
||||||
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
@@ -97,7 +97,7 @@ jobs:
|
|||||||
${{ env.PROJECT_PATH }}-Library-
|
${{ env.PROJECT_PATH }}-Library-
|
||||||
|
|
||||||
- name: 🛠️ Build Unity Project (Test)
|
- name: 🛠️ Build Unity Project (Test)
|
||||||
uses: game-ci/unity-builder@v5
|
uses: game-ci/unity-builder@main
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
@@ -111,7 +111,7 @@ jobs:
|
|||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
# - name: 🧪 Run tests
|
# - name: 🧪 Run tests
|
||||||
# uses: game-ci/unity-test-runner@v4
|
# uses: game-ci/unity-test-runner@main
|
||||||
# timeout-minutes: 45
|
# timeout-minutes: 45
|
||||||
# with:
|
# with:
|
||||||
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
# customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
|
|||||||
13
.github/workflows/test.yml
vendored
13
.github/workflows/test.yml
vendored
@@ -7,7 +7,7 @@ run-name: 🧪 Test (${{ github.event.pull_request.title || github.ref_name }})
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
# MINIMUM_VERSION: The minimum version of Unity.
|
# MINIMUM_VERSION: The minimum version of Unity.
|
||||||
MINIMUM_VERSION: 2020.3
|
MINIMUM_VERSION: 2019.4
|
||||||
# EXCLUDE_FILTER: The excluded versions of Unity.
|
# EXCLUDE_FILTER: The excluded versions of Unity.
|
||||||
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
EXCLUDE_FILTER: "(2017|2018|2023.3)"
|
||||||
PROJECT_PATH: .
|
PROJECT_PATH: .
|
||||||
@@ -45,7 +45,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: 🔑 Secrets check
|
- name: 🔑 Secrets check
|
||||||
run: |
|
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: 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: 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
|
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) }}
|
unityVersion: ${{ fromJson(needs.setup.outputs.unityVersions) }}
|
||||||
steps:
|
steps:
|
||||||
- name: 🚚 Checkout ($${{ github.ref }})
|
- name: 🚚 Checkout ($${{ github.ref }})
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v7
|
||||||
|
|
||||||
- name: 📥 Cache library
|
- name: 📥 Cache library
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v6
|
||||||
with:
|
with:
|
||||||
path: ${{ env.PROJECT_PATH }}/Library
|
path: ${{ env.PROJECT_PATH }}/Library
|
||||||
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
key: ${{ env.PROJECT_PATH }}-Library-${{ matrix.unityVersion }}-${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
@@ -96,7 +97,7 @@ jobs:
|
|||||||
${{ env.PROJECT_PATH }}-Library-
|
${{ env.PROJECT_PATH }}-Library-
|
||||||
|
|
||||||
- name: 🛠️ Build Unity Project (Test)
|
- name: 🛠️ Build Unity Project (Test)
|
||||||
uses: game-ci/unity-builder@v5
|
uses: game-ci/unity-builder@main
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
@@ -110,7 +111,7 @@ jobs:
|
|||||||
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
|
||||||
|
|
||||||
- name: 🧪 Run tests
|
- name: 🧪 Run tests
|
||||||
uses: game-ci/unity-test-runner@v4
|
uses: game-ci/unity-test-runner@main
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
with:
|
with:
|
||||||
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
customImage: ghcr.io/mob-sakai/unity3d:${{ matrix.unityVersion }}
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# [5.0.0-preview.20](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.19...5.0.0-preview.20) (2026-06-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* support "disable domain reload" on Unity 6.6 or later ([dc12088](https://github.com/mob-sakai/ParticleEffectForUGUI/commit/dc120884f68a5fee1775d039fc7bca0ee0e404b5))
|
||||||
|
|
||||||
# [5.0.0-preview.19](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.18...5.0.0-preview.19) (2026-06-28)
|
# [5.0.0-preview.19](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/5.0.0-preview.18...5.0.0-preview.19) (2026-06-28)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -59,21 +59,6 @@ namespace Coffee.UIParticleInternal
|
|||||||
s_BuildingPlayer = false;
|
s_BuildingPlayer = false;
|
||||||
Initialize();
|
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()
|
private static void Initialize()
|
||||||
@@ -166,10 +151,6 @@ namespace Coffee.UIParticleInternal
|
|||||||
protected virtual void OnInitialize()
|
protected virtual void OnInitialize()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void OnDomainReload()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
internal abstract class PreloadedProjectSettingsEditor : Editor
|
internal abstract class PreloadedProjectSettingsEditor : Editor
|
||||||
@@ -255,11 +236,6 @@ namespace Coffee.UIParticleInternal
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnDomainReload()
|
|
||||||
{
|
|
||||||
s_Instance = null;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
public static T instance => s_Instance != null ? s_Instance : s_Instance = CreateInstance<T>();
|
public static T instance => s_Instance != null ? s_Instance : s_Instance = CreateInstance<T>();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Coffee.UIParticleInternal
|
namespace Coffee.UIParticleInternal
|
||||||
@@ -9,6 +10,7 @@ namespace Coffee.UIParticleInternal
|
|||||||
private static readonly Dictionary<Type, IFrameCache> s_Caches = new Dictionary<Type, IFrameCache>();
|
private static readonly Dictionary<Type, IFrameCache> s_Caches = new Dictionary<Type, IFrameCache>();
|
||||||
|
|
||||||
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
|
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
|
||||||
|
[InitializeOnLoadMethod]
|
||||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||||
#elif UNITY_EDITOR
|
#elif UNITY_EDITOR
|
||||||
[InitializeOnLoadMethod]
|
[InitializeOnLoadMethod]
|
||||||
|
|||||||
@@ -18,12 +18,6 @@ namespace Coffee.UIParticleInternal
|
|||||||
private static readonly FastAction s_OnScreenSizeChangedAction = new FastAction();
|
private static readonly FastAction s_OnScreenSizeChangedAction = new FastAction();
|
||||||
private static Vector2Int s_LastScreenSize;
|
private static Vector2Int s_LastScreenSize;
|
||||||
|
|
||||||
static UIExtraCallbacks()
|
|
||||||
{
|
|
||||||
Canvas.willRenderCanvases += OnBeforeCanvasRebuild;
|
|
||||||
Logger.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor");
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that occurs after canvas rebuilds.
|
/// Event that occurs after canvas rebuilds.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -72,7 +66,7 @@ namespace Coffee.UIParticleInternal
|
|||||||
CanvasUpdateRegistry.IsRebuildingLayout();
|
CanvasUpdateRegistry.IsRebuildingLayout();
|
||||||
#if TMP_ENABLE
|
#if TMP_ENABLE
|
||||||
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
|
// Explicitly set `Canvas.willRenderCanvases += TMP_UpdateManager.DoRebuilds`.
|
||||||
typeof(TMPro.TMP_UpdateManager)
|
var _ = typeof(TMPro.TMP_UpdateManager)
|
||||||
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
|
.GetProperty("instance", BindingFlags.NonPublic | BindingFlags.Static)
|
||||||
.GetValue(null);
|
.GetValue(null);
|
||||||
#endif
|
#endif
|
||||||
@@ -83,6 +77,7 @@ namespace Coffee.UIParticleInternal
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
|
#if UNITY_EDITOR && UNITY_2019_3_OR_NEWER
|
||||||
|
[InitializeOnLoadMethod]
|
||||||
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.SubsystemRegistration)]
|
||||||
#elif UNITY_EDITOR
|
#elif UNITY_EDITOR
|
||||||
[InitializeOnLoadMethod]
|
[InitializeOnLoadMethod]
|
||||||
@@ -91,9 +86,17 @@ namespace Coffee.UIParticleInternal
|
|||||||
#endif
|
#endif
|
||||||
private static void InitializeOnLoad()
|
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;
|
Canvas.willRenderCanvases -= OnAfterCanvasRebuild;
|
||||||
s_IsInitializedAfterCanvasRebuild = false;
|
s_IsInitializedAfterCanvasRebuild = false;
|
||||||
s_LastScreenSize = default;
|
s_LastScreenSize = default;
|
||||||
|
Logger.LogMulticast(typeof(Canvas), "willRenderCanvases", message: "ctor");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "com.coffee.ui-particle",
|
"name": "com.coffee.ui-particle",
|
||||||
"displayName": "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.",
|
"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": "5.0.0-preview.19",
|
"version": "5.0.0-preview.20",
|
||||||
"unity": "2019.3",
|
"unity": "2019.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user