Class ToastManager
- Namespace
- ONITwitchLib
- Assembly
- ONITwitchLib.dll
Provides methods for creating toasts.
[PublicAPI]
public static class ToastManager
- Inheritance
-
ToastManager
- Inherited Members
Methods
InstantiateToast(string, string)
Creates a toast with a tile and a body.
[PublicAPI]
[CanBeNull]
public static GameObject InstantiateToast(string title, string body)
Parameters
Returns
- GameObject
The newly created toast's UnityEngine.GameObject.
InstantiateToastWithGoTarget(string, string, GameObject)
Creates a toast with a tile and a body, that selects a UnityEngine.GameObject when clicked.
[PublicAPI]
[CanBeNull]
public static GameObject InstantiateToastWithGoTarget(string title, string body, GameObject target)
Parameters
title
stringThe title text for the toast.
body
stringThe body text for the toast.
target
GameObjectThe UnityEngine.GameObject to target on click.
Returns
- GameObject
The newly created toast's UnityEngine.GameObject.
InstantiateToastWithGoTarget(string, string, GameObject, float)
Creates a toast with a tile and a body, that selects a UnityEngine.GameObject when clicked.
[PublicAPI]
[CanBeNull]
public static GameObject InstantiateToastWithGoTarget(string title, string body, GameObject target, float orthographicSize)
Parameters
title
stringThe title text for the toast.
body
stringThe body text for the toast.
target
GameObjectThe UnityEngine.GameObject to target on click.
orthographicSize
floatThe orthographic size the camera should go to. Higher is more zoomed out. Must be strictly greater than 0.
Returns
- GameObject
The newly created toast's UnityEngine.GameObject.
InstantiateToastWithPosTarget(string, string, Vector3)
Creates a toast with a tile and a body, that targets a position when clicked.
[PublicAPI]
[CanBeNull]
public static GameObject InstantiateToastWithPosTarget(string title, string body, Vector3 pos)
Parameters
title
stringThe title text for the toast.
body
stringThe body text for the toast.
pos
Vector3The position to target on click.
Returns
- GameObject
The newly created toast's UnityEngine.GameObject.
InstantiateToastWithPosTarget(string, string, Vector3, float)
Creates a toast with a tile and a body, that targets a position when clicked.
[PublicAPI]
[CanBeNull]
public static GameObject InstantiateToastWithPosTarget(string title, string body, Vector3 pos, float orthographicSize)
Parameters
title
stringThe title text for the toast.
body
stringThe body text for the toast.
pos
Vector3The position to target on click.
orthographicSize
floatThe orthographic size the camera should go to. Higher is more zoomed out. Must be strictly greater than 0.
Returns
- GameObject
The newly created toast's UnityEngine.GameObject.