Yarn Spinner 3.2
Yarn Spinner 3.2 gave every error a stable code, made VS Code smarter about your commands and functions, and added more ways to customise character names.
Error Codes
Every error and warning the compiler reports now has a code, such as YS0013. The codes stay the same between releases, so you can look one up, and editor tools like VS Code can link to its explanation. See Errors.
Smarter Suggestions in VS Code
The definitions files Unity writes now carry more detail, so VS Code can suggest the right values as you type:
- Node names. Mark a string parameter with
YarnNodeParameter, and VS Code suggests node names for it. - Enum cases. Mark a parameter with
YarnEnumParameterand the name of a Yarn enum, and VS Code suggests its cases. - Game objects. For a command on a game object, like
<<move gary left>>, VS Code knowsgaryis the name of a game object.
Unity writes a definitions file for each of your assemblies, and it’s on by default. If a command or function’s parameters can’t work, Unity warns you in your C# code.
Several Definitions Files
A Yarn Project made with Yarn Spinner 3.2 can list several definitions files, instead of only one. See Definitions.
Character Names
- Escaping the colon. Put a backslash before a colon, as in
Note\: this isn't a character name, to stop Yarn Spinner reading the text before it as a character name. - Customising names. Marker processors can now handle the
[character]marker Yarn Spinner adds to lines that start with a character name, so your game can change how names are shown.
Unity Localization Tables Can Be Sorted
If you use the Unity Localization package, Yarn Spinner can sort your localisation tables by where each line appears in your Yarn files. Turn it on in .
Other Changes
- Typewriters get a
ContentDidDismisscall, so they know when it’s safe to clean up, and aTextElementproperty. - Commands can be registered with up to 16 parameters.
- Unity 6.4 and later use
EntityIdobjects instead of instance IDs.
For every change, see the changelogs for Yarn Spinner and Yarn Spinner for Unity.