There are two different ways a toast may be dismissed.

  • Internally, the ToastInfo class contains a public property called Lifetime. You can set this value to anything greater than -1 and less than Time.time to have your ToastInfo instance dismissed by the ToastManager. Doing so will initiate the hide-animation and invoke any registered on-hide callbacks.

  • You may call the public method Destroy() on your ToastInfo instance to force the toast to be dismissed immediately. Doing so will skip the fade-out animation, but any registered on-hide callbacks will still be executed. In order for this approach to work you will need to make sure the following properties on your ToastInfo instance are set accordingly.
    • _persist = false. ex This should be false by default.
    • _lifetime > -1. ex This should be greater then -1 by default.
    • _tapToDismiss = true. ex This should be true by default.