A component that allows for switching between multiple UI "views", where a view is different UI that needs to be switched between modally.
More...
|
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 () |
|
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.
◆ 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
-
view | The 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
-
◆ 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:
- Assets/Shopify/UIToolkit/Components/ViewSwitcher/ViewSwitcher.cs