From d2ed80593ab55286a5fe40cd7db800a9a36ac41d Mon Sep 17 00:00:00 2001 From: hugoymh Date: Fri, 5 Sep 2025 18:00:41 +0800 Subject: [PATCH 1/2] Update CardPopup2D.cs add support for Unity 6 api --- Runtime/Scripts/Layout/CardUI/2D Cards/CardPopup2D.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Runtime/Scripts/Layout/CardUI/2D Cards/CardPopup2D.cs b/Runtime/Scripts/Layout/CardUI/2D Cards/CardPopup2D.cs index 14ce7899..a3c4c68d 100644 --- a/Runtime/Scripts/Layout/CardUI/2D Cards/CardPopup2D.cs +++ b/Runtime/Scripts/Layout/CardUI/2D Cards/CardPopup2D.cs @@ -57,8 +57,12 @@ void Update() { isFalling = false; rbody.useGravity = false; - rbody.velocity = Vector3.zero; - transform.position = new Vector3(0, 8, startZPos); +#if UNITY_6000_0_OR_NEWER + rbody.linearVelocity = Vector3.zero; +#else + rbody.velocity = Vector3.zero; +#endif + transform.position = new Vector3(0, 8, startZPos); if (singleScene) { CardEnter(); From 5db2ea6351ace3782d882fc50478f931ae7cc5fb Mon Sep 17 00:00:00 2001 From: hugoymh <34024260+hugoymh@users.noreply.github.com> Date: Mon, 17 Nov 2025 11:07:52 +0800 Subject: [PATCH 2/2] Gradient2.ModifyMesh Modify Mesh should respond to gradient key updates in inspector and runtime --- Runtime/Scripts/Effects/Gradient2.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Runtime/Scripts/Effects/Gradient2.cs b/Runtime/Scripts/Effects/Gradient2.cs index cbb0485d..c82bb0c7 100644 --- a/Runtime/Scripts/Effects/Gradient2.cs +++ b/Runtime/Scripts/Effects/Gradient2.cs @@ -475,7 +475,7 @@ List FindStops(float zoomOffset, Rect bounds, List stops) var startBoundary = zoomOffset - offset; var endBoundary = (1 - zoomOffset) - offset; - if (_colorKeys == null) _colorKeys = EffectGradient.colorKeys; + _colorKeys = EffectGradient.colorKeys; foreach (var color in _colorKeys) { @@ -485,7 +485,7 @@ List FindStops(float zoomOffset, Rect bounds, List stops) stops.Add((color.time - startBoundary) * Zoom); } - if (_alphaKeys == null) _alphaKeys = _effectGradient.alphaKeys; + _alphaKeys = _effectGradient.alphaKeys; foreach (var alpha in _alphaKeys) {