TourOverlay
A TourOverlay is a guided tour. It dims the screen around one control at a time and shows a Callout next to it with a title, a text, the step count and the End tour, Back and Next buttons. Use it for the first run of an app or a game, or for a tutorial whose steps wait until the user clicks a control, changes a value or presses Enter. For one hint with no dim, use a Callout.
Video tutorial: Tours. All videos: Video tutorials.


How to add a tour in UXML:
- Declare the tour in the UXML of a window, with one
tb:TourStepchild for each step. Settargetto the name of the control that the step shows. - Find the tour in code and call
Start, for example on the first run or from a Help button.
<ui:Button name="save" text="Save" />
<ui:TextField name="search" />
<ui:Button name="help" text="?" />
<tb:TourOverlay name="firstRun" prefs-key="first-run">
<tb:TourStep
target="save"
title="Save often"
description="Saves your work. Ctrl+S does the same." />
<tb:TourStep
target="search"
title="Search"
description="Type a part of a name to find any asset." />
<tb:TourStep
target="help"
title="Help"
description="Click here to see this tour again."
shape="Circle"
placement="Left" />
</tb:TourOverlay>
var tour = root.Q<TourOverlay>("firstRun");
// does nothing after the user finished or skipped it once
tour.Start();
root.Q<Button>("help").clicked += () =>
{
TourOverlay.Reset(tour.PrefsKey);
tour.Start();
};
How to make a tour in code, with a step that waits until the user clicks the bag:
var tour = new TourOverlay();
tour.Steps.Add(
new TourStep(healthBar, "Health",
"Your health. It fills again while you rest."));
tour.Steps.Add(new TourStep(bag, "Bag", "Click the bag to open it.")
{
WaitFor = TourWait.Click,
Shape = SpotlightShape.Circle,
Placement = CalloutPlacement.Left,
});
tour.Finished += () => Debug.Log("Tutorial done");
hud.Add(tour);
tour.Start();
A tour moves to the workspace while it runs, so its dim covers the whole workspace, and goes back to its place in the UXML when it ends. A tour declared in UXML stays hidden until Start.
A step whose target is not found is left out: Next and Back go to the next step that has a target, and the step count still counts it. When the target of the step that shows leaves the panel, the tour stops.
A target that hides shows when its step starts. The tour makes the tab of a TabView that holds it active, opens the Foldout, the SidebarItem, the Drawer and the ConsoleView that hold it, and expands its pane of a SplitPanel. A minimized window comes back, and a window behind others comes to the front. Each ScrollView that holds the target scrolls to it after the layout. A closed window of a Workspace in the panel opens when its content holds the target of the step.
The tour stays on top of the workspace windows. A window that opens while the tour runs, from a step or from the app, goes behind the dim layer, and a target in it shows through the hole and takes the pointer. A dialog, a message box or another layer that opens over the tour stays over it, and the tour still dims the screen around it. The dim has a hole under each glass surface of the layer, such as a glass dialog, so the glass shows the blurred screen behind it and not the dim.
Interactive steps
A step can wait until the user does what it says. Set wait-for (WaitFor in C#) to a TourWait:
TourWait |
The wait ends when |
|---|---|
None |
The step does not wait. The Next button shows at once. This is the default. |
Click |
The user clicks the target, or presses Enter or the submit button of a gamepad on it. |
Change |
The value of the target, or of a field in it, changes. With value, only a change to that value. |
Submit |
The user presses Enter (or submit) in the target. With value, only when the target has that value. |
Code |
Your code calls Complete(), for a condition that only your code knows. When the wait has run 4 seconds with no pointer input, the Next button shows, so a user with a gamepad or a keyboard is never stuck on a pointer gesture. Give the target a gamepad route too, when the gesture has one. |
Class |
The target gets the USS class in value, such as a bag whose open look has the class bag--open. It needs no code. |
While a step waits, the target flashes (AttentionFlash), the Next button does not show, and IsWaiting is true. The target takes the focus, so the user can type at once. A target that holds a text field, such as a row with a name field, gives the focus to the text input in it. When the wait ends, the Next button shows. It takes the focus when the focus is on the target or the tour, so a window that the step opened keeps the focus. A text input keeps the focus while the user types in it: the first letter can end a Change wait, and the next letters still go to the field. The Enter that ends a Submit wait moves the focus to Next. With auto-advance, the tour goes to the next step by itself. A step does not wait when the user cannot end its wait: a Click, Change or Submit step whose target is disabled, and a Change step whose target holds its value. Its Next button shows at once. A target that turns off while the step waits ends the wait too, such as a Find match button that turns itself off while it searches: a disabled button gets no click event. Complete() ends a wait of any kind, for example when the user does the same thing with a shortcut.
value ignores case and the spaces at the two ends. Numbers compare as numbers, so 5 matches 5.0. A toggle matches true or false, an enum field the name of the value, and an object field the name of the object. An empty value matches any value.
A user who gets ahead of the tour is not asked again. With skip-if-done (true by default), Next and the end of a wait leave out a Change step whose target holds its value already, such as a toggle that is on, and a Class step whose target has the class. Start and Back show such a step, with its Next button at once. Set skip-if-done="false" on a step that must always show.
<ui:Toggle name="music" label="Music" />
<ui:Button name="bag" text="Bag" />
<tb:TourOverlay name="hudTour">
<tb:TourStep target="music" title="Music"
description="Turn the music on."
wait-for="Change"
value="true" />
<tb:TourStep target="bag" title="Bag" description="Open the bag."
wait-for="Class" value="bag--open" />
<tb:TourStep target="music" title="Music again"
description="This step always shows." wait-for="Change"
value="true" skip-if-done="false" />
</tb:TourOverlay>
A step that waits for Enter in a search box:
<ui:TextField name="search" placeholder-text="Search assets" />
<ui:VisualElement name="library">
<ui:Label text="Scenes" />
<ui:Label name="prefabs" text="Prefabs" />
</ui:VisualElement>
<tb:TourOverlay name="tutorial">
<tb:TourStep target="search" title="Search"
description="Type fire, then press Enter."
wait-for="Submit" value="fire" />
<tb:TourStep target="library" title="Pick an asset"
description="Click Prefabs." wait-for="Code" placement="Right" />
</tb:TourOverlay>
The Enter that ends the wait does not also press Next: the Next button shows after the key. The second step waits for your code, which ends it when the user picks Prefabs. The same steps in C#:
var search = root.Q<TextField>("search");
var library = root.Q("library");
var tour = new TourOverlay();
tour.Steps.Add(
new TourStep(search, "Search", "Type fire, then press Enter.")
{
WaitFor = TourWait.Submit,
Value = "fire",
});
tour.Steps.Add(new TourStep(library, "Pick an asset", "Click Prefabs.")
{
WaitFor = TourWait.Code,
Placement = CalloutPlacement.Right,
});
root.Q("prefabs").RegisterCallback<ClickEvent>(_ =>
{
if (tour.IsWaitingFor(TourWait.Code))
tour.Complete();
});
root.Add(tour);
tour.Start();
More than one target
A step can show more than one control, such as a slider and the button to click after it, or a field and the place that shows its result. Set also to the names of the other targets, with a space between them; a name that starts with a dot finds a USS class. Each target gets its own hole and ring, and a line goes from the callout to each other target. With show-pointer on, each hole gets its own arrow and the lines are not drawn. The user can click, drag and hover in every hole, so a step can ask for a drag in one place and a click in another, or for the pointer to rest on a control that opens a hover card. The callout goes to the side of the target where it covers none of the targets: the side of placement, then the opposite side, then the other two.
<ui:SliderInt name="gold" label="Gold" high-value="300" />
<ui:Button name="focusAxe" text="Focus the axe" />
<tb:PromptBar name="bar" />
<tb:TourOverlay name="shopTour">
<tb:TourStep target="gold" title="Can act"
description="Drag Gold under 140, then click Focus the axe."
wait-for="Change" also="focusAxe bar" />
</tb:TourOverlay>
The other targets are found under the nearest ancestor of the target that holds them. A name that is not found is left out. In code, add the elements to AlsoElements. A click in another hole does not end a Click wait; the wait is for the target of the step.
Icons and pictures
A step can show a small icon left of its title, such as the icon of the control it shows, and a picture under its text, such as what the step makes. Set icon and image to a texture or a sprite of the project; in the UI Builder, pick them in the inspector of the step. The picture is 120 pixels high and fits in the width of the callout. A step with no icon or picture shows none.
<tb:TourOverlay name="craftTour">
<tb:TourStep target="anvil" title="Anvil"
description="Drop two bars on the anvil to make a sword."
icon="project://database/Assets/UI/anvil.png"
image="project://database/Assets/UI/sword.png" />
</tb:TourOverlay>
In C#, set Icon and Image to a Background, such as Background.FromTexture2D(texture) or Background.FromSprite(sprite).
Dim and frosted glass
dim-amount sets how dark the dim is, from 0 (no dim) to 1 (the full dim color, black by default). frost-blur blurs the screen around the holes, as frosted glass, while the targets in the holes stay sharp. The blur is the one of a GlassPanel: it blurs the UI in the panel, not a 3D scene. A frosted tour looks best with a light dim.
<tb:TourOverlay name="glassTour" dim-amount="0.3" frost-blur="8">
<tb:TourStep target="save" title="Save"
description="Saves your work. Ctrl+S does the same." />
</tb:TourOverlay>
With more than one target, the rectangle around all the holes stays sharp, and only the dim shows between the targets. Under a dialog or another modal layer, the tour draws no blur, so the blur of a glass dialog shows the screen; the dim stays.
Sounds
Each step plays a short ding when it shows: the notification sound of the WorkspaceAudio of the panel. A panel with no WorkspaceAudio plays no sound, so a tour in code that sets up no sounds stays quiet. step-sound names another sound of the set, and none turns the ding off. sound on a step plays a clip of its own instead.
<tb:TourOverlay name="craftTour" step-sound="coin">
<tb:TourStep target="anvil" title="Anvil"
description="Drop two bars on the anvil to make a sword." />
<tb:TourStep target="sword" title="Done"
description="Your first sword."
sound="project://database/Assets/Audio/fanfare.wav" />
</tb:TourOverlay>
In C#, set StepSound to the name and TourStep.Sound to an AudioClip.
Voiced steps
The sound of a step is a voice line, such as a narrator who reads the step aloud. It plays through ToolboxAudio.PlayVoice, one line at a time, and stops when the tour moves to another step, ends or stops. The first Next while the text types only shows the whole text, so the line plays on. Set ToolboxAudio.VoiceSource to an AudioSource on the voice group of your mixer to send the lines there.
With characters-per-second, a voiced step types over the length of its line, so the text and the voice end together. It never types faster than characters-per-second, so a short clip such as a ding does not hurry the text.
var tour = root.Q<TourOverlay>("shopTour");
for (var i = 0; i < tour.Steps.Count; i++)
tour.Steps[i].Sound =
Resources.Load<AudioClip>("Voice/step" + (i + 1));
tour.Start();
Auto-advance
A voiced step goes to the next step by itself, a short moment after its line ends and its text has typed. It needs no setup: the narrated tour plays through like a video. A step that waits for an action advances when the action completes, as before. The last step, a muted tour and a step with no sound stay until the user presses Next. advance-after-voice="false" turns it off; Next and Back still work at any time.
The mute button
While a step has a sound, a mute button shows left of End tour, with a speaker icon. A click or the M key silences the voice: the line that plays stops, and the next steps stay quiet and type at characters-per-second. A second press turns the voice back on from the next step. The tour keeps the choice in PlayerPrefs under its prefs-key, so the player chooses once. show-mute="false" hides the button.
tour.MuteChanged += muted =>
Debug.Log(muted ? "Voice off" : "Voice on");
TourOverlay.ResetMuted("shopTour"); // the voice plays again
The button has the accessible name Mute or Unmute and the same text as its tooltip, with the key: "Mute (M)".
The replay button
While the step that shows has a sound, a replay button shows left of the mute button, with a circle arrow. A click or the R key plays the line again from its start and types the text again when characters-per-second is above 0. While the tour is muted, only the text types again. show-mute="false" hides it with the mute button. Code calls Replay() for the same.
The button has the accessible name Replay and the same text as its tooltip, with the key: "Replay (R)".
Marking names and keys in a text
Put **Save** around the name of a control or a menu entry, and backticks around a key, such as `W`. The step shows names in bold in the color --tb-tour-name-color and keys in bold in --tb-tour-key-color, so every tour marks them the same way. A text without the marks is unchanged. tour.FormatText(text) returns the rich text of the same marks for your own labels.
<tb:TourStep title="Save"
description="Click **Save**, then press `Ctrl+S` next time." />
Settings
| Setting (UXML) | Type | Default | Does |
|---|---|---|---|
block-outside |
bool | true | Clicks outside the hole stop at the dim layer, and Tab and the workspace shortcuts stay in the callout. False: the dim only shows, and the user can use the whole UI. |
pass-through-hole |
bool | true | Clicks in the hole reach the target. False: the target shows but takes no click. |
prefs-key |
string | "" | The name under which the tour remembers in PlayerPrefs that the user finished or skipped it. While it is remembered, Start does nothing. Empty does not remember. |
show-progress |
bool | true | The callout shows the step count, such as "2 of 6". |
animation-duration |
int | 300 | The time of the slide of the hole from one target to the next, in milliseconds. 0 moves the hole at once. |
dim-amount |
float | 0.6 | How dark the dim is, from 0 (no dim) to 1 (the full --tb-tour-dim-color). The alpha of the color multiplies it. |
frost-blur |
float | 0 | The blur radius of the screen around the holes, in pixels, as frosted glass (see Dim and frosted glass). 0 does not blur. |
step-sound |
string | notification |
The sound of the panel's WorkspaceAudio that plays when a step shows (see Sounds). Empty or none plays no sound. |
animation-easing |
Easing |
OutCubic |
The curve of the slide of the hole, one of the easing curves. With OutBack or OutElastic, the hole goes past the new target and comes back. |
portrait |
Background |
none | The picture of a narrator who speaks the steps, in a frame left of the text (see Styling a tour for your game). None shows no portrait. |
speaker |
string | "" | The name of the narrator, on a plate at the bottom of the portrait frame. Empty shows no plate. |
characters-per-second |
float | 0 | The text of each step types itself out at this speed. The first Next, Enter or click in the callout while it types shows the whole text; the next one goes on. 0 shows the text at once. |
progress-dots |
bool | false | One dot for each step, such as gems or coins, in place of the "2 of 6" count. |
show-pointer |
bool | false | An arrow points at each hole from the side away from the callout, and bobs while the workspace animations are on. The lines from the callout to the other holes are not drawn. |
finish-text |
string | "" | The text of the Next button on the last step, such as "Got it". Empty shows the localized Finish. |
advance-after-voice |
bool | true | A voiced step goes to the next one when its line ends and its text has typed (see Auto-advance). |
show-mute |
bool | true | The mute button shows while a step has a sound (see The mute button), and the replay button while the step that shows has one. False hides both. |
| Property | Type | Description |
|---|---|---|
Steps |
List<TourStep> |
The steps, in order. Change them while the tour does not run. |
Callout |
Callout |
The callout of the steps. Set its look, alignment or connector here; the tour sets the title, the text, the placement and the target. |
Step |
int | The index of the step that shows, or -1 while the tour does not run. |
IsRunning |
bool | True from Start until the tour finishes, is skipped or stops. |
IsWaiting |
bool | True while the step that shows waits (wait-for): the target flashes and the Next button does not show. |
IsTyping |
bool | True while the text of the step that shows still types itself out (characters-per-second). |
Muted |
bool | True silences the sound of the steps. The tour keeps it in PlayerPrefs under PrefsKey. |
TourStep
| Setting (UXML) | Type | Default | Does |
|---|---|---|---|
target |
string | "" | The name of the target. The step finds the first match under the nearest ancestor of the tour that has one, else in the whole panel. |
title |
string | "" | The bold first line of the callout. Empty shows no title. |
description |
string | "" | The text of the callout. |
icon |
Background |
none | A small picture left of the title (see Icons and pictures). |
image |
Background |
none | A picture under the text, 120 pixels high, that fits in the width of the callout. |
sound |
AudioClip |
none | The voice line that plays when the step shows, instead of the step-sound of the tour. It stops when the step ends (see Voiced steps). |
shape |
SpotlightShape |
Rounded |
The shape of the hole: Rect (sharp corners), Rounded (round corners, --tb-tour-corner) or Circle (around the center of the target; its diameter is the longer side of the target). |
padding |
float | 6 | The space between the target and the edge of the hole, in pixels. |
wait-for |
TourWait |
None |
What the step waits for before the Next button shows: Click, Change, Submit, Code or Class (see Interactive steps). The target flashes until then (AttentionFlash). |
value |
string | "" | The value that ends a Change or a Submit wait, or the USS class that ends a Class wait. Empty matches any value. |
skip-if-done |
bool | true | Next and the end of a wait leave the step out when the user already did what it asks: a Change step whose target holds its value, a Class step whose target has the class. |
auto-advance |
bool | false | When the wait ends, the tour goes to the next step by itself. False: the Next button shows, so the user reads the step first. |
placement |
CalloutPlacement |
none | The side of the target that the callout shows on. No placement shows it below, or above when there is no room. |
portrait |
Background |
none | The portrait of the narrator for this step, such as another mood of the same face. None shows the portrait of the tour. |
also |
string | "" | More targets that the step shows, by name with a space between them; .name finds a USS class. Each one gets a hole, a ring and a line from the callout (see More than one target). |
In code, TargetElement sets the target element itself. It goes before Target, the name. AlsoElements adds more target elements; they go before the names in Also.
Methods
| Method | Does |
|---|---|
Start(step = 0) |
Shows the step at step, or the first one after it whose target is found. A running tour goes to that step. Does nothing when PrefsKey is done or no step has a target. |
Next() |
Shows the next step, or finishes the tour after the last one. |
Back() |
Shows the step before. Does nothing on the first step. |
Skip() |
Ends the tour as the user who declines it: it is remembered as done, and Skipped runs. |
Stop() |
Ends the tour with no event. It is not remembered, so Start shows it again. |
Complete() |
Ends the wait of the step that shows, of any kind. A Code step waits for this call. The wait ends after the event that calls it. Does nothing when the step does not wait. |
IsWaitingFor(wait) |
True while the step that shows waits for wait. Check IsWaitingFor(TourWait.Code) before Complete(), so that your event does not end a wait of another kind. |
TourOverlay.IsDone(key) |
True when the tour of key was finished or skipped. |
TourOverlay.Reset(key) |
Forgets that the tour of key was done, so it shows again. |
Replay() |
Plays the sound of the step that shows again and types its text again. Does nothing while the tour does not run or the step has no sound. |
TourOverlay.ResetMuted(key) |
Forgets the mute choice of the tour of key, so its voice plays again. |
Events
| Event | When |
|---|---|
StepShown(int) |
After a step shows, with its index in Steps. |
Finished |
After the user presses Next (Finish) on the last step, or code calls Next there. |
Skipped |
After the user ends the tour with the End tour button or Escape, or code calls Skip. |
MuteChanged(bool) |
After Muted changes, by the mute button, the M key or code, with the new value. |
Mouse, touch, keyboard and gamepad
| Input | Does |
|---|---|
| Click, tap or hover in a hole | Reaches the target under it (pass-through-hole). On a step that waits for a click, a click on the target ends the wait. |
| Click or tap outside the holes | Stops at the dim layer (block-outside). |
| Tab, the arrow keys, the D-pad | Move the focus between the replay button, the mute button, End tour, Back and Next. |
| M | Mutes or unmutes the voice of a voiced tour. |
| R | Plays the line of a voiced step again and types its text again. |
| Enter, Space, the submit button | Press the focused button. Enter on the target of a step that waits for a click counts as the click, and Enter in the target of a Submit step ends its wait. |
| Escape, the cancel button | Ends the tour. |
The hole slides from one target to the next and follows its target when the target moves or changes size, also with its window. The slide plays when the workspace has animations-enabled, with the time of animation-duration and the curve of animation-easing.
Texts
The buttons and the step count come from ToolboxText, so they follow your translations (see Localization):
| Key | English |
|---|---|
tb.end-tour, tb.back, tb.next, tb.finish |
End tour, Back, Next, Finish. The last step shows Finish. |
tb.step-count |
{0} of {1} |
tb.mute, tb.unmute |
Mute, Unmute. The name and the tooltip of the mute button. |
tb.replay |
Replay. The name and the tooltip of the replay button. |
Performance
- A tour at rest has no scheduled item. While it runs, it moves the hole when the layout of its target changes, and checks the place of the target once per tick for a parent that moves, such as a window. It repaints only when the hole moves; this allocates nothing.
- The dim, the holes and their rings are one mesh that the tour draws, with no extra elements. Holes that overlap merge into one.
- A step with
alsochecks the places of its other targets once per tick, and the side of the callout that covers none of them. Neither allocates. frost-bluradds four elements with abackdrop-filterblur. They move with the holes and allocate nothing, but the GPU blurs most of the screen on each frame that the panel draws, as a full-screenGlassPaneldoes. Leave it at 0 on low-end mobile.
Styling
| Class | Element |
|---|---|
tb-tour |
The dim layer. With --hidden while it fades. |
tb-tour__callout |
The callout of the steps. |
tb-tour__header |
The row of the icon and the title, at the top of the callout. |
tb-tour__icon |
The icon of the step, 20 pixels. |
tb-tour__image |
The picture of the step, under the text. |
tb-tour__frost |
The four strips that blur the screen around the holes (frost-blur). |
tb-tour__buttons |
The row under the text. |
tb-tour__count |
The step count. |
tb-tour__button |
Each of the End tour, Back and Next buttons. A button is a row, so an icon added before its label sits left of it. |
tb-tour__skip, __back, __next |
The End tour, Back and Next buttons. |
tb-tour__replay |
The replay button: a MediaIcon and the hidden label. |
tb-tour__mute |
The mute button: a MediaIcon and the hidden label. With --muted while the voice is off. |
tb-tour__button-label |
The label inside each button. |
tb-tour__callout--portrait |
On the callout while a portrait shows. It makes room for the frame. |
tb-tour__portrait |
The frame of the portrait, left of the text. |
tb-tour__portrait-image |
The picture in the frame. |
tb-tour__speaker |
The name plate on the frame. |
tb-tour__text |
The text that types itself out (characters-per-second). |
tb-tour__dots, tb-tour__dot |
The progress dots and each dot. With --done for a step done and --current for the step that shows. |
tb-tour__pointer |
The arrow at the hole. With --down, --up, --right or --left for the way it points, and --bob while it bobs. |
| Variable | On | Description |
|---|---|---|
--tb-tour-dim-color |
tb-tour |
The color of the dim (black). dim-amount sets how dark it is. |
--tb-tour-corner |
tb-tour |
The radius of a Rounded hole, in pixels (8). |
--tb-tour-ring-color |
tb-tour |
The color of the ring around the hole (the theme accent). transparent draws no ring. |
--tb-tour-name-color |
tb-tour |
The color of a **name** in a text (the theme accent). |
--tb-tour-key-color |
tb-tour |
The color of a key in backticks in a text (the theme warning color). |
--tb-tour-ring-width |
tb-tour |
The width of the ring, in pixels (2). |
--tb-tour-ring-glow |
tb-tour |
A soft glow of the ring color around the ring, in pixels (0). |
--tb-tour-pointer-color |
tb-tour__pointer |
The fill of the arrow (white). |
--tb-tour-pointer-outline |
tb-tour__pointer |
The edge of the arrow (none). |
.tb-tour { --tb-tour-dim-color: rgb(10, 20, 40); --tb-tour-corner: 14; }
Styling a tour for your game
A tour can look like a piece of the game, as the tutorial of a role-playing game: a narrator in a carved frame, the line that types itself out, coins for the progress, an arrow and a glowing ring at the target, and the buttons in the art of the game with their key hints.

Set the narrator and the parts in code or UXML:
var tour = new TourOverlay
{
Speaker = "Hesta",
Portrait = Background.FromTexture2D(face),
CharactersPerSecond = 40,
ProgressDots = true,
ShowPointer = true,
FinishText = "Got it",
};
tour.AddToClassList("my-game-tour");
Then give the parts the look of the game in USS. The callout is not inside the dim layer, so the rules of the callout start at a class of the screen, here .shop:
.shop .tb-tour {
--tb-tour-dim-color: rgb(34, 16, 4);
--tb-tour-ring-color: rgb(255, 215, 106);
--tb-tour-ring-width: 3;
--tb-tour-ring-glow: 7;
}
.shop .tb-tour__callout {
background-image: url("parchment.png");
-unity-slice-left: 24;
border-color: rgb(201, 150, 46);
}
.shop .tb-tour__callout .tb-callout__title,
.shop .tb-tour__callout .tb-tour__text {
color: rgb(42, 26, 14);
}
.shop .tb-tour__portrait {
background-image: url("frame.png");
}
.shop .tb-tour__speaker {
background-image: url("wood.png");
}
.shop .tb-tour__dot {
background-image: url("coin.png");
}
.shop .tb-tour__buttons > .tb-tour__button {
background-image: url("button.png");
padding: 6px 14px 6px 12px;
}
.shop .tb-tour__back:disabled { display: none; }
.shop .tb-tour__pointer {
--tb-tour-pointer-color: rgb(255, 215, 106);
--tb-tour-pointer-outline: rgb(42, 26, 14);
}
A key hint goes in front of the label of a button, and the button grows to fit it:
var next = tour.Callout.Q<Button>(
className: TourOverlay.NEXT_CLASS);
next.Insert(0, new GamepadGlyph(GamepadGlyphButton.South));
The panel slides in with the tb-callout--anim-in and tb-callout--anim-out classes of the callout, which play only while the workspace animations are on. The Shop example has the whole skin in Shop.uss.
The TourDemo scene shows a first-run tour from UXML that remembers when it is done, a HUD tutorial step that waits for a click, an interactive tour with one step of each wait kind and a target on another tab, and the shapes of the hole. Its Show me button in the demo header starts a tour of the demo. The CalloutDemo scene shows its tutorial both as one callout and as a tour.
SVG: Icon, Image and Portrait are Background values. An SVG imported as a VectorImage works as well as a texture. See Pictures: PNG or SVG.