ToastManager
Last updated
Last updated
Toast Manager allows to send Notifications during the game for better feedback and UI Response.
If you are using Inventory Pro Add-On
: ToastManager
can be located on the object.
If you are not using Inventory Pro Add-On
& you want to use the ToastManager
, you can create a new Canvas and assign the ToastManager
component to it. If you already have a Canvas, you can simply attach ToastManager
component to it.
toastPrefab: Reference to Toast Prefab ( UI to Spawn when a Toast Message is shown )
toastPosition: Vector2 that defines the coordinates of the Toast Prefab in the UI
showToastOnTrade: If true, it will display toast messages on trading (Crafting or Purchasing)
showAmountTraded: If true, Toast Messages will display the amount traded (ex: Collected x3 Gears)
showToastOnInsufficientSpace: If true, Toast Messages will be displayed if the Inventory Space is not enough for an item to be picked up.
Here you can customize Notification Messages for different Actions.
ShowToast(string message)
Shows Toast Notification with Default Duration ( 2 seconds )
message: Text to display on the Toast Notification.
ShowToast(string message, float duration)
Shows Toast Notification
message: Text to display on the Toast Notification.
duration: Time In Seconds for the Toast Message to disappear.