v2.2.2
Yarn Spinner is made possible by your generous patronage. Please consider supporting Yarn Spinner's development by becoming a patron!
π©βπ Getting Help
There are several places you can go to get help with Yarn Spinner.
- Join the Yarn Spinner Discord.
- Tweet at us, at @YarnSpinnerTool.
- To report a bug, file an issue on GitHub.
π¦ How To Install Yarn Spinner
To install the most recent release of Yarn Spinner for Unity, please see the Installation Instructions in the Yarn Spinner documentation.
If you want to install this particular version of Yarn Spinner for Unity, follow these steps:
Installing Yarn Spinner for Unity v2.2.2 from Git
- Open the Window menu, and choose Package Manager.
- If you already have any previous version of the Yarn Spinner package installed, remove it.
- Click the
+
button, and click Add package from git URL... - Enter the following URL:
https://github.com/YarnSpinnerTool/YarnSpinner-Unity.git#v2.2.2
Each release will have a different URL. To upgrade to future versions of Yarn Spinner, you will need to uninstall the package, and reinstall using the new URL.
π Changes
Added
- The
DialogueReference
class, which stores a reference to a named node in a given project (and shows a warning in the Inspector if the reference can't be found) has been added. Thanks to @sttz for the contribution! - Initial work on support for the Unity Localization system has been added.
- These features are currently behind a feature flag. They are not yet considered ready for production use, and we aren't offering support for it yet.
- To access them, add the scripting define symbol
YARN_ENABLE_EXPERIMENTAL_FEATURES
. You should only do this if you know what this involves. - Yarn Project importer now has initial support for Unity's Localization system.
- A new localised line provider subclass,
UnityLocalisedLineProvider.cs
has been added.
Changed
- Fixed interrupt token handling in
VoiceOverView
that would cause it to permanently stop a Dialogue Runner's ability to progress through dialogue lines. - Fixed an issue where lines and options that contain invalid markup would cause an exception to be thrown, breaking dialogue. A warning message is now logged instead, and the original text of the line (with any invalid markup present) is delivered.
- Fixed a compiler error that made Yarn Spinner fail to compile on Unity 2020.1.
- The
AddCommandHandler(string name, Delegate handler)
andAddFunction(string name, Delegate handler)
methods onDialogueRunner
are nowpublic
.- These methods allow you to register a
Delegate
object as a command or function.Note:
We recommand that you use the pre-existingAddCommandHandler
andAddFunction
methods that takeSystem.Action
orSystem.Func
parameters unless you have a very specific reason for using this, as the pre-existing methods allow the compiler to do type-checking on your command and function implementations.
- These methods allow you to register a
- Fixed an issue that would cause compilation errors if a Unity project using Yarn Spinner also used a DLL with the same name as one of Yarn Spinner's dependencies (for example Google Protocol Buffers).
- The dependency DLLs that come with Yarn Spinner (for example,
Antlr.Runtime
,Google.Probuf
, and others) have been renamed to have the prefixYarn.
, and the assembly definition files for Yarn Spinner have been updated to use the renamed files. - Huge thanks to @Sygan for finding and describing the fix for this problem!
- The dependency DLLs that come with Yarn Spinner (for example,
- The
YarnProject.GetProgram()
method has been replaced with a property,Program
.GetProgram()
still exists, but has been marked as obsolete and will be removed in a future release of Yarn Spinner.YarnSpinner.Program
has better performance, because it caches the result of de-serializing the compiled Yarn Program.