Compare commits

..

11 Commits

Author SHA1 Message Date
semantic-release-bot 91e5be706d chore(release): 5.5.2 [skip ci]
## [5.5.2](https://github.com/mob-sakai/UIEffect/compare/5.5.1...5.5.2) (2025-02-28)

### Bug Fixes

* `PlayOnEnable.Reverse` in UIEffectTweener does not work ([3f5a7dc](https://github.com/mob-sakai/UIEffect/commit/3f5a7dcd2d8248b9e47fb9d38c083f26b798e063)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
* `TransitionFilter` and `GradationMode` do not work correctly when the initial scale is 0 ([bdbf293](https://github.com/mob-sakai/UIEffect/commit/bdbf293c1489c0b248078969b37ec66890620d44)), closes [#311](https://github.com/mob-sakai/UIEffect/issues/311)
* component icons will no longer be displayed in the scene view (Unity 2021.2 or later) ([40ff828](https://github.com/mob-sakai/UIEffect/commit/40ff828ff0697dc8f6597cfcf094cc63532a19dd))
* fix potential issues ([a748adf](https://github.com/mob-sakai/UIEffect/commit/a748adf1bde5e400fcc84ec902a1438867105f75))
* reset time button does not work correctly in the inspector when `UIEffectTweener.direction=Reverse` in the editor ([8513970](https://github.com/mob-sakai/UIEffect/commit/8513970e6f71d393430a573bfb0207428998bee1)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
2025-02-28 09:04:55 +00:00
mob-sakai 8513970e6f fix: reset time button does not work correctly in the inspector when UIEffectTweener.direction=Reverse in the editor
close #310
2025-02-28 17:37:37 +09:00
mob-sakai 3f5a7dcd2d fix: PlayOnEnable.Reverse in UIEffectTweener does not work
close #310
2025-02-27 18:41:37 +09:00
mob-sakai a748adf1bd fix: fix potential issues 2025-02-27 17:43:54 +09:00
mob-sakai 40ff828ff0 fix: component icons will no longer be displayed in the scene view (Unity 2021.2 or later) 2025-02-27 17:43:54 +09:00
mob-sakai bdbf293c14 fix: TransitionFilter and GradationMode do not work correctly when the initial scale is 0
close #311
2025-02-27 09:29:51 +09:00
semantic-release-bot 8155f94943 chore(release): 5.5.1 [skip ci]
## [5.5.1](https://github.com/mob-sakai/UIEffect/compare/5.5.0...5.5.1) (2025-02-14)

### Bug Fixes

* fix v4 compatible components ([6f6a8c9](https://github.com/mob-sakai/UIEffect/commit/6f6a8c95f878a290b1c4238cd0519f14febc04b6))
* fully visible when the transition rate is set to 1 ([0a99bb7](https://github.com/mob-sakai/UIEffect/commit/0a99bb7765443a84070e19c9ea0096808442932e)), closes [#309](https://github.com/mob-sakai/UIEffect/issues/309)
* UIEffect with TextMeshPro appears black in the editor when saving scene ([8cbcd76](https://github.com/mob-sakai/UIEffect/commit/8cbcd765ed9e11c38e3257191c2fc7dcd2c9916e))
2025-02-14 08:01:21 +00:00
mob-sakai 0a99bb7765 fix: fully visible when the transition rate is set to 1
close #309
2025-02-14 15:56:10 +09:00
mob-sakai 6b6ff3e1d8 chore: update demo 2025-02-14 15:56:10 +09:00
mob-sakai 8cbcd765ed fix: UIEffect with TextMeshPro appears black in the editor when saving scene 2025-02-14 15:56:10 +09:00
mob-sakai 6f6a8c95f8 fix: fix v4 compatible components 2025-02-14 15:56:10 +09:00
25 changed files with 272 additions and 67 deletions
+20
View File
@@ -1,3 +1,23 @@
## [5.5.2](https://github.com/mob-sakai/UIEffect/compare/5.5.1...5.5.2) (2025-02-28)
### Bug Fixes
* `PlayOnEnable.Reverse` in UIEffectTweener does not work ([3f5a7dc](https://github.com/mob-sakai/UIEffect/commit/3f5a7dcd2d8248b9e47fb9d38c083f26b798e063)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
* `TransitionFilter` and `GradationMode` do not work correctly when the initial scale is 0 ([bdbf293](https://github.com/mob-sakai/UIEffect/commit/bdbf293c1489c0b248078969b37ec66890620d44)), closes [#311](https://github.com/mob-sakai/UIEffect/issues/311)
* component icons will no longer be displayed in the scene view (Unity 2021.2 or later) ([40ff828](https://github.com/mob-sakai/UIEffect/commit/40ff828ff0697dc8f6597cfcf094cc63532a19dd))
* fix potential issues ([a748adf](https://github.com/mob-sakai/UIEffect/commit/a748adf1bde5e400fcc84ec902a1438867105f75))
* reset time button does not work correctly in the inspector when `UIEffectTweener.direction=Reverse` in the editor ([8513970](https://github.com/mob-sakai/UIEffect/commit/8513970e6f71d393430a573bfb0207428998bee1)), closes [#310](https://github.com/mob-sakai/UIEffect/issues/310)
## [5.5.1](https://github.com/mob-sakai/UIEffect/compare/5.5.0...5.5.1) (2025-02-14)
### Bug Fixes
* fix v4 compatible components ([6f6a8c9](https://github.com/mob-sakai/UIEffect/commit/6f6a8c95f878a290b1c4238cd0519f14febc04b6))
* fully visible when the transition rate is set to 1 ([0a99bb7](https://github.com/mob-sakai/UIEffect/commit/0a99bb7765443a84070e19c9ea0096808442932e)), closes [#309](https://github.com/mob-sakai/UIEffect/issues/309)
* UIEffect with TextMeshPro appears black in the editor when saving scene ([8cbcd76](https://github.com/mob-sakai/UIEffect/commit/8cbcd765ed9e11c38e3257191c2fc7dcd2c9916e))
# [5.5.0](https://github.com/mob-sakai/UIEffect/compare/5.4.0...5.5.0) (2025-02-12)
+9 -1
View File
@@ -77,7 +77,7 @@ namespace Coffee.UIEffects.Editors
var rResetTimeButton = new Rect(r.x, r.y, 20, r.height);
if (GUI.Button(rResetTimeButton, EditorGUIUtility.IconContent("animation.firstkey"), "IconButton"))
{
SetTime(0);
ResetTime();
}
var rPlayButton = new Rect(r.x + 20, r.y, 20, r.height);
@@ -149,6 +149,14 @@ namespace Coffee.UIEffects.Editors
}
}
private void ResetTime()
{
foreach (var tweener in targets.OfType<UIEffectTweener>())
{
tweener.ResetTime(tweener.direction);
}
}
private void SetPlaying(bool enable)
{
if (!EditorApplication.isPlaying)
@@ -204,7 +204,7 @@ namespace Coffee.UIEffectInternal
target.enabled = false;
// Find MonoScript of the specified component.
foreach (var script in Resources.FindObjectsOfTypeAll<MonoScript>())
foreach (var script in MonoImporter.GetAllRuntimeMonoScripts())
{
if (script.GetClass() != typeof(T))
{
@@ -3,11 +3,16 @@ using System.Diagnostics;
using UnityEditor;
using UnityEngine;
using Object = UnityEngine.Object;
#if UNITY_EDITOR && UNITY_2021_2_OR_NEWER
#if UNITY_EDITOR
using System.IO;
using System.Linq;
using System.Reflection;
#if UNITY_2021_2_OR_NEWER
using UnityEditor.SceneManagement;
#elif UNITY_EDITOR
#else
using UnityEditor.Experimental.SceneManagement;
#endif
#endif
namespace Coffee.UIEffectInternal
{
@@ -72,5 +77,56 @@ namespace Coffee.UIEffectInternal
public static bool isBatchOrBuilding => Application.isBatchMode || BuildPipeline.isBuildingPlayer;
#endif
[Conditional("UNITY_EDITOR")]
public static void QueuePlayerLoopUpdate()
{
#if UNITY_EDITOR
if (!EditorApplication.isPlaying)
{
EditorApplication.QueuePlayerLoopUpdate();
}
#endif
}
}
#if !UNITY_2021_2_OR_NEWER
[AttributeUsage(AttributeTargets.Class)]
[Conditional("UNITY_EDITOR")]
internal class IconAttribute : Attribute
{
private readonly string _path;
public IconAttribute(string path)
{
_path = path;
}
#if UNITY_EDITOR
private static Action<Object, Texture2D> s_SetIconForObject = typeof(EditorGUIUtility)
.GetMethod("SetIconForObject", BindingFlags.Static | BindingFlags.NonPublic)
.CreateDelegate(typeof(Action<Object, Texture2D>), null) as Action<Object, Texture2D>;
[InitializeOnLoadMethod]
private static void InitializeOnLoadMethod()
{
if (Misc.isBatchOrBuilding) return;
var types = TypeCache.GetTypesWithAttribute<IconAttribute>();
var scripts = MonoImporter.GetAllRuntimeMonoScripts();
foreach (var type in types)
{
var script = scripts.FirstOrDefault(x => x.GetClass() == type);
if (!script) continue;
var path = type.GetCustomAttribute<IconAttribute>()?._path;
var icon = AssetDatabase.LoadAssetAtPath<Texture2D>(path);
if (!icon) continue;
s_SetIconForObject(script, icon);
}
}
#endif
}
#endif
}
@@ -1,10 +1,12 @@
using System;
using System.Diagnostics;
using UnityEditor;
using UnityEngine;
namespace Coffee.UIEffectInternal
{
[AttributeUsage(AttributeTargets.Field)]
[Conditional("UNITY_EDITOR")]
public sealed class PowerRangeAttribute : PropertyAttribute
{
public readonly float min;
+4 -3
View File
@@ -5,6 +5,7 @@ using UnityEngine.Rendering;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
[ExecuteAlways]
[DisallowMultipleComponent]
public class UIEffect : UIEffectBase
@@ -1060,13 +1061,13 @@ namespace Coffee.UIEffects
c.gradationRotation = m_GradationRotation;
}
public override void ApplyContextToMaterial()
public override void ApplyContextToMaterial(Material material)
{
base.ApplyContextToMaterial();
base.ApplyContextToMaterial(material);
replicas.ForEach(c =>
{
if (!c) return;
c.ApplyContextToMaterial();
c.ApplyContextToMaterial(material);
});
}
+1 -1
View File
@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+45 -13
View File
@@ -1,3 +1,4 @@
using System;
using System.Runtime.CompilerServices;
using Coffee.UIEffectInternal;
using UnityEngine;
@@ -21,6 +22,7 @@ namespace Coffee.UIEffects
private Graphic _graphic;
private Material _material;
private UIEffectContext _context;
private Action _setVerticesDirtyIfVisible;
public Graphic graphic => _graphic ? _graphic : _graphic = GetComponent<Graphic>();
public virtual uint effectId => (uint)GetInstanceID();
@@ -52,6 +54,11 @@ namespace Coffee.UIEffects
protected override void OnDisable()
{
if (_setVerticesDirtyIfVisible != null)
{
UIExtraCallbacks.onBeforeCanvasRebuild -= _setVerticesDirtyIfVisible;
}
MaterialRepository.Release(ref _material);
SetMaterialDirty();
SetVerticesDirty();
@@ -59,6 +66,8 @@ namespace Coffee.UIEffects
protected override void OnDestroy()
{
_setVerticesDirtyIfVisible = null;
_graphic = null;
s_ContextPool.Return(ref _context);
}
@@ -70,7 +79,27 @@ namespace Coffee.UIEffects
{
if (!isActiveAndEnabled || context == null) return;
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
if (CanModifyMesh())
{
context.ModifyMesh(graphic, transitionRoot, vh, canModifyShape);
}
// If you can't modify the mesh, retry next frame.
else
{
UIExtraCallbacks.onBeforeCanvasRebuild += _setVerticesDirtyIfVisible ??= SetVerticesDirtyIfVisible;
}
}
private bool CanModifyMesh()
{
// The transitionRoot is same as the transform => true.
var root = transitionRoot;
if (transform == root) return true;
// The transitionRoot is not visible => false.
var scale1 = root.lossyScale;
var scale2 = transform.lossyScale;
return !Mathf.Approximately(scale1.x * scale1.y * scale2.x * scale2.y, 0);
}
public virtual Material GetModifiedMaterial(Material baseMaterial)
@@ -98,7 +127,7 @@ namespace Coffee.UIEffects
Profiler.EndSample();
}
ApplyContextToMaterial();
ApplyContextToMaterial(_material);
Profiler.EndSample();
return _material;
}
@@ -107,14 +136,8 @@ namespace Coffee.UIEffects
protected override void OnValidate()
{
UpdateContext(context);
ApplyContextToMaterial();
SetVerticesDirty();
SetMaterialDirty();
if (!EditorApplication.isPlaying)
{
EditorApplication.QueuePlayerLoopUpdate();
}
}
protected override void Reset()
@@ -141,13 +164,22 @@ namespace Coffee.UIEffects
if (graphic)
{
graphic.SetVerticesDirty();
GraphicProxy.Find(graphic).SetVerticesDirty(graphic);
GraphicProxy.Find(graphic).SetVerticesDirty(graphic, enabled);
#if UNITY_EDITOR
EditorApplication.QueuePlayerLoopUpdate();
#endif
}
}
private void SetVerticesDirtyIfVisible()
{
if (CanModifyMesh())
{
UIExtraCallbacks.onBeforeCanvasRebuild -= _setVerticesDirtyIfVisible ??= SetVerticesDirtyIfVisible;
SetVerticesDirty();
}
}
public virtual void SetMaterialDirty()
{
if (graphic)
@@ -161,14 +193,14 @@ namespace Coffee.UIEffects
protected abstract void UpdateContext(UIEffectContext c);
public virtual void ApplyContextToMaterial()
public virtual void ApplyContextToMaterial(Material material)
{
if (!isActiveAndEnabled || context == null) return;
if (!isActiveAndEnabled || context == null || !material) return;
context.ApplyToMaterial(_material, actualSamplingScale);
context.ApplyToMaterial(material, actualSamplingScale);
#if UNITY_EDITOR
UIEffectProjectSettings.shaderRegistry.RegisterVariant(_material, "UI > UIEffect");
UIEffectProjectSettings.shaderRegistry.RegisterVariant(material, "UI > UIEffect");
if (!EditorApplication.isPlaying)
{
EditorApplication.QueuePlayerLoopUpdate();
+6 -2
View File
@@ -462,8 +462,12 @@ namespace Coffee.UIEffects
if (transitionRoot)
{
rect = transitionRoot.rect;
rectMatrix = transitionRoot.worldToLocalMatrix
* graphic.transform.localToWorldMatrix;
if (transitionRoot != graphic.transform)
{
rectMatrix = transitionRoot.worldToLocalMatrix
* graphic.transform.localToWorldMatrix;
}
rot *= Matrix4x4.Scale(new Vector3(1 / multiplier, 1 / multiplier, 1))
* rectMatrix;
}
@@ -8,6 +8,7 @@ using UnityEngine;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
public class UIEffectProjectSettings : PreloadedProjectSettings<UIEffectProjectSettings>
{
[Tooltip(
@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+3 -2
View File
@@ -3,6 +3,7 @@ using UnityEngine;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
public class UIEffectReplica : UIEffectBase
{
[SerializeField] private UIEffect m_Target;
@@ -107,11 +108,11 @@ namespace Coffee.UIEffects
{
}
public override void ApplyContextToMaterial()
public override void ApplyContextToMaterial(Material material)
{
if (!isActiveAndEnabled || !target || !target.isActiveAndEnabled) return;
base.ApplyContextToMaterial();
base.ApplyContextToMaterial(material);
}
public override void SetRate(float rate, UIEffectTweener.CullingMask mask)
+1 -1
View File
@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+17 -3
View File
@@ -1,10 +1,12 @@
using System;
using Coffee.UIEffectInternal;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Serialization;
namespace Coffee.UIEffects
{
[Icon("Packages/com.coffee.ui-effect/Editor/UIEffectIconIcon.png")]
[ExecuteAlways]
[RequireComponent(typeof(UIEffectBase))]
public class UIEffectTweener : MonoBehaviour
@@ -343,7 +345,7 @@ namespace Coffee.UIEffects
{
if (resetTime)
{
ResetTime();
ResetTime(direction);
}
Play();
@@ -363,7 +365,7 @@ namespace Coffee.UIEffects
{
if (resetTime)
{
ResetTime();
ResetTime(Direction.Forward);
}
PlayForward();
@@ -384,7 +386,7 @@ namespace Coffee.UIEffects
{
if (resetTime)
{
ResetTime();
ResetTime(Direction.Reverse);
}
PlayReverse();
@@ -417,6 +419,18 @@ namespace Coffee.UIEffects
SetTime(0);
}
public void ResetTime(Direction dir)
{
if (dir == Direction.Forward)
{
SetTime(0);
}
else
{
SetTime(totalTime - 0.0001f);
}
}
[Obsolete(
"UIEffectTweener.Restart has been deprecated. Use UIEffectTweener.ResetTime instead (UnityUpgradable) -> ResetTime")]
public void Restart()
+1 -1
View File
@@ -5,7 +5,7 @@ MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 5b93acc4527c740459bbfbd3404191be, type: 3}
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -68,7 +68,7 @@ namespace Coffee.UIEffects
}
}
public virtual void SetVerticesDirty(Graphic graphic)
public virtual void SetVerticesDirty(Graphic graphic, bool enabled)
{
}
+24 -3
View File
@@ -53,11 +53,19 @@ namespace Coffee.UIEffects
}
}
public override void SetVerticesDirty(Graphic graphic)
public override void SetVerticesDirty(Graphic graphic, bool enabled)
{
if (graphic is TextMeshProUGUI textMeshProUGUI && textMeshProUGUI.isActiveAndEnabled)
{
OnChangeText(textMeshProUGUI);
if (enabled)
{
OnChangeText(textMeshProUGUI);
}
else if (0 < textMeshProUGUI.textInfo?.meshInfo?.Length
&& 0 < textMeshProUGUI.textInfo.meshInfo[0].vertexCount)
{
textMeshProUGUI.UpdateVertexData();
}
}
}
@@ -174,6 +182,20 @@ namespace Coffee.UIEffects
s_ChangedInstances.Clear();
};
#if UNITY_EDITOR
UnityEditor.SceneManagement.EditorSceneManager.sceneSaved += _ =>
{
foreach (var textMeshProUGUI in s_RegisteredInstances)
{
if (!textMeshProUGUI || !textMeshProUGUI.isActiveAndEnabled) continue;
if (textMeshProUGUI.TryGetComponent<UIEffect>(out var effect) && effect.isActiveAndEnabled)
{
effect.SetMaterialDirty();
}
}
};
#endif
}
private static void OnChangeText(Object obj)
@@ -236,7 +258,6 @@ namespace Coffee.UIEffects
}
s_VertexHelper.FillMesh(s_Mesh);
replica.ApplyContextToMaterial();
subMeshUI.canvasRenderer.SetMesh(s_Mesh);
}
else
@@ -261,6 +261,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -298,6 +300,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -506,6 +509,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -543,6 +548,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -746,6 +752,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -783,6 +791,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -918,7 +927,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 413777962}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bcd162ab5f95d4f82a841acc1e950418, type: 3}
m_Name:
@@ -1273,6 +1282,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -1310,6 +1321,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -1453,6 +1465,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -1490,6 +1504,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -1749,6 +1764,8 @@ MonoBehaviour:
m_GradationMode: 2
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 0, b: 0, a: 1}
@@ -1786,6 +1803,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -1926,6 +1944,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -1963,6 +1983,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -2623,6 +2644,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -2660,6 +2683,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -2897,6 +2921,8 @@ MonoBehaviour:
m_GradationMode: 2
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 0, b: 0, a: 1}
@@ -2934,6 +2960,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -3507,6 +3534,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -3544,6 +3573,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -3912,6 +3942,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -3949,6 +3981,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -4229,6 +4262,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -4266,6 +4301,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -4540,6 +4576,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -4577,6 +4615,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -4865,7 +4904,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 1947276361}
m_Direction: 2
m_Value: 1
m_Size: 0.5139664
m_Size: 0.73004
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
@@ -5237,6 +5276,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -5274,6 +5315,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -5618,6 +5660,8 @@ MonoBehaviour:
m_GradationMode: 0
m_GradationColor1: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor2: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor3: {r: 1, g: 1, b: 1, a: 1}
m_GradationColor4: {r: 1, g: 1, b: 1, a: 1}
m_GradationGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
@@ -5655,6 +5699,7 @@ MonoBehaviour:
m_EdgeWidth: 0.5
m_EdgeColorFilter: 4
m_EdgeColor: {r: 1, g: 1, b: 1, a: 1}
m_EdgeShinyRate: 0.5
m_EdgeShinyWidth: 0.5
m_EdgeShinyAutoPlaySpeed: 1
m_PatternArea: 1
@@ -66,7 +66,7 @@ namespace Coffee.UIEffects
m_EffectFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -83,7 +83,7 @@ namespace Coffee.UIEffects
m_Width = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -100,7 +100,7 @@ namespace Coffee.UIEffects
m_Softness = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -116,7 +116,7 @@ namespace Coffee.UIEffects
m_Color = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -133,7 +133,7 @@ namespace Coffee.UIEffects
m_TransitionTexture = value;
UpdateContext(context);
SetVerticesDirty();
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -171,7 +171,7 @@ namespace Coffee.UIEffects
m_ColorMode = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -61,7 +61,7 @@ namespace Coffee.UIEffects
m_EffectFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -78,7 +78,7 @@ namespace Coffee.UIEffects
m_ColorFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -95,7 +95,7 @@ namespace Coffee.UIEffects
m_BlurFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -112,7 +112,7 @@ namespace Coffee.UIEffects
m_EffectMode = value;
UpdateContext(context);
SetVerticesDirty();
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -128,7 +128,7 @@ namespace Coffee.UIEffects
m_ColorMode = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -145,7 +145,7 @@ namespace Coffee.UIEffects
UpdateContext(context);
SetVerticesDirty();
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -48,7 +48,7 @@ namespace Coffee.UIEffects
m_TargetColor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -65,7 +65,7 @@ namespace Coffee.UIEffects
m_Range = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -82,7 +82,7 @@ namespace Coffee.UIEffects
m_Saturation = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -99,7 +99,7 @@ namespace Coffee.UIEffects
m_Value = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -116,7 +116,7 @@ namespace Coffee.UIEffects
m_Hue = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -54,7 +54,7 @@ namespace Coffee.UIEffects
m_EffectFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -71,7 +71,7 @@ namespace Coffee.UIEffects
m_Width = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -88,7 +88,7 @@ namespace Coffee.UIEffects
m_Softness = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -105,7 +105,7 @@ namespace Coffee.UIEffects
m_Brightness = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -122,7 +122,7 @@ namespace Coffee.UIEffects
m_Gloss = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -71,7 +71,7 @@ namespace Coffee.UIEffects
m_EffectFactor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -88,7 +88,7 @@ namespace Coffee.UIEffects
m_TransitionTexture = value;
UpdateContext(context);
SetVerticesDirty();
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -104,7 +104,7 @@ namespace Coffee.UIEffects
m_EffectMode = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -137,7 +137,7 @@ namespace Coffee.UIEffects
m_DissolveWidth = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -154,7 +154,7 @@ namespace Coffee.UIEffects
m_DissolveSoftness = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
@@ -170,7 +170,7 @@ namespace Coffee.UIEffects
m_DissolveColor = value;
UpdateContext(context);
ApplyContextToMaterial();
SetMaterialDirty();
}
}
+1 -1
View File
@@ -65,7 +65,7 @@ float2 texel_size()
float transition_rate()
{
return frac(_TransitionAutoPlaySpeed * _Time.y + _TransitionRate);
return frac(_TransitionAutoPlaySpeed * _Time.y + _TransitionRate * 0.9999);
}
float3 rgb_to_hsv(float3 c)
+1 -1
View File
@@ -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.5.0",
"version": "5.5.2",
"unity": "2020.3",
"license": "MIT",
"repository": {