Yarn Spinner integration

Yarn Spinner is an easy-to-use tool that lets you quickly write game dialogue and choices. This page shows how you can make use of Yarn files in your AC game.


 * 1) Import Yarn's Unity integration into your project, and set up your scene with Yarn's Dialogue Runner and Dialogue UI components.
 * 2) Create a new C# file named ACYarnVariables.cs, and copy in the code below.  Attach the new AC Yarn Variables component to your Dialogue Runner.  Assign this as the Dialogue Runner component Inspector's Variable Storage field.
 * 3) To connect a Yarn variable with AC, create either a Global or Local variable of type Bool, Int, Float, or String, and give it the same name as the Yarn variable, but without the '$' at the start.  For example, $sally_warning in Yarn becomes sally_warning in AC.
 * 4) Create a new C# file named ActionYarn.cs, and copy in the code below.  Place this in a new folder and install this folder as a custom Actions directory in AC's Actions Manager.  For more on installing custom Actions, see this tutorial.
 * 5) You can now use the new "Dialogue: Yarn" Action in your AC ActionLists to trigger Yarn nodes.  This can also optionally assign the Yan Program file that contains the node.

ACYarnVariables.cs: ActionYarn.cs: