mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 09:57:37 +02:00
Editor stuff
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user