mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 70937d2ce3 | |||
| 4a4e50e01f | |||
| 815162eab9 | |||
| 7fc0c7364d | |||
| 20e7f2fa61 | |||
| 1b292febb7 | |||
| 6b79864a39 | |||
| 4e30651290 | |||
| 87760570ec | |||
| ef7ac0aaad | |||
| 2fd87e909a | |||
| 2cc5c5b68e | |||
| 4a8d341625 |
@@ -4,7 +4,7 @@
|
||||
"com.coffee.minimal-resource": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/MinimalResource",
|
||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"com.unity.ide.rider": "3.0.36",
|
||||
"com.unity.ide.rider": "3.0.38",
|
||||
"com.unity.test-framework": "1.1.33",
|
||||
"com.unity.textmeshpro": "3.0.9",
|
||||
"com.unity.modules.animation": "1.0.0"
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.36",
|
||||
"version": "3.0.38",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,3 +1,45 @@
|
||||
## [5.10.8](https://github.com/mob-sakai/UIEffect/compare/5.10.7...5.10.8) (2026-01-16)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Canvas not properly cached when objects are outside Canvas ([4a4e50e](https://github.com/mob-sakai/UIEffect/commit/4a4e50e01fb50925352c73b27901024494ae933c))
|
||||
|
||||
## [5.10.7](https://github.com/mob-sakai/UIEffect/compare/5.10.6...5.10.7) (2025-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* support Unity 6000.4 ([7fc0c73](https://github.com/mob-sakai/UIEffect/commit/7fc0c7364d8dc39e26eac3c3b79797b139f09817))
|
||||
|
||||
## [5.10.6](https://github.com/mob-sakai/UIEffect/compare/5.10.5...5.10.6) (2025-12-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* fixed an issue where shader variants were not registered automatically ([6b79864](https://github.com/mob-sakai/UIEffect/commit/6b79864a394d79e6ad13f64af1d521fab1f781a7)), closes [#383](https://github.com/mob-sakai/UIEffect/issues/383)
|
||||
|
||||
## [5.10.5](https://github.com/mob-sakai/UIEffect/compare/5.10.4...5.10.5) (2025-11-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* graphic disappears when changing filters from code ([8776057](https://github.com/mob-sakai/UIEffect/commit/87760570ec7f4e2ca395cfaa0d2ab5d28c9cf9f3)), closes [#382](https://github.com/mob-sakai/UIEffect/issues/382)
|
||||
|
||||
## [5.10.4](https://github.com/mob-sakai/UIEffect/compare/5.10.3...5.10.4) (2025-10-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove `sealed` from `UIEffect` and `UIEffectReplica` ([2fd87e9](https://github.com/mob-sakai/UIEffect/commit/2fd87e909af65bf88a9c39cd157dfb06a56b3af0)), closes [#379](https://github.com/mob-sakai/UIEffect/issues/379)
|
||||
|
||||
## [5.10.3](https://github.com/mob-sakai/UIEffect/compare/5.10.2...5.10.3) (2025-10-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* displays as black rectangle when opening editor ([4a8d341](https://github.com/mob-sakai/UIEffect/commit/4a8d341625f73d70c512f7e6f0b864be1adbf459)), closes [#376](https://github.com/mob-sakai/UIEffect/issues/376)
|
||||
|
||||
## [5.10.2](https://github.com/mob-sakai/UIEffect/compare/5.10.1...5.10.2) (2025-10-16)
|
||||
|
||||
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace Coffee.UIEffectInternal
|
||||
_sb.Length--; // Remove last space.
|
||||
}
|
||||
|
||||
var hash = new Hash128((uint)shader.GetInstanceID(), (uint)_sb.GetHashCode(), 0, 0);
|
||||
var hash = new Hash128((uint)shader.GetInstanceID(), (uint)GetContentsHash(_sb), 0, 0);
|
||||
if (_cachedVariants.TryGetValue(hash, out var result))
|
||||
{
|
||||
Profiler.EndSample();
|
||||
@@ -288,6 +288,17 @@ namespace Coffee.UIEffectInternal
|
||||
Profiler.EndSample();
|
||||
return (variant, pair);
|
||||
}
|
||||
|
||||
private static int GetContentsHash(StringBuilder sb)
|
||||
{
|
||||
var hash = 17;
|
||||
for (var i = 0; i < sb.Length; i++)
|
||||
{
|
||||
hash = unchecked(hash * 31 + sb[i]);
|
||||
}
|
||||
|
||||
return hash;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Coffee.UIEffects
|
||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
||||
[ExecuteAlways]
|
||||
[DisallowMultipleComponent]
|
||||
public sealed class UIEffect : UIEffectBase
|
||||
public class UIEffect : UIEffectBase
|
||||
{
|
||||
[SerializeField]
|
||||
protected ToneFilter m_ToneFilter = ToneFilter.None;
|
||||
@@ -282,6 +282,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_ToneFilter == value) return;
|
||||
context.m_ToneFilter = m_ToneFilter = value;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -311,6 +312,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_ColorFilter == value) return;
|
||||
context.m_ColorFilter = m_ColorFilter = value;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -794,6 +796,7 @@ namespace Coffee.UIEffects
|
||||
(m_SrcBlendMode, m_DstBlendMode) = (m_BlendType, m_SrcBlendMode, m_DstBlendMode).Convert();
|
||||
context.m_SrcBlendMode = m_SrcBlendMode;
|
||||
context.m_DstBlendMode = m_DstBlendMode;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -810,6 +813,7 @@ namespace Coffee.UIEffects
|
||||
if (m_SrcBlendMode == value) return;
|
||||
context.m_SrcBlendMode = m_SrcBlendMode = value;
|
||||
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -826,6 +830,7 @@ namespace Coffee.UIEffects
|
||||
if (m_DstBlendMode == value) return;
|
||||
context.m_DstBlendMode = m_DstBlendMode = value;
|
||||
m_BlendType = (m_SrcBlendMode, m_DstBlendMode).Convert();
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -838,6 +843,7 @@ namespace Coffee.UIEffects
|
||||
if (m_ShadowMode == value) return;
|
||||
context.m_ShadowMode = m_ShadowMode = value;
|
||||
SetVerticesDirty();
|
||||
SetVerticesDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1013,6 +1019,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_EdgeMode == value) return;
|
||||
context.m_EdgeMode = m_EdgeMode = value;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -1182,6 +1189,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_GradationMode == value) return;
|
||||
context.m_GradationMode = m_GradationMode = value;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
@@ -1321,6 +1329,7 @@ namespace Coffee.UIEffects
|
||||
{
|
||||
if (m_DetailFilter == value) return;
|
||||
context.m_DetailFilter = m_DetailFilter = value;
|
||||
SetVerticesDirty();
|
||||
SetMaterialDirty();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,6 +52,7 @@ namespace Coffee.UIEffects
|
||||
if (!_canvas || !_canvas.isActiveAndEnabled)
|
||||
{
|
||||
_canvas = null;
|
||||
_canvasCached = false;
|
||||
}
|
||||
|
||||
return _canvas;
|
||||
|
||||
@@ -191,6 +191,15 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Refresh all UI Graphics in the opened scenes. (#376)
|
||||
EditorApplication.delayCall += () =>
|
||||
{
|
||||
foreach (var g in Misc.FindObjectsOfType<UnityEngine.UI.Graphic>())
|
||||
{
|
||||
g.SetAllDirty();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ using UnityEngine;
|
||||
namespace Coffee.UIEffects
|
||||
{
|
||||
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
|
||||
public sealed class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
|
||||
public class UIEffectReplica : UIEffectBase, ISerializationCallbackReceiver
|
||||
{
|
||||
[SerializeField] private UIEffect m_Target;
|
||||
[SerializeField] private UIEffectPreset m_Preset;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
using System;
|
||||
using UnityEditor.Rendering.BuiltIn.ShaderGraph;
|
||||
using UnityEditor.ShaderGraph;
|
||||
#if UNITY_6000_4_OR_NEWER
|
||||
using GUID = UnityEngine.GUID;
|
||||
#else
|
||||
using GUID = UnityEditor.GUID;
|
||||
#endif
|
||||
|
||||
namespace UnityEditor.Rendering.Universal.ShaderGraph
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "com.coffee.ui-effect",
|
||||
"displayName": "UI Effect",
|
||||
"description": "UIEffect is an open-source package that allows you to intuitively apply rich UI effects directly from the Inspector or via code.\nCombine various filters, such as grayscale, blur, and dissolve, to decorate your UI with a unique visual style!",
|
||||
"version": "5.10.2",
|
||||
"version": "5.10.8",
|
||||
"unity": "2020.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"com.coffee.nano-monitor": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/NanoMonitor",
|
||||
"com.coffee.symbolic-linker": "https://github.com/mob-sakai/Coffee.Internal.git?path=Packages/SymbolicLinker",
|
||||
"com.coffee.ui-effect": "file:../../Packages/src",
|
||||
"com.unity.ide.rider": "3.0.35",
|
||||
"com.unity.ide.rider": "3.0.38",
|
||||
"com.unity.render-pipelines.universal": "17.0.4",
|
||||
"com.unity.test-framework": "1.5.1",
|
||||
"com.unity.timeline": "1.8.8",
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.35",
|
||||
"version": "3.0.38",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user