Table of Contents

Class UIViewport

Namespace
PAC.UI
public class UIViewport : MonoBehaviour
Inheritance
UIViewport

Fields

boundScrollToContents

public bool boundScrollToContents

Field Value

bool

maxScrollAmount

public float maxScrollAmount

Field Value

float

maxScrollEnabled

public bool maxScrollEnabled

Field Value

bool

minScrollAmount

public float minScrollAmount

Field Value

float

minScrollEnabled

public bool minScrollEnabled

Field Value

bool

scrollDirection

public ScrollDirection scrollDirection

Field Value

ScrollDirection

Properties

collider

public BoxCollider2D collider { get; }

Property Value

BoxCollider2D

defaultScrollSide

public ViewportSide defaultScrollSide { get; }

Property Value

ViewportSide

rectTransform

public RectTransform rectTransform { get; }

Property Value

RectTransform

scrollAmount

public float scrollAmount { get; }

Property Value

float

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