NodeScript+ 导入了个 UI Extend

Signed-off-by: TRADER_FOER <lhf190@outlook.com>
This commit is contained in:
2026-05-23 21:05:16 +08:00
parent 7ea1f1d8c3
commit 51878f15ae
531 changed files with 198095 additions and 144473 deletions

View File

@@ -0,0 +1,17 @@
/// Credit Feaver1968
/// Sourced from - http://forum.unity3d.com/threads/scroll-to-the-bottom-of-a-scrollrect-in-code.310919/
namespace UnityEngine.UI.Extensions
{
public static class ScrollRectExtensions
{
public static void ScrollToTop(this ScrollRect scrollRect)
{
scrollRect.normalizedPosition = new Vector2(0, 1);
}
public static void ScrollToBottom(this ScrollRect scrollRect)
{
scrollRect.normalizedPosition = new Vector2(0, 0);
}
}
}