{!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} Method Build | App UI | 0.6.5
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Build

    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.

    Declaration
    public static Toast Build(VisualElement referenceView, string text, NotificationDuration duration)
    Parameters
    Type Name Description
    VisualElement referenceView

    An arbitrary VisualElement which is currently present in the UI panel.

    string text

    The raw message or Localization dictionary key for the message to be displayed inside the Toast.

    NotificationDuration duration
    Returns
    Type Description
    Toast

    The Toast instance, if no exception has occured.

    Remarks

    The snackbar is not displayed directly, you have to call Show().

    Exceptions
    Type Condition
    ArgumentException

    The provided view is not contained in a valid UI panel.

    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)