This tutorial shows you how to install Yarn Spinner for Unity, the Unity integration for running Yarn and Yarn Spinner scripts in your Unity-based games.
The main way we recommend to install Yarn Spinner for Unity is via the Package Manager.
You can install the Yarn Spinner package into your project using the Package Manager window in Unity.
Before you can install Yarn Spinner from OpenUPM, you first need to configure your project so that it knows where to get the package from.
- 1.In Unity, open the Edit menu, and choose Project Settings.
- 2.In the list of sections at the left hand side of the window, select Package Manager.
This window is where you tell Unity about where to find packages that come from registries besides Unity's built-in one.
- 1.In the Name field, type
- 2.In the URL field, type
- 3.In the Scopes field, type
- 4.Click Save.
When you're done, the settings window should look like this:
You can now install Yarn Spinner itself.
- 1.Open the Window menu, and choose Package Manager.
- 2.In the toolbar, click Packages: In Project, and choose My Registries.
- 1.Yarn Spinner will appear in the list. Select it, and click Install.
Yarn Spinner will download and install into your project.
You can verify that everything is imported succesfully by looking for Yarn Spinner under Packages, in the Project pane.
Verify that Unity has the package by checking the Packages folder of the Project pane.
As an alternative to downloading Yarn Spinner from OpenUPM, you can install Yarn Spinner by downloading the package directly from GitHub, where the project's source code is stored.
To install Yarn Spinner from GitHub, follow these instructions.
- 1.In Unity, open the Window menu, and choose Package Manager.
- 2.Click the
+button, and choose "Add package from git URL".
- 1.In the text field that appears, enter the following URL:
- 1.The project will download and install. This might take a moment.
Once you've installed Yarn Spinner, you're ready to start using it!