Yarn Spinner for Unity, the friendly dialogue and narrative tool
Yarn Spinner is the narrative tool used in award winning and amaznig games like DREDGE, Rift of the Necrodancer, Demonschool, Lost in Random, Night in the Woods, A Short Hike, Dredge, Frog Detective Trilogy, Button City, and many more.
"Yarn Spinner transforms interactive storytelling from a chore to a joy." - Ryan North ("MARVEL's Unbeatable Squirrel Girl", "Adventure Time", "Romeo And/Or Juliet", "Destiny 2")
Try Yarn Spinner in your browser, right now, and see how easy it is to write a branching dialogue!
Yarn Spinner makes it easy to create, localise, and integrate interactive and branching narrative, dialogue, and conversations into your games. With Yarn Spinner, writers can focus on their writing while still being able to direct control over characters, trigger game events, and manage your entire story (and all of its state). Yarn Spinner allows for incredible flexibility at every stage of your game!
Yarn Spinner provides a complete solution, including UIs, localisation, voice-over, and save and load support. You'll receive the full (and fully documented) C# source code.
Yarn Spinner is designed to be highly customised and extended to meet the needs of your game.
Yarn Spinner 3 is the latest and greatest, building on a decade of game tooling support, and includes new features like the once command, for you to indicate lines that should only ever run once (it's a clever name, right?), detours, allowing you to jump to different nodes then return to the original node, smart variables to store values that are based on other variables, enumerations and more. Yarn Spinner 3 also includes powerful features for storylets and saliency, including node groups and line groups!
We also include a large number of sample projects, which show off the different aspects and features of Yarn Spinner, including custom UI for dialogue, building a phone chat-style view, background chatter, conversation options that time out, saliency and storylets, text stying, and more!.
Yarn Spinner is the ideal dialogue solution for every member of your team:
For writers:
- create branching stories
- minimal syntax screenplay-alike format
- easy interaction via options
- graph view for visualising flow
- use commands for controlling the game
- easy line metadata via tags
For programmers:
- full C# source code included
- full API docs
- automatic linking of commands to method calls
- text based story format for easy version control
- overridable behaviours for customisation
For the team:
- localisation-first workflow
- voice-over support
- import and export of recording voice sheets
- automatic line tagging
Welcome to Yarn Spinner. We can't wait to see what you've made.
For more details check out the documentation site.
For help and to hang out with fellow Yarn Spinner users please join our Discord.
Yarn Spinner includes certain third-party components licensed under the MIT, Apache 2.0, and BSD licenses. See the file Third-Party Notices.txt in the package for details.
Release Notes
Yarn Spinner 3.0.3:
Added:
- Added a [br /] markup tag into the common markers default markup palette. This will be translated into a TextMeshPro <br> marker.
- Line Advancer will now fall back to using key codes if Input Actions are selected, but Unity Input System is not available.
- The Dialogue System prefab now creates a UI input module that matches your current input system when it's added to the scene, rather than baking in a specific input module.
Changed
- Fixed a bug where LinePresenter would not run all registered action markup handlers during a typewriter effect.
- Fixed an issue where the default Dialogue Runner prefab didn't have its LineAdvancer component configured correctly.
- Renamed actionMarkupHandlers to be eventHandlers on the LinePresenter, this fixes an easy to occur typo with the base classes ActionMarkupHandlers.
- Fixed an issue where Line Advancers set to use Key Codes would not work when the Legacy Input Manager is not available.
Yarn Spinner 3.0.2:
Added:
- The inspector for the Dialogue Runner now has a drop down for selecting the saliency strategy.
- VariableStorageBehaviour now supports adding a variable change listener for all variables.
- Added a new function, has_any_content, which takes the name of a node group and returns true if any of its member nodes could run.
Changed:
- The Yarn Spinner header in the Inspector no longer shows <u></u> markup in versions of Unity prior to Unity 6.
- LinePresenter now implements its typewriter effect with BasicTypewriter, an implementation of the IAsyncTypewriter interface.
- The typewriter effect in LinePresenter is now framerate-independent.
- Fixed an issue in UnityLocalisedLineProvider where an exception would be thrown if an asset table was not provided.
- Fixed a bug where interpolated boolean values inside markup were being incorrectly determined as a string and not a bool.
- Complexity scoring for 'when:' headers no longer counts 'not' operations. This means that 'when: $x' and 'when: not $x' both have the same score of 1.
- VirtualMachine.ContentSaliencyStrategy now defaults to RandomBestLeastRecentlyViewed, not First.
- NodeDebugInfo.LineInfo now stores ranges of text, rather than just the start position.
Removed:
- SerializableDictionary<TKey,TValue> no longer exposes non-generic IDictionary methods; instead, all operations are now correctly type-checked.
Yarn Spinner 3.0.0:
Yarn Spinner 3 is here!
There are many new features. Some highlights include:
- the once command, to mark content that should only ever be run one
- detours and returns, allowing you to jump to a node and then return to the node you came from
- features for storylets and saliency, including line groups and node groups, allowing you to specify rules for when certain nodes are run, and create mutliple nodes with the same name, and conditions that dictate when they're shown