Class SerenityHubActionCard
General-purpose card for a title, description, and action-hint label wired to an arbitrary delegate —
clicking anywhere on the card runs it (the Hub's one interaction model, no per-card button). Unlike
SerenityHubOpenToolCard, this card is not bound to a catalog entry: it carries no
SerenityHubToolEntry, no favorite toggle, and no launcher — its caller supplies whatever action fits
(open a documentation asset, reveal a folder, launch a menu path, or swap behavior by external state, as
SerenityHubLearnView's DocFX card does). Different reason to change: an open-tool card changes when
catalog/favorite wiring changes, this card changes when a caller needs a new kind of one-off action.
Inheritance
SerenityHubActionCard
Assembly: Serenity.UnityHub.Infrastructure.Editor.dll
Syntax
public sealed class SerenityHubActionCard
Constructors
SerenityHubActionCard(string, string, string, Action, Texture)
Declaration
public SerenityHubActionCard(string title, string description, string actionHint, Action action, Texture icon = null)
Parameters
Properties
Root
Declaration
public VisualElement Root { get; }
Property Value
| Type |
Description |
| VisualElement |
|
Methods
Activate()
Runs this card's action exactly as clicking the card would.
Declaration
BuildInert(string, string)
Builds the same title+description card shell the interactive constructor does, minus the action
hint and click behavior — for a card that has nothing to do yet (e.g. a Hub tool entry missing from
the catalog). Returns the root UnityEngine.UIElements.VisualElement directly rather than a
SerenityHubActionCard instance, since an inert card has no Activate() to
call and nothing beyond Root to expose.
Declaration
public static VisualElement BuildInert(string title, string description)
Parameters
Returns
| Type |
Description |
| VisualElement |
|