Shopify SDK for Unity
Public Member Functions | Public Attributes | List of all members
Shopify.UIToolkit.ViewSwitcher Class Reference

A component that allows for switching between multiple UI "views", where a view is different UI that needs to be switched between modally. More...

Inheritance diagram for Shopify.UIToolkit.ViewSwitcher:

Public Member Functions

void RegisterView (RectTransform view)
 Called to add a view to the view switcher heirarchy and configure it for switching More...
 
void PushView (RectTransform view)
 Pushes a view to the top of the stack, making it the active view More...
 
void GoBack ()
 Pops the last view off the stack and navigates back to the previously pushed view More...
 
bool CanNavigateBack ()
 Are there enough views in the stack views to navigate back? More...
 
RectTransform ActiveView ()
 

Public Attributes

float AnimationDuration = 0.3f
 The duration of the animation. More...
 
RectTransform Container
 The parent element that contains all of the views you want to switch between More...
 

Detailed Description

A component that allows for switching between multiple UI "views", where a view is different UI that needs to be switched between modally.

In the Unity Buy SDK, we use this for the factory shops in order to switch between the cart/product list/product details views in the builtin multi product shops.

Member Function Documentation

◆ CanNavigateBack()

bool Shopify.UIToolkit.ViewSwitcher.CanNavigateBack ( )
inline

Are there enough views in the stack views to navigate back?

Returns
True if there are enough views to navigate backwards

◆ GoBack()

void Shopify.UIToolkit.ViewSwitcher.GoBack ( )
inline

Pops the last view off the stack and navigates back to the previously pushed view

◆ PushView()

void Shopify.UIToolkit.ViewSwitcher.PushView ( RectTransform  view)
inline

Pushes a view to the top of the stack, making it the active view

Parameters
viewThe rect transform of the UI that you want to push as a new view

◆ RegisterView()

void Shopify.UIToolkit.ViewSwitcher.RegisterView ( RectTransform  view)
inline

Called to add a view to the view switcher heirarchy and configure it for switching

Parameters
viewThe view to register

Member Data Documentation

◆ AnimationDuration

float Shopify.UIToolkit.ViewSwitcher.AnimationDuration = 0.3f

The duration of the animation.

◆ Container

RectTransform Shopify.UIToolkit.ViewSwitcher.Container

The parent element that contains all of the views you want to switch between


The documentation for this class was generated from the following file: