From 55f57beed53683b404add83754cfcd8bee277d1b Mon Sep 17 00:00:00 2001 From: MpakobecEx Date: Sun, 1 Nov 2026 21:15:24 +0500 Subject: [PATCH] =?UTF-8?q?client:=20=D0=BE=D0=B4=D0=BD=D0=BE=20=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BB=D0=B5?= =?UTF-8?q?=D1=81=D0=B0=20=E2=80=94=20=D0=BE=D0=B4=D0=BD=D0=B0=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D0=BE=D1=81=D0=B0=20=D0=BA=D0=B0=D1=80=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - SmoothScrollRect нормализует величину колеса через Mathf.Sign: standalone присылает scrollDelta ≈ 6 за щелчок, из-за чего шаг 448 умножался на 6 (6 полос). - Проверки: EditMode 69/69, standalone собран. --- client/Assets/Vanguard/Runtime/UI/SmoothScrollRect.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/Assets/Vanguard/Runtime/UI/SmoothScrollRect.cs b/client/Assets/Vanguard/Runtime/UI/SmoothScrollRect.cs index 1d8baf3..eee32e5 100644 --- a/client/Assets/Vanguard/Runtime/UI/SmoothScrollRect.cs +++ b/client/Assets/Vanguard/Runtime/UI/SmoothScrollRect.cs @@ -27,8 +27,12 @@ namespace Vanguard.UI if (!_smooth) _target = content.anchoredPosition.y; + var direction = Mathf.Sign(eventData.scrollDelta.y); + if (Mathf.Approximately(direction, 0f)) + return; + var max = Mathf.Max(0f, content.rect.height - viewport.rect.height); - _target = Mathf.Clamp(_target - eventData.scrollDelta.y * WheelStep, 0f, max); + _target = Mathf.Clamp(_target - direction * WheelStep, 0f, max); velocity = Vector2.zero; _smooth = true; }