You've already forked ParticleEffectForUGUI
mirror of
https://github.com/mob-sakai/ParticleEffectForUGUI.git
synced 2026-06-30 12:43:52 +00:00
Compare commits
2 Commits
16ab8d7bb8
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87dca448ce | ||
|
|
e19638f0ec |
@@ -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)
|
## [4.13.1](https://github.com/mob-sakai/ParticleEffectForUGUI/compare/v4.13.0...v4.13.1) (2026-06-26)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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": "4.13.1",
|
"version": "4.13.2",
|
||||||
"unity": "2018.2",
|
"unity": "2018.2",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
Reference in New Issue
Block a user