-
Notifications
You must be signed in to change notification settings - Fork 198
ToastControl and Toaster
ToastControl is a static script, designed to assist with easily creating toast messages. Toaster is a script that utilizes ToastControl to create toasts - presenting a more visual/UnityEvent based system.
Toaster
To use the Toaster component, you simply need to call the PopupToast() function, which will automatically create a toast based on the options in the component.
ToastControl
The ToastControl functions can be called from anywhere, allowing for easier interaction if you're already using code.
InitToastSystem(Canvas theCanvas) - This must be called before any toasts are created. It prepares the Toast prefab and sets the correct Canvas. (Toaster does this automatically)
MakeToast (string content, float duration, Color panelColor, Color textColor, int fontSize) - This instantiates a toast message with the given parameters.