Class UIViewport
public class UIViewport : MonoBehaviour
- Inheritance
-
UIViewport
Fields
boundScrollToContents
public bool boundScrollToContents
Field Value
maxScrollAmount
public float maxScrollAmount
Field Value
maxScrollEnabled
public bool maxScrollEnabled
Field Value
minScrollAmount
public float minScrollAmount
Field Value
minScrollEnabled
public bool minScrollEnabled
Field Value
scrollDirection
public ScrollDirection scrollDirection
Field Value
Properties
collider
public BoxCollider2D collider { get; }
Property Value
- BoxCollider2D
defaultScrollSide
public ViewportSide defaultScrollSide { get; }
Property Value
rectTransform
public RectTransform rectTransform { get; }
Property Value
- RectTransform
scrollAmount
public float scrollAmount { get; }
Property Value
scrollingArea
public Transform scrollingArea { get; }
Property Value
- Transform
Methods
AddScrollAmount(float)
public void AddScrollAmount(float scrollAmount)
Parameters
scrollAmount
float
GetScrollMinMaxX()
Get the min and max x value of the space that the objects in this viewport's scroll area occupy. (Scaled to the scale of the viewport object.)
public Vector2 GetScrollMinMaxX()
Returns
- Vector2
(min x, max x)
GetScrollMinMaxY()
Get the min and max y value of the space that the objects in this viewport's scroll area occupy. (Scaled to the scale of the viewport object.)
public Vector2 GetScrollMinMaxY()
Returns
- Vector2
(min y, max y)
RefreshViewport()
public void RefreshViewport()
SetScrollAmount(float)
public void SetScrollAmount(float scrollAmount)
Parameters
scrollAmount
float
SubscribeToRefresh(UnityAction)
public void SubscribeToRefresh(UnityAction call)
Parameters
call
UnityAction