{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class Toast | App UI | 0.6.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class Toast

    A toast is a view containing a quick little message for the user.

    Inheritance
    object
    Popup
    Popup<Toast>
    BottomNotification<Toast>
    Toast
    Inherited Members
    BottomNotification<Toast>.animationMode
    BottomNotification<Toast>.isShown
    BottomNotification<Toast>.isShownOrQueued
    BottomNotification<Toast>.duration
    BottomNotification<Toast>.SetAnimationMode(AnimationMode)
    BottomNotification<Toast>.SetDuration(NotificationDuration)
    BottomNotification<Toast>.Dismiss(DismissType)
    BottomNotification<Toast>.Show()
    Popup<Toast>.shown
    Popup<Toast>.dismissed
    Popup<Toast>.SetKeyboardDismiss(bool)
    Popup<Toast>.SetLastFocusedElement(Focusable)
    Popup.keyboardDismissEnabled
    Popup.view
    Popup.targetParent
    Popup.contentView
    Popup.context
    Popup.Dismiss()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Unity.AppUI.UI
    Assembly: solution.dll
    Syntax
    public sealed class Toast : BottomNotification<Toast>

    Properties

    Name Description
    icon

    The icon used inside the Toast as leading UI element.

    style

    Returns the styling used by the bar. See NotificationStyle for more information.

    text

    Returns the raw message or Localization dictionary key used by the bar.

    triggeredActionId

    The Action ID of the triggered Action (if any) just before dismissing the element.

    Methods

    Name Description
    Build(VisualElement, string, NotificationDuration)

    Build and return a Toast UI element.

    The method will find the best suitable parent view which will contain the Toast element.

    RemoveAction(int)

    Remove an already existing action.

    SetAction(int, string, Action)

    Set an Action to display in the Toast bar.

    SetIcon(string)

    Set a new value for the icon property.

    SetStyle(NotificationStyle)
    SetText(string)

    Update the text in the Toast.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)