All pages
Powered by GitBook
1 of 2

Loading...

Loading...

Installation for Unity

This page shows you how to install Yarn Spinner for Unity, the Unity integration for running Yarn and Yarn Spinner scripts in your Unity-based games.

You can download and install Yarn Spinner for Unity in a variety different ways.

Yarn Spinner for Unity 3 is compatible with Unity version 2022.3 and newer. If you need to use an older version of Unity, use Yarn Spinner 2.x, which supports Unity 2021.3.

Yarn Spinner is developed in the open, and the best ways to download and install Yarn Spinner for Unity, and the ones that support us to continue developing it the most are via the Yarn Spinner Itch.io Store and the Unity Asset Store.

Install from the Unity Asset Store

First, visit the Unity Asset Store page for Yarn Spinner for Unity, and add it to your cart, and complete your purchase while logged into the same Unity account you use to activate Unity.

Once you've purchased Yarn Spinner for Unity, you'll find the Add to Cart button replaced by an Open in Unity button. Click this button to launch Unity, and the Package Manager will locate your purchased package:

Once the Package Manager has located the package, you can use the Download button to fetch it:

Once Yarn Spinner for Unity has downloaded, you can use the Import button to start the process of adding it to your project:

This will trigger the Import Unity Package workflow, where you can use the Import button to add the Yarn Spinner for Unity package to your project:

And with that, you're ready to use Yarn Spinner! You might also want to download and import the Yarn Spinner for Unity Samples as a .unitypackage, from here.

You can review for further guidance on working with purchased packages.

Install from Itch.io

First, visit the Yarn Spinner Itch.io Store, and click the Buy Now button, and complete the checkout process.

Once you've purchased Yarn Spinner, you'll find a Download button at the top of the page:

The download button will take you the following page, where you can download the Yarn Spinner for Unity .unitypackage:

Once you've downloaded the .unitypackage, with the Unity project you want to use it in open and ready to go, double click it. Unity will then allow you to import the package into your project:

Install from GitHub

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.

Where possible, we recommend installing Yarn Spinner via a purchased .unitypackage from the or the .

To install Yarn Spinner from GitHub, follow these instructions.

  1. Make sure your system has Git (minimum version 2.14.0) installed.

  2. In Unity, open the Window menu, and choose Package Manager.

  3. Click the + button, and choose "Add package from git URL".

  4. In the text field that appears, enter the following URL: &#xNAN;https://github.com/YarnSpinnerTool/YarnSpinner-Unity.git#current Be sure to type the URL exactly as it appears in this document.

  5. The project will download and install. This might take a moment.

Install via OpenUPM

You can also install the Yarn Spinner package into your project using the Package Manager window in Unity. Specifically, Yarn Spinner is available via the .

In order to follow the instructions in this section, your project needs to be using Unity 2020.1 or higher. If your project is using an earlier version of Unity, we recommend installing Yarn Spinner from Git.

Setting Up the OpenUPM Registry in Your Project

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 OpenUPM.

  2. In the URL field, type https://package.openupm.com.

  3. In the Scopes field, type dev.yarnspinner.

When you're done, the settings window should look like this:

You can now install Yarn Spinner itself.

Installing the Yarn Spinner package

  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.

What's the difference between the versions?

Itch.io
Asset Store
Manual

Full Unity Integration

✅ Included

✅ Included

✅ Included

Yarn Spinner is an open source project. You can directly support the Yarn Spinner Team by purchasing Yarn Spinner from or the , but it will always have a free option as well. To support the continued development of Yarn Spinner, purchase Yarn Spinner for Unity from one of the storefronts. This is the best way to directly support the Yarn Spinner team.

Unity Quick Start

Quickly get started with a simple scene.

Want to use Yarn Spinner in a new scene in Unity right away? Follow these steps. If this is your first time using Yarn Spinner, or you're a bit unsure how it all works, we suggest reading the rest of the documentation first!

Basic Yarn Spinner for Unity Usage

  1. Install Unity 2022.3 or newer.

  2. Create a new empty Unity project, by following the instructions in the Unity manual.

  3. Install Yarn Spinner into the project, by following the instructions in Installation for Unity.

  4. Add a Dialogue System to the scene:, by opening the GameObject menu and choosing Yarn Spinner -> Dialogue System.

  5. Create a new Yarn Spinner Script, by opening the Assets menu and choosing Create -> Yarn Spinner -> Yarn Script. Name the new file HelloYarn.

  6. Open the new Yarn script by double-clicking it.

    1. Select all of the text in the file, and delete it.

    2. Copy the text below, and paste it into the file.

title: Start
---
Wow!
My first ever Yarn script in Unity!

-> Gosh!
-> Incredible!
-> I'm amazed!

Anyway, time to get writing!
===

You can learn about our recommended editor, Visual Studio Code with the Yarn Spinner for Visual Studio Code extension.

  1. Save the file and return to Unity.

  2. Create a new Yarn Project that uses this script, by selecting the HelloYarn file, and clicking the Create New Yarn Project button in the Inspector. This will create a new Yarn Project called Project. Projects are collections of Yarn scripts that get compiled together, and can be used with a Dialogue Runner.

  3. Make the Dialogue Runner use the Project by dragging the Project you just made into the Dialogue Runner's Yarn Project field.

  4. Play the game by clicking the Play button at the top of the window. Your dialogue will appear!

Click Save.

✅ Included

✅ Included

Unity Localization

✅ Included

✅ Included

✅ Included

Voice-over

✅ Included

✅ Included

✅ Included

Community Support

✅ Included

✅ Included

✅ Included

Direct Support

✅ Included

✅ Included

Where possible, we recommend installing Yarn Spinner via a purchased .unitypackage from Itch.io or the Unity Asset Store.

OpenUPM registry
Unity's documentation for using the Asset Store
Yarn Spinner Itch.io
Unity Asset Store
Itch
Unity Asset Store
Text Animator for Yarn Spinner
Verify that Unity has the package by checking the Packages folder of the Project pane.