mirror of
https://github.com/mob-sakai/UIEffect.git
synced 2026-11-20 01:42:37 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b2d70af9c3 | |||
| da535854cc | |||
| bc1578b0ca | |||
| d3779f9f57 |
@@ -1,3 +1,12 @@
|
||||
## [5.2.3](https://github.com/mob-sakai/UIEffect/compare/5.2.2...5.2.3) (2025-01-23)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `SamplingFilter.None` now correctly respects the sampling scale setting ([bc1578b](https://github.com/mob-sakai/UIEffect/commit/bc1578b0ca91b830b976bf200d387d0ac6963ae6))
|
||||
* fix the shadow mode inspector in editor ([da53585](https://github.com/mob-sakai/UIEffect/commit/da535854ccbeeb98b2556423425d39058bd5f479))
|
||||
* UIEffect may not work correctly when using `FallbackAtlas` with TextMeshProUGUI ([d3779f9](https://github.com/mob-sakai/UIEffect/commit/d3779f9f57d0410fa4526527ebed30885bfbc2dd)), closes [#298](https://github.com/mob-sakai/UIEffect/issues/298)
|
||||
|
||||
## [5.2.2](https://github.com/mob-sakai/UIEffect/compare/5.2.1...5.2.2) (2025-01-18)
|
||||
|
||||
|
||||
|
||||
@@ -256,6 +256,7 @@ namespace Coffee.UIEffects.Editors
|
||||
EditorGUILayout.Slider(_shadowDistanceX, 0, 1, "Reflection");
|
||||
EditorGUILayout.PropertyField(_shadowDistanceY, EditorGUIUtility.TrTempContent("Offset"));
|
||||
EditorGUILayout.PropertyField(_shadowMirrorScale);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,13 +268,14 @@ namespace Coffee.UIEffects.Editors
|
||||
|
||||
EditorGUILayout.PropertyField(_shadowDistance);
|
||||
EditorGUILayout.PropertyField(_shadowIteration);
|
||||
prevColorFilter = (ColorFilter)_shadowColorFilter.intValue;
|
||||
EditorGUILayout.PropertyField(_shadowColorFilter);
|
||||
DrawColor(_shadowColorFilter, _shadowColor, prevColorFilter, false);
|
||||
EditorGUILayout.PropertyField(_shadowColorGlow);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
}
|
||||
|
||||
EditorGUILayout.PropertyField(_shadowColorFilter);
|
||||
DrawColorPickerField(_shadowColor, false);
|
||||
EditorGUILayout.PropertyField(_shadowColorGlow);
|
||||
EditorGUILayout.PropertyField(_shadowFade);
|
||||
|
||||
// Shadow blur intensity
|
||||
switch ((SamplingFilter)_samplingFilter.intValue)
|
||||
{
|
||||
case SamplingFilter.BlurFast:
|
||||
|
||||
@@ -290,9 +290,7 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public override float actualSamplingScale => samplingFilter != SamplingFilter.None
|
||||
? Mathf.Clamp(m_SamplingScale, 0.01f, 100)
|
||||
: 1;
|
||||
public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
|
||||
|
||||
public override bool canModifyShape => m_AllowToModifyMeshShape;
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
else if (i - 1 < subMeshes.Count)
|
||||
{
|
||||
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material);
|
||||
var subMeshUI = GetSubMeshUI(subMeshes, meshInfo.material, i - 1);
|
||||
if (!target || !subMeshUI) break;
|
||||
|
||||
var replica = subMeshUI.GetOrAddComponent<UIEffectReplica>();
|
||||
@@ -285,11 +285,13 @@ namespace Coffee.UIEffects
|
||||
s_Mesh.Clear(false);
|
||||
}
|
||||
|
||||
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material)
|
||||
private static TMP_SubMeshUI GetSubMeshUI(List<TMP_SubMeshUI> subMeshes, Material material, int start)
|
||||
{
|
||||
for (var j = 0; j < subMeshes.Count; j++)
|
||||
var count = subMeshes.Count;
|
||||
for (var j = 0; j < count; j++)
|
||||
{
|
||||
if (subMeshes[j].sharedMaterial == material) return subMeshes[j];
|
||||
var s = subMeshes[(j + start + count) % count];
|
||||
if (s.sharedMaterial == material) return s;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -54,9 +54,7 @@ namespace Coffee.UIEffects
|
||||
}
|
||||
}
|
||||
|
||||
public override float actualSamplingScale => target && target.samplingFilter != SamplingFilter.None
|
||||
? Mathf.Clamp(m_SamplingScale, 0.01f, 100)
|
||||
: 1;
|
||||
public override float actualSamplingScale => Mathf.Clamp(m_SamplingScale, 0.01f, 100);
|
||||
|
||||
public override bool canModifyShape => m_AllowToModifyMeshShape;
|
||||
|
||||
|
||||
@@ -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.2.2",
|
||||
"version": "5.2.3",
|
||||
"unity": "2020.3",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user