Class ScrollbarValueSetter
Forces a scroolbar to a value over multiple frames. Often scrollbars will not stay at the right value when a recttransform is redrawn; this solves that problem.
Inheritance
System.Object
ScrollbarValueSetter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: GameKit.Dependencies.Utilities.Types
Assembly: GameKit.Dependencies.dll
Syntax
public class ScrollbarValueSetter
Constructors
ScrollbarValueSetter(Scrollbar, Int32)
Declaration
public ScrollbarValueSetter(Scrollbar sb, int fixFrames = 2)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.UI.Scrollbar | sb | |
System.Int32 | fixFrames |
Methods
LateUpdate()
Checks to fix scrollbar value. Should be called every frame.
Declaration
public void LateUpdate()
SetValue(Single)
Sets value of the scrollbar.
Declaration
public void SetValue(float value)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value |