Yarn Spinner for Unity Editor Tools

Yarn Spinner adds items to Unity’s menus, a few windows, sections in the Inspector, and a page in Project Settings.

Menu itemWhat it does
AssetsCreateYarn SpinnerYarn ScriptCreates a new .yarn file. See Adding a script.
AssetsCreateYarn SpinnerYarn ProjectCreates a new .yarnproject file. See Creating a project.
AssetsCreateYarn SpinnerDialogue Presenter ScriptCreates a C# script for a Dialogue Presenter of your own. See Building Your Own Presenter.
GameObjectYarn SpinnerDialogue SystemAdds a Dialogue System to your scene: a Dialogue Runner, a Line Presenter, an Options Presenter and a Line Advancer, already connected.
WindowYarn SpinnerAbout Yarn Spinner...Shows which version of Yarn Spinner you have, with links to the documentation and support. Its shortcut is Ctrl+Shift+Y, or Cmd+Shift+Y on a Mac.
WindowYarn SpinnerCommands and Functions...Opens the Yarn Actions window.
WindowYarn SpinnerInstall Samples PackageAdds the Yarn Spinner samples to your project. See Samples.
WindowYarn SpinnerAdd Assets to Table CollectionFor projects using Unity’s Localization package. Adds the assets in your localised asset folders, like voice-over clips, to an Asset Table Collection.
The menu items Yarn Spinner adds.

The Assets > Create items are also in the menu you get when you right-click in the Project window.

Yarn Actions window

Choose WindowYarn SpinnerCommands and Functions... to open the Yarn Actions window. It lists every Command and Function in your project, under a heading for each, including the built-in ones, with how to call it, like <<wave Rosa>>.

The Yarn Actions window, with its search field and lists of Commands and Functions, each showing its name and how to call it.
The Yarn Actions window.

Type in the search field to narrow the list. See Commands for how to write them.

In the Inspector

Yarn Spinner adds to the Inspector for a few kinds of object:

  • Yarn Projects: selecting a .yarnproject shows its source scripts, localisation settings, line tagging and export tools, and its errors. See The Yarn Project Inspector.
  • Yarn Scripts: selecting a .yarn file shows the Yarn Project it belongs to and any errors in it. See Importing Yarn Files.
  • Dialogue Runner: when Start Automatically is on, Start Node becomes a dropdown of the nodes in the Dialogue Runner’s Yarn Project. If Variable Storage is empty, the Inspector says an In Memory Variable Storage will be added when the game runs.
  • In Memory Variable Storage: the Debug Variables section lists the variables it holds, with their values, while the game is running.
A Dialogue Runner in the Inspector, with its Yarn Project, Variable Storage, Line Provider and Dialogue Presenters, and Start Automatically turned on, showing the Start Node dropdown.
A Dialogue Runner, with the Start Node dropdown.
The Dialogue Runner’s other settings, such as Dialogue Presenters and Line Provider, are explained in Dialogue Runner.

Project settings

Yarn Spinner adds a page to EditProject Settings..., under Yarn Spinner. After changing anything, click Apply Changes.

SettingDefaultWhat it does
Update Localised AssetsOnReimports your Yarn Projects when assets in their localised asset folders are added, moved or deleted.
Generate linkings for Functions and CommandsOnGenerates the code that connects the methods you’ve marked with [YarnCommand] and [YarnFunction] to the Dialogue Runner. Turn it off to add them yourself in code.
Generate YSLS file for attributed methodsOnWrites a .ysls.json file listing those Commands and Functions, which VS Code uses to autocomplete them. See The .ysls.json file.
Keep Unity Localization tables sortedOffOnly shown when Unity’s Localization package is installed. Keeps the lines in your String Table Collections in order.
Enable direct connection to VS Code for Yarn ScriptsOffAdds an Open in VS Code button to a Yarn Script’s Inspector.
Yarn Spinner’s settings in Project Settings.
Next step Showing Dialogue The Dialogue Runner, the built-in Presenters, and getting your dialogue on screen.