Skip to main content

Unity Branching Narrative & Dialogue Plugin

A free open-source package for branching narrative and dialogue in Unity, powered by StoryFlow Editor.

Build branching narratives in Unity without nested if/else chains in your game scripts. Import StoryFlow Editor projects, play dialogue with characters and choices, manage variables, save and load progress and sync edits live from the editor. Built for RPGs, visual novels, adventure games and any project that needs an interactive narrative.

Features

  • Native C# runtime with full event-driven API
  • Import and run StoryFlow Editor projects directly
  • Every node type supported including branching, loops, and arrays
  • Character system with portraits, names, and per-character variables
  • Built-in audio playback with looping and volume control
  • Save and load system with slot-based persistence
  • Live Sync with the StoryFlow Editor via WebSocket
  • Default uGUI dialogue UI with full customization support
  • Free and open-source UPM package

Example Projects

You can download, play and inspect the examples inside Unity, but editing the story requires the StoryFlow Editor app.

The Beast of Millhaven
StoryFlow Editor +

The Beast of Millhaven

A complete visual novel with RPG mechanics: character creator, merchant shop with drag-and-drop inventory, and a cave troll battle. The story, combat math and prices are authored visually in StoryFlow Editor and ship pre-synced - the interface is plain C# reacting to the plugin's events and dialogue tags.

The Unity recreation is in the works. It will ship the same way as the Godot version: open the bundled example project in StoryFlow Editor and connect to the running game over Live Sync - edit a line, watch it change in play.

Building a branching narrative in Unity

Almost every Unity project grows its own dialogue system, and almost every one of them follows the same curve. A switch on a conversation ID is fine for a prototype. Then choices need to persist, a scene has to react to something three hours back, and the whole thing becomes a state machine that nobody planned and nobody wants to touch.

The StoryFlow package moves the branching out of your MonoBehaviours. You author the narrative visually in StoryFlow Editor, export a story file, and the C# runtime resolves branching, conditions and variables at runtime. Your scripts subscribe to events and draw UI.

Three steps to your first conversation

  1. Install via UPM. Add the package through Unity's Package Manager. Unity 2022.3 LTS and later, Built-in, URP and HDRP, IL2CPP and Mono all supported.
  2. Import your story. Export from StoryFlow Editor and drop the file into your project.
  3. Call StartDialogue(). On a StoryFlowComponent from any MonoBehaviour. The default uGUI dialogue widget renders it, or implement IStoryFlowDialogueUI for your own.

What the runtime handles

Characters with portraits and per-character variables, choices and their consequences, typed variables with conditional branching, audio with looping and volume control, and slot-based save and load. Every StoryFlow node type is supported, including loops and arrays.

Because the runtime is event-driven, dialogue state is available anywhere in your project without coupling your UI to the narrative data. Live Sync over WebSocket pushes edits from the editor straight into play mode, so you can rewrite a line and see it in the scene without leaving play.

If your existing dialogue code has already turned into nested conditionals, the branching dialogue architectures guide walks through the five patterns that actually scale. For the wider category, see the branching narrative tool overview.

Frequently Asked Questions

Install the StoryFlow Unity package via UPM, import a story file exported from StoryFlow Editor and call StartDialogue() on a StoryFlowComponent. Branching logic, character display, choices and variables are handled by the C# runtime, so the branching narrative shows up on screen without nested if/else in your game scripts. If you've already hit that wall, our guide on refactoring a branching dialogue mess in Unity walks through the dialogue architectures that actually scale. The default uGUI dialogue widget renders it, and you can swap that for a custom UI by implementing IStoryFlowDialogueUI.

Yes! The Unity package is completely free and open-source. You can use it in any project, including commercial games, without paying any licensing fees for the package itself.

Yes, the package is a runtime that plays dialogue files created with StoryFlow Editor. You'll need StoryFlow Editor to create and edit your branching narratives, then export them for use with the Unity package. Check our pricing page for editor options.

Follow the Installation guide to set up the package, then work through the Quick Start tutorial to get your first dialogue running in under 10 minutes.

The package supports Unity 2022.3 LTS and later. It uses standard Unity APIs and works with both the Built-in Render Pipeline and URP/HDRP. IL2CPP and Mono scripting backends are both supported.

Absolutely! The package is released under the MIT license. You're free to use it in commercial projects, modify the source code, and distribute games that include it.

Yes. The package provides a default uGUI-based dialogue UI you can use out of the box, but you can also extend the base StoryFlowDialogueUI class or implement the IStoryFlowDialogueUI interface for fully custom UIs. The runtime broadcasts all dialogue state via C# events, so you have complete flexibility.

Yarn Spinner and Ink are scripting languages: branching dialogue lives in text files that a runtime interprets. Pixel Crushers' Dialogue System is a paid Unity-only asset with its own in-editor node interface. StoryFlow sits between them: the branching narrative is authored visually in a standalone editor, then played back by a free open-source C# runtime. The practical differences are that writers can edit the story without opening Unity, the same story file also runs in Unreal Engine and Godot, and Live Sync pushes edits straight into play mode. If you want dialogue authored in text, Yarn or Ink is the better fit.

Join our Discord community where you can ask questions, report bugs, and connect with other developers.

Yes, we're committed to maintaining and improving the package alongside the StoryFlow Editor. As an open-source project, the community can also contribute features and improvements.

Stay Updated

Get notified about plugin updates, new features, and tips for integrating StoryFlow into your projects.

We respect your privacy. Unsubscribe at any time.