github YarnSpinnerTool/YarnSpinner-Unity 2.2.0-beta

latest releases: v2.4.2, v2.4.0, v2.4.1...
pre-release2 years ago

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 2.2.0-beta 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#2.2.0-beta

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

  • A simple, built-in system for saving and loading Yarn variables to the built-in PlayerPrefs object has been added.
    • Call DialogueRunner.SaveStateToPlayerPrefs to save all variables to the PlayerPrefs system, and DialogueRunner.LoadStateFromPlayerPrefs to load from PlayerPrefs into the variable storage.
    • These methods do not write to file (except via PlayerPrefs, which handles disk writing on its own), and only work with variables (and not information like which line is currently being run.)
  • Metadata for each line is exposed through a Yarn Project. Metadata generally comes as hashtags similar to #line. They can be used to define line-specific behavior (no particular behavior is supported by default, each user will need to define their own).
  • When exporting Strings files, a Yarn Project will also export another CSV file with the line metadata (for each line with metadata).
  • LocalizedLines now contain a field for any metadata associated with the line.
  • YarnFunction tagged methods now appear in the inspector window for the project, letting you view their basic info.

Changed

  • YarnPreventPlayMode no longer uses WeakReference pointing to Unity.Object (this is unsupported by Unity).
  • ActionManager no longer logs every single command that it registers. (#165)
  • Line view should no longer have unusual interactions around enabling and disabling different effects (#161 and #153).
  • Improved the type inference system around the use of functions.

This has two pieces, the first is in YarnSpinner Core and adds in support for partial backwards type inference.
This means in many situations where either the l-value or r-value of an expression is known that can be used to provide a type to the other side of the equation.
Additionally now functions tagged with the YarnFunction attribute are sent along to the compiler so that they can be used to inform values.
The upside of this is in situations like <<set $cats = get_cats()>> if either $cats is declared or get_cats is tagged as a YarnFunction there won't be an error anymore.

Don't miss a new YarnSpinner-Unity release

NewReleases is sending notifications on new releases.