Skip to content

v2.2.2

Compare
Choose a tag to compare
@github-actions github-actions released this 31 Oct 06:29

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.

πŸ“¦ 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) and AddFunction(string name, Delegate handler) methods on DialogueRunner are now public.
    • These methods allow you to register a Delegate object as a command or function.

      Note:
      We recommand that you use the pre-existing AddCommandHandler and AddFunction methods that take System.Action or System.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.

  • 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 prefix Yarn., 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 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.