Installing Yarn Spinner for Unity
There are two ways to install Yarn Spinner for Unity: via the Unity Package Manager, and via a .unitypackage
file.
Install via the Unity Package Manager (recommended)
You can install the Yarn Spinner package into your project via OpenUPM, or you can do it manually by editing your project’s manifest.json
file.
Install via OpenUPM
Yarn Spinner is available on the OpenUPM registry. This is the simplest way to install Yarn Spinner, and makes it easy to keep it up to date.
Once OpenUPM is installed, open a terminal inside your Unity project’s directory, and run the following command:
openupm add dev.yarnspinner.unity
Yarn Spinner will download and install into your project.
Install manually
To install the package manually, follow these steps.
Unity 2019.3 and later
If you’re using Unity 2019.3 or later, you can add the package directly:
- In Unity, open the Window menu, and choose Package Manager.
- Click the
+
button, and choose “Add package from git URL”.
- Enter the following URL:
https://github.com/YarnSpinnerTool/YarnSpinner-Unity.git
. - The project will download and install.
Unity 2018.4 to Unity 2019.2
If you’re using an earlier version of Unity, you’ll need to add the package by updating your project’s manifest file:
- Go to the folder that your project is in.
- Open the
Packages
folder. - Open the file
manifest.json
in your text editor (for example, Visual Studio Code.) - Update the file to include the following line, highlighted in bold (don’t forget the comma at the end!):
{
"dependencies": {
"dev.yarnspinner.unity": "https://github.com/YarnSpinnerTool/YarnSpinner-Unity.git",
"com.unity.2d.sprite": "1.0.0",
...
- Return to Unity, and Yarn Spinner will download and install.
Install as a file
If you don’t want to install Yarn Spinner as a package, you can download it as a .unitypackage
file, and extract it into your project.
To download and install the file, follow these steps:
- In Unity, open the Window menu, and choose Package Manager.
- Select Text Mesh Pro, and click the Install button. (This package is required for Yarn Spinner to work.)
- Next, open your browser, and go to the most recent release of Yarn Spinner for Unity on GitHub.
- Download the
.unitypackage
for that release.
- Open the
.unitypackage
. Unity will ask which files you want to add. In almost every case, you’ll want to import all files.
6. Click Import.
Next Steps
Once you’ve installed Yarn Spinner, you’re ready to start using it! You may want to start with the tutorial.