Setting Up Your Unity Project for Yarn Spinner

When you use Yarn Spinner, you write your dialogue in .yarn files, and a .yarnproject file says which of them belong together. When these files are in your Unity project, Yarn Spinner imports them like any other asset:

  • A Yarn Project (.yarnproject) is compiled on import. The compiled result is what a Dialogue Runner runs, so this is the asset you give the Dialogue Runner.
  • A Yarn Script (.yarn) isn’t compiled on its own. When you change one, Unity reimports every Yarn Project that includes it, and they compile again.

Yarn Spinner also adds an Inspector for Yarn Projects and Yarn Scripts, a few windows, and a Project Settings page.

  • Yarn Projects: which scripts a project includes, how it compiles, and everything in its Inspector.
  • Importing Yarn Files: what happens when you add or change a .yarn file, including edits made outside Unity.
  • Editor Tools: the Yarn Spinner menus and windows, the Project Settings page, and what Yarn Spinner adds to the Inspector.
Get started Yarn Projects