docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ChatAssetRow

    Everything a chat surface shows about one asset.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ChatAssetRow
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.densityOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.SetActivePseudoState(bool)
    VisualElement.SetCheckedPseudoState(bool)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.IsMarkedForRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.SetBinding(BindingId, Binding)
    VisualElement.GetBinding(BindingId)
    VisualElement.TryGetBinding(BindingId, out Binding)
    VisualElement.GetBindingInfos()
    VisualElement.GetBindingInfos(List<BindingInfo>)
    VisualElement.HasBinding(BindingId)
    VisualElement.ClearBinding(BindingId)
    VisualElement.ClearBindings()
    VisualElement.GetHierarchicalDataSourceContext()
    VisualElement.GetDataSourceContext(BindingId)
    VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
    VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
    VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.disablePlayModeTint
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.scaledPixelsPerPoint
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.hasActivePseudoState
    VisualElement.hasInactivePseudoState
    VisualElement.hasHoverPseudoState
    VisualElement.hasCheckedPseudoState
    VisualElement.hasEnabledPseudoState
    VisualElement.hasDisabledPseudoState
    VisualElement.hasFocusPseudoState
    VisualElement.hasRootPseudoState
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.languageDirection
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.dataSource
    VisualElement.dataSourcePath
    VisualElement.dataSourceType
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.contentContainer
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.resolvedStyle
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
    CallbackEventHandler.UnregisterAllRemovableCallbacks()
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    CallbackEventHandler.HandleEventBubbleUp(EventBase)
    CallbackEventHandler.HandleEventTrickleDown(EventBase)
    CallbackEventHandler.ExecuteDefaultAction(EventBase)
    CallbackEventHandler.NotifyPropertyChanged(in BindingId)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    [UxmlElement]
    public class ChatAssetRow : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder
    Remarks

    A thumbnail on the left, an identity block on the right: title, source, an optional pack, an optional details link, an optional creator, an optional two-line description, optional tags, an optional price, an optional size and an optional status line, then an optional consumer extra element. Every optional line hides itself when it has nothing to say, so the row never leaves a gap.

    The row deliberately has no list semantics, no click behaviour of its own and no trailing control. A caller renders it inside its own list item and owns the interaction around it.

    statusTone is how the caller says a status counts as a problem, but the row owns which token expresses that, so the mapping lives in one place and a consumer cannot inject arbitrary styling. state is separate on purpose: it is the row's lifecycle, and tone is how the caller wants that read.

    Examples

    A row that failed.

    var row = new ChatAssetRow
    {
        title = "Sci-Fi Crate",
        sourceLabel = "Asset Store",
        packLabel = "Sci-Fi Props Vol. 2",
        priceLabel = "$12",
        state = AssetRowState.Failed,
        statusText = "Download failed",
        statusTone = AssetRowStatusTone.Destructive
    };
    parentElement.Add(row);

    In UXML.

    <appui:ChatAssetRow title="Sci-Fi Crate" source-label="Asset Store" state="Added" />

    Constructors

    ChatAssetRow()

    Default constructor.

    Declaration
    public ChatAssetRow()

    Fields

    creatorLinkUssClassName

    The styling class applied to the creator label while it is offered as a link.

    Declaration
    public const string creatorLinkUssClassName = "appui-chat-asset-row__creator--link"
    Field Value
    Type Description
    string

    creatorUssClassName

    The styling class of the creator line.

    Declaration
    public const string creatorUssClassName = "appui-chat-asset-row__creator"
    Field Value
    Type Description
    string

    descriptionUssClassName

    The styling class of the description, clamped to two lines.

    Declaration
    public const string descriptionUssClassName = "appui-chat-asset-row__description"
    Field Value
    Type Description
    string

    detailsButtonUssClassName

    The styling class of the details link.

    Declaration
    public const string detailsButtonUssClassName = "appui-chat-asset-row__details-button"
    Field Value
    Type Description
    string

    extraUssClassName

    The styling class applied to the consumer's extra element.

    Declaration
    public const string extraUssClassName = "appui-chat-asset-row__extra"
    Field Value
    Type Description
    string

    identityUssClassName

    The styling class of the identity block.

    Declaration
    public const string identityUssClassName = "appui-chat-asset-row__identity"
    Field Value
    Type Description
    string

    mediaUssClassName

    The styling class of a caller-supplied medium standing in for the thumbnail.

    Declaration
    public const string mediaUssClassName = "appui-chat-asset-row__media"
    Field Value
    Type Description
    string

    packLabelUssClassName

    The styling class of the pack label.

    Declaration
    public const string packLabelUssClassName = "appui-chat-asset-row__pack-label"
    Field Value
    Type Description
    string

    priceUssClassName

    The styling class of the price line.

    Declaration
    public const string priceUssClassName = "appui-chat-asset-row__price"
    Field Value
    Type Description
    string

    separator

    The separator drawn between the source and the pack.

    Declaration
    public const string separator = "·"
    Field Value
    Type Description
    string

    separatorUssClassName

    The styling class of the separator between the source and the pack.

    Declaration
    public const string separatorUssClassName = "appui-chat-asset-row__separator"
    Field Value
    Type Description
    string

    sizeUssClassName

    The styling class of the size line.

    Declaration
    public const string sizeUssClassName = "appui-chat-asset-row__size"
    Field Value
    Type Description
    string

    sourceLabelUssClassName

    The styling class of the source label.

    Declaration
    public const string sourceLabelUssClassName = "appui-chat-asset-row__source-label"
    Field Value
    Type Description
    string

    sourceUssClassName

    The styling class of the source line.

    Declaration
    public const string sourceUssClassName = "appui-chat-asset-row__source"
    Field Value
    Type Description
    string

    stateUssClassName

    The ChatAssetRow lifecycle styling class.

    Declaration
    public const string stateUssClassName = "appui-chat-asset-row--state-"
    Field Value
    Type Description
    string

    statusToneUssClassName

    The ChatAssetRow status tone styling class.

    Declaration
    public const string statusToneUssClassName = "appui-chat-asset-row__status--"
    Field Value
    Type Description
    string

    statusUssClassName

    The styling class of the status line.

    Declaration
    public const string statusUssClassName = "appui-chat-asset-row__status"
    Field Value
    Type Description
    string

    tagUssClassName

    The styling class of one tag pill.

    Declaration
    public const string tagUssClassName = "appui-chat-asset-row__tag"
    Field Value
    Type Description
    string

    tagsUssClassName

    The styling class of the strip holding the tags.

    Declaration
    public const string tagsUssClassName = "appui-chat-asset-row__tags"
    Field Value
    Type Description
    string

    thumbnailPlaceholderUssClassName

    The styling class of the thumbnail's placeholder glyph.

    Declaration
    public const string thumbnailPlaceholderUssClassName = "appui-chat-asset-row__thumbnail-placeholder"
    Field Value
    Type Description
    string

    thumbnailUssClassName

    The styling class of the thumbnail.

    Declaration
    public const string thumbnailUssClassName = "appui-chat-asset-row__thumbnail"
    Field Value
    Type Description
    string

    titleUssClassName

    The styling class of the title.

    Declaration
    public const string titleUssClassName = "appui-chat-asset-row__title"
    Field Value
    Type Description
    string

    ussClassName

    The ChatAssetRow main styling class.

    Declaration
    public const string ussClassName = "appui-chat-asset-row"
    Field Value
    Type Description
    string

    Properties

    creatorLabel

    Who made the asset. Null or empty hides the line.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string creatorLabel { get; set; }
    Property Value
    Type Description
    string

    creatorLink

    Whether the creator label is offered as a link. False by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool creatorLink { get; set; }
    Property Value
    Type Description
    bool
    Remarks

    Off, the label is plain text, so a source that knows a name but no page still shows the name. On, activating it raises creatorRequested.

    description

    A short text describing the item, such as what it was made from. Clamped to two lines, so a long one never pushes the rows below out of view. Null or empty hides the line.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string description { get; set; }
    Property Value
    Type Description
    string
    Remarks

    USS has neither line-clamp nor line-height, so the row measures two lines of the description's own text style and caps the element at that height. The cap follows the font size the tokens resolve to, so it holds at every density.

    details

    Whether the details link is offered. False by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool details { get; set; }
    Property Value
    Type Description
    bool

    detailsButton

    The details link.

    Declaration
    public IconButton detailsButton { get; }
    Property Value
    Type Description
    IconButton

    extra

    An element rendered under the row's facts, after the status line: a control the consumer adds for this item, such as an editor for its description. The row stays a plain row; the consumer owns what the control does. Setting it back to null removes it.

    Declaration
    [CreateProperty]
    public VisualElement extra { get; set; }
    Property Value
    Type Description
    VisualElement

    fallbackIcon

    The name of the symbol shown when there is no thumbnail to draw. Defaults to a generic asset cube.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string fallbackIcon { get; set; }
    Property Value
    Type Description
    string
    Remarks

    A consumer that knows what kind of thing the row describes passes its own symbol, so an item with no picture still reads as what it is. Named, not styled, by the consumer: the size and colour stay here so every row's placeholder matches.

    media

    An element rendered in place of the thumbnail.

    Declaration
    [CreateProperty]
    public VisualElement media { get; set; }
    Property Value
    Type Description
    VisualElement
    Remarks

    Lets a consumer supply a richer medium for rows whose content is not an image -- an AudioPreview for a sound, say -- without this row knowing what that medium is. Setting it back to null restores the thumbnail.

    packLabel

    The pack the asset belongs to. Null or empty hides it, and the separator with it.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string packLabel { get; set; }
    Property Value
    Type Description
    string

    priceLabel

    A pre-formatted commercial price, for instance "$12" or "Free". The row does no currency formatting of its own. Null or empty hides the line.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string priceLabel { get; set; }
    Property Value
    Type Description
    string

    sizeLabel

    A pre-formatted size or cost of the item, for instance "≈ 48 MB". The row does no formatting of its own. Null or empty hides the line.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string sizeLabel { get; set; }
    Property Value
    Type Description
    string

    sourceLabel

    Where the asset came from, for instance a catalog name. Always shown.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string sourceLabel { get; set; }
    Property Value
    Type Description
    string

    state

    Where the row is in its lifecycle. Pending by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public AssetRowState state { get; set; }
    Property Value
    Type Description
    AssetRowState

    statusText

    Why the row is in the state it is in. Null or empty hides the line.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string statusText { get; set; }
    Property Value
    Type Description
    string

    statusTone

    How the status line reads. Muted by default.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public AssetRowStatusTone statusTone { get; set; }
    Property Value
    Type Description
    AssetRowStatusTone

    tags

    Short facts shown as tags under the description, for instance a format or a length. Null or empty hides the strip.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public List<string> tags { get; set; }
    Property Value
    Type Description
    List<string>
    Remarks

    The registry draws each tag as a secondary Badge. UI Toolkit's Badge is a notification overlay rather than a pill, so the row draws its own pills, styled from the tokens the registry's secondary badge reads. The setter copies the incoming list, so a caller mutating its own list afterwards does not silently desynchronise what is on screen.

    thumbnail

    The asset's thumbnail. Unset, the row shows a cube placeholder instead of a broken image.

    Declaration
    [CreateProperty]
    public Background thumbnail { get; set; }
    Property Value
    Type Description
    Background

    title

    The asset's name.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string title { get; set; }
    Property Value
    Type Description
    string

    Methods

    GetStateUssClassName(AssetRowState)

    Declaration
    public static string GetStateUssClassName(AssetRowState enumValue)
    Parameters
    Type Name Description
    AssetRowState enumValue
    Returns
    Type Description
    string

    GetStatusToneUssClassName(AssetRowStatusTone)

    Declaration
    public static string GetStatusToneUssClassName(AssetRowStatusTone enumValue)
    Parameters
    Type Name Description
    AssetRowStatusTone enumValue
    Returns
    Type Description
    string

    Events

    creatorRequested

    Raised when the creator label is activated, while creatorLink is on.

    Declaration
    public event Action creatorRequested
    Event Type
    Type Description
    Action
    Remarks

    The registry names the creator's page with a creatorUrl and has to check that it is an absolute http(s) URL before turning it into an href, because a bare catalog path would resolve against the host app's own origin and lead nowhere. There is no href here, so there is nothing to guard: the row reports the intent and the host decides where, and whether, to go. Same shape as detailsRequested.

    detailsRequested

    Raised when the details link is activated.

    Declaration
    public event Action detailsRequested
    Event Type
    Type Description
    Action

    Implements

    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder

    Extension Methods

    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorOfType<T>(VisualElement, bool)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2026 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)