Yarn Spinner for Unity v2.4.2
Yarn Spinner for Unity » Devlog
Hey, everyone! We’re thrilled to announce the release of Yarn Spinner 2.4.2! This is mostly a bugfix release, but there’s a few features in here too:
- A new
formatfunction that makes it easier to show formatted numbers in your content - Yarn Spinner for Unity now offers project-wide settings that control how things like project import and command detection work. You can find these settings in Edit → Project Settings → Yarn Spinner.
- Line View (our built-in dialogue view for showing lines) will now insert a line break wherever you use a
[br/]tag. YarnFunctionandYarnCommandnow support using constants to define the command or function name, in addition to strings.- The
DialogueAdvanceInputclass now supports the virtual button system used in the older Unity Input Manager. - The minimum Unity version for Yarn Spinner is now 2021.3.
Full release notes follow!
Added
- Added a Unity Project scoped settings that allows you to override some of the default behaviours of Yarn Spinner.
- Yarn Spinner settings are saved to the path
ProjectSettings\Packages\dev.yarnspinner\YarnSpinnerProjectSettings.json. - The settings be changed in the Project Settings window, by choosing
Edit -> Project Settings -> Yarn Spinner. - The setting currently supports three convenience features of Yarn Spinner:
- Automatically associating assets with localisations
- Automatically linking
YarnCommandandYarnFunctionattributed methods to the Dialogue Runner. - Generating a
.ysls.jsonfile that stores information about your Yarn attributed methods.- This file is saved to
ProjectSettings\Packages\dev.yarnspinner\generated.ysls.json. - This is an experimental feature to support better editor integration down the line. As such, this feature defaults to ‘off’.
- This file is saved to
- Enabling or disabling
YarnCommandandYarnFunctionlinking, or.yslsgeneration, will cause your project to recompile. - Enabling or disabling asset linking will cause a reimport of all
yarnprojectassets.
- Yarn Spinner settings are saved to the path
Yarn.Unity.ActionAnalyser.Actionnow has aMethodIdentifierNameproperty, which is the short form of the method name.DialogueAdvanceInputnow supports Virtual Button names in addition to KeyCodes and Input Actions.- This can be configured to work on button or key release or press. By default, the component works on release.
LineViewnow will add in line breaks when it encounters a self closing[br /]marker.- Yarn attributed Functions and Commands can now use constant values in addition to literals for their name.
- Standard library functions (e.g.
random,round_places,dice) have been moved from Yarn Spinner for Unity to the core Yarn Spinner library. - Added a
formatfunction to the standard library.- This method works identically to the C#
string.Format, but currently only accepts one parameter. format("{0}", 123)will return the string “123”.format("${0:F2}", 0.451)will return the string “$0.45”.- For more information on string formatting, see the .NET documentation on numeric formatting strings.
- This method works identically to the C#
Changed
- Update the minimum Unity version to 2021.3.
- Fixed a bug where line pauses could sometimes not happen when the user’s framerate is low.
- Fixed a bug where the Rounded Views sample wouldn’t import correctly.
- Fixed Minimal Dialogue Runner sample that was using obsolete methods.
- Fixed a bug where TMPShim wasn’t being detected.
- Standard library functions (like
random,dice,round_places, etc) have been moved to the core Yarn Spinner library. - Fixed a bug where the audio assets in the samples weren’t being linked correctly resulting in playback errors.
- Intro Sample: Moved the Character Color view to a new stand-alone object (it’s easier to explain how to do this in a tutorial!)
Analyserno longer ignores non-public methods.- This is now handled during codegen side so we can better log it.
ActionsGeneratorwill now generate C# warnings for non-private methods that are attributed asYarnFunctionorYarnCommand.ActionsGeneratorstill logs to a temporary location, but now into adev.yarnspinner.logsfolder inside the temporary location.- Auto-advancing
LineViews will no longer attempt to advance dialogue that has been stopped. - Actions Registration now dumps generated code into the same temporary folder the logs live in
ActionsGeneratorwill now generate C# warnings for incorrectly named methods that are attributed asYarnFunctionorYarnCommand.- Fixed a bug where
AudioLineProviderdidn’t allow runtime changing of the text locale. - Fixed a bug where the Unity Localisation strings tables would have duplicate lines after tagging all lines in a project.
- Updated the schema for .ysls.json files:
- Commands may no longer specify a return type.
- Functions must now specify a return type.
- Changed the definition of ‘types’ to be an enum of “string”, “number”, “bool”, or “any”.
- Enums in JSON schema are type sensitive, so a warning will be issued for types that have capital letters. To fix these warnings, change your type names in your
.ysls.jsonfile to be lowercase. (These warnings have no impact on your Yarn script editing experience or runtime behaviour.)
- Enums in JSON schema are type sensitive, so a warning will be issued for types that have capital letters. To fix these warnings, change your type names in your
- Empty nodes will no longer be included in the compiled output.
- A warning diagnostic will be generated for each empty node.
- Fixed a bug where self-referencing inferred value set statements (e.g.
<<set $a = $a + 1>>, where$ais not explicitly declared) would crash the compiler. - The language server no longer truncates XML documentation comments when it reaches a nested XML node.
- Updated dependency versions:
- Google.Protobuf: Moved from
3.15.0to3.25.2. - System.Text.Json: Moved from
7.0.2to8.0.1. - Microsoft.Extensions.FileSystemGlobbing: Moved from
7.0.0to8.0.0
- Google.Protobuf: Moved from
Removed
- Remove certain items that were previously marked as obsolete:
- Obsolete method
DialogueRunner.ResetDialogue - Obsolete property
YarnFunctionAttribute.FunctionName - Obsolete property
YarnCommandAttribute.CommandString - Obsolete method
YarnProject.GetProgram
- Obsolete method
Files
Yarn Spinner for Unity v2.4.2 (abe45d82) 29 MB
47 days ago
Yarn Spinner for Unity Samples v2.4.2 (abe45d82) 22 MB
47 days ago
Get Yarn Spinner for Unity
Buy Now$50.00 USD or more
Yarn Spinner for Unity
The friendly dialogue tool for your games.
| Status | Released |
| Category | Tool |
| Author | Yarn Spinner |
| Tags | dialogue, Narrative, storytelling, tool, Twine, Unity, writing, yarn-spinner |
More posts
- Yarn Spinner 2.4Nov 17, 2023

Leave a comment
Log in with itch.io to leave a comment.