2.2.0-beta
Pre-releaseYarn 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 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 thePlayerPrefs
system, andDialogueRunner.LoadStateFromPlayerPrefs
to load fromPlayerPrefs
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.)
- Call
- 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).
LocalizedLine
s 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 usesWeakReference
pointing toUnity.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.