Unity Plugin Changelog
New updates and improvements to the StoryFlow plugin for Unity.
Unity Plugin v1.2.1
Typed Map Get/Set API
Adds typed get and set methods for map variables on StoryFlowComponent, so game code reads and writes maps as native Dictionaries without unpacking StoryFlowVariant.
What's New
New Features
- Typed map get/set API: read and write map variables from C# as a native
Dictionarywithout unpackingStoryFlowVariant. Eight typed getters cover the supported key and value combinations:GetStringToBoolMap,GetStringToIntMap,GetStringToFloatMap,GetStringToStringMapand the integer-keyGetIntToBoolMap,GetIntToIntMap,GetIntToFloatMap,GetIntToStringMap, each returning aDictionary<TKey, TValue>. TheStringTo*getters read both string-keyed and enum-keyed maps, and*ToStringMapresolves string and enum values through the string table while returning image, audio and character values as raw asset keys - Typed map setters:
SetStringToBoolMap,SetStringToIntMap,SetStringToFloatMap,SetStringToStringMapand the matchingSetIntTo*Mapmethods write a wholeDictionaryinto a map variable. Writes fireOnVariableChangedand live-refresh the active dialogue. A type mismatch logs a warning and leaves the variable untouched. Passing a null dictionary clears the map GetMapKeysInOrder: returns a map variable’s keys as aList<string>in insertion order, the deterministic way to walk a map’s entries. Every map accessor takes an optionalglobalflag to target global variables
Unity Plugin v1.2.0
Map Variables, Modulo Nodes & Save/Load Fixes
Adds full map variable support with all map node types, forEachMap iteration, a public GetMapVariable API and map save/load, introduces modulo and moduloFloat nodes and fixes array variables not surviving save/load along with several array and character variable execution bugs.
What's New
New Features
- Map variables: full support for the editor’s map variable type. Maps preserve insertion order, support any key and value type combination and can be declared on projects and scripts. The importer parses map variables and their default entries from synced script and project data
- Map nodes: all map node types now execute:
getMap,setMap,getMapValue,setMapValue,hasMapKey,mapSize,mapKeys,mapValues,removeMapKeyandclearMap.mapKeysandmapValuesproduce arrays that plug into the existing array nodes,getMapValueexposes anisValidoutput alongside the typed value and read nodes evaluate lazily inside condition and value chains setMapaliasing:setMappoints the target variable at the source variable’s live map storage rather than copying it, matching the editor runtime. Mutators (setMapValue,removeMapKey,clearMap) modify the origin map in place so every aliased variable and downstream chain observes the change.runScriptoutput sources are snapshotted instead, never aliasedforEachMaploops: iterate over map entries with key and value outputs on each iteration. The loop walks a snapshot of the entries taken when it starts, so mutating the map inside the loop body does not affect iterationGetMapVariable(name, global): new public method on StoryFlowComponent that returns a map variable’s entries asList<StoryFlowMapEntry>in insertion order. String, enum, image, audio and character values are resolved through the string table automatically while keys stay raw. The returned entries are deep copies, so game code can never corrupt aliased map storage- Maps in
RunScriptports: map variables pass throughrunScriptinput parameters and return through output parameters like every other variable type - Map save/load: global map variables round-trip through save slots, including entry order. The save format version is unchanged and existing saves load exactly as before
- Modulo nodes: new
modulo(integer) andmoduloFloatnodes for remainder math. Both return 0 when the divisor is zero, consistent with the divide nodes
Bug Fixes
- Fixed array variables not surviving save/load: the save path serialized array variables through the scalar
ToString()path, writing garbage values that loaded back as empty arrays. Arrays are now written as proper JSON arrays in the same dialect the importer uses, numeric elements round-trip under comma-decimal cultures and parse failures log a warning instead of being swallowed. Scalar save data is byte-identical and legacy saves load exactly as before - Fixed
set*ArrayElementandremoveFrom*Arrayreading the wrong inline data fields: the export dialect renames the inlineindexandvaluefields on these nodes, so unwired index and value inputs read empty fields and the operations targeted element 0 or wrote default values. All array element setters, appenders and removers now read the correct exported field names - Fixed
setCharacterVarsilently dropping writes to array character variables: array values were coerced to scalars, discarding every graph write to an array character variable. Array-typed character variables now evaluate the wired array input or inline JSON array and store a proper container copy - Fixed
setCharacterVarignoring wired image, audio and character values: scalar variables of these types resolved against the string input handle, so connected node chains were ignored. Each type now has its own typed input handle - Fixed
setCharacterVarandrunScriptoutput arrays not being accepted as array sources in evaluator chains, so forEach loops and array nodes can consume them directly - Fixed unwired
get*ArrayElementgetters always reading element 0 instead of falling back to the node’s inline index - Fixed
setBackgroundImagenot being usable as an image source in value chains - Fixed
stringToEnumpassing invalid values through: the node returned its raw string input verbatim, so non-matching or empty inputs produced invalid enum entries. It now validates against the downstream enum’s values list and falls back to the first enum value when nothing matches - Fixed multi-output source nodes (
forEachMapkey and value,getMapValueisValid,runScriptoutputs) returning the wrong output when evaluated through dual-input helper paths, because the source handle was not propagated during evaluation
Improvements
- Execution traces no longer log NODE and EDGE lines for start nodes, matching the editor’s HTML runtime so cross-runtime trace comparisons diff 1:1
Unity Plugin v1.1.2
Array Setters, Character APIs & Forward-Compatible Dispatch
Adds public Set/Add array variable setters, character portrait and live-update APIs, an opt-out for the built-in fallback UI, and makes evaluator chains and node dispatch forward-compatible with newer script node types.
What's New
New Features
Set*ArrayVariablesetters — new public methods on StoryFlowComponent for replacing array variables from C# at runtime:SetBoolArrayVariable,SetIntArrayVariable,SetFloatArrayVariable,SetStringArrayVariable,SetEnumArrayVariable,SetImageArrayVariable,SetAudioArrayVariable,SetCharacterArrayVariable. Each broadcastsOnVariableChangedand re-renders the current dialogue so option visibility and text interpolation refresh automaticallyAdd*ArrayElementappenders — new public methods on StoryFlowComponent for appending a single element to an array variable:AddBoolArrayElement,AddIntArrayElement,AddFloatArrayElement,AddStringArrayElement,AddEnumArrayElement,AddImageArrayElement,AddAudioArrayElement,AddCharacterArrayElement. Match the in-graphaddTo*Arraynode semantics and initialize the underlying list when called on a fresh variable- Character query APIs —
GetCharacter(path)returns the liveStoryFlowCharacterData,GetCharacterVariables(path)lists the custom variable names on a character, andGetCharacterPortrait(path, assetKey = "")resolves a Sprite using the character’s own resolved-asset pool before falling back to the standard script then project cascade. Useful for rendering multi-character UIs without inspecting the dialogue state GetCharacterArrayVariable(name)— new public method that reads a script or global character-array variable and returns the contained character paths as aList<string>, ready to pass toGetCharacter,GetCharacterVariableandGetCharacterPortraitOnCharacterVariableChangedevent — new event on StoryFlowComponent that fires whenever aSetCharacterVarnode mutates a character’s built-inNameorImagefield or one of its custom variables. Fires alongsideOnVariableChanged, not instead of itBuiltInUIStyle.None— new value on theBuiltInUIStyleenum. When set onStoryFlowComponent.UIStylewith noDialogueUIassigned, the plugin skips the auto-created fallback UI entirely so game code can drive rendering through the C# events.DefaultandPortraitcontinue to spawn the built-in fallback as beforeGetCharacterVariablenow also returns the built-inImagefield (current portrait asset key), symmetrically withName
Bug Fixes
- Fixed
*ArrayContainsandFindIn*Arrayevaluators ignoring the node’s inlinevaluefield — when the array input was connected but the value input was left unwired, the evaluators followed the array edge instead of reading the inline value, causingBoolArrayContains,IntArrayContains,FloatArrayContains,StringArrayContains,ImageArrayContains,AudioArrayContains,CharacterArrayContainsand the matchingFindIn*Arraynodes to always returnfalse/-1 - Fixed
FindInputEdgeprefix fallback returning the wrong edge for short-prefix lookups — a lookup forstringon a node with only astring-array-1edge incorrectly resolved to the array edge, with the same problem forbooleanvsboolean-condition/boolean-array-1andintegervsinteger-index. The fallback now requires the trailing segment to be either a purely numeric option ID (e.g.string-2) or a single literal token without an internal hyphen (e.g.string-array-array), so forEach loops and inline-value fallbacks resolve the correct edge - Fixed stale integer and float caches surviving a public
Set*ArrayVariableorAdd*ArrayElementcall — option visibility conditions that comparedarrayLengthorfindIn*Arrayresults now see the new values on the immediate re-render instead of the previous pass’s cached results
Improvements
- Unsupported node types in evaluator chains (boolean, integer, float, string, enum, array) no longer return a silent default — the plugin now logs a one-shot
[StoryFlow] Unsupported node typewarning per node per dialogue run, so scripts authored against a newer editor build surface the mismatch instead of quietly flipping branches or storing zeros - The node dispatcher no longer halts when it encounters an unknown node type — it logs a warning and follows the default outgoing edge, so newer scripts keep running on older plugin builds rather than stalling at the first unrecognized node
Unity Plugin v1.1.1
Array Variable API & String Localization Fix
Adds public GetArrayVariable method for reading array variables from C# and fixes GetStringVariable returning raw string table keys instead of localized text.
What's New
New Features
GetArrayVariable(name, global)— new public method on StoryFlowComponent that returnsList<StoryFlowVariant>for any array type (string, int, float, bool, enum, image, audio, character). String and enum values are resolved through the string table automatically
Bug Fixes
- Fixed
GetStringVariablereturning string table keys instead of localized text — the method now resolves values through the string table before returning, so callers get the actual displayed text rather than internal keys likestr_0
Unity Plugin v1.1.0
Data-Only Sync, Portrait UI & Execution Fixes
Adds support for data-only WebSocket sync (skip asset copying for fast iteration), a new Portrait dialogue UI with 2D sprite rendering, fixes asset serialization on first import, and resolves multiple execution issues with RunScript, arrays, and variable access.
What's New
New Features
- Data-only sync support — when the StoryFlow Editor syncs with “Data Only” enabled, the plugin reuses previously imported assets from the Unity project instead of requiring source files in the build directory, enabling fast script-only iteration without re-copying images and audio
- Added
StoryFlowRuntimeUIPortrait— alternative built-in dialogue UI that renders background and character images as 2D SpriteRenderers in world space instead of UI Image components. Select via the newUI Styledropdown on StoryFlowComponent (requires orthographic camera) - Added
BuiltInUIStyleenum on StoryFlowComponent to choose between Default and Portrait built-in UI styles when no custom DialogueUI is assigned - Imported sprites are now configured as Single mode with Full Rect mesh and Bottom Center pivot, preserving transparent areas used for image positioning
Bug Fixes
- Fixed assets not loading on first import —
AssetDatabase.CreateAsset()is now called after all data is set on ScriptableObjects, ensuring the first disk write contains the full serialized state. Previously, first import after deleting the output folder produced empty script assets that required a second sync to fix - Fixed
PlayAudionot resolving audio assets from character or project resolved assets - Fixed
SetCharacterVarwith Image type not evaluating connected node chains for the value - Fixed media variable evaluation (
GetImage,GetAudio) not checking all asset resolution sources - Fixed
RunScriptoutput parameters not passing return values back to the calling script - Fixed array
Push,Pop,RemoveAt, andInsertoperations not correctly modifying the source array - Fixed
ForEachIntLoopnot returning the current element value via the source handle - Fixed
forEachloops not clearing boolean evaluation caches between iterations - Fixed character variable arrays not being accessible as forEach loop sources
- Fixed variable access (
GetBoolVariable,SetBoolVariable, etc.) failing when called outside of active dialogue - Fixed character variable lookup failing due to variables being keyed by internal ID instead of display name
Improvements
- Added execution trace logging (
[SF-TRACE]prefix) for node processing, edge traversal, variable changes, and script calls — matches the trace format used by the Godot and Unreal plugins for cross-runtime comparison - LiveSync port and output path now persist across Unity editor restarts via EditorPrefs
- Removed
CreateAssetMenuattributes from StoryFlow asset types to prevent accidental manual creation
Unity Plugin v1.0.2
Text Block Visibility & Rendering
Fixes text blocks not appearing in dialogue by adding visibility condition evaluation and rendering support to both built-in UI implementations.
What's New
Bug Fixes
- Fixed text blocks in dialogue nodes ignoring their visibility conditions — they now use the same evaluation as dialogue options
- Fixed text blocks not rendering in the default dialogue UI and the runtime fallback UI — both now display text blocks as non-interactive labels above options
Unity Plugin v1.0.1
String Variables & Audio Fixes
Fixes string variable interpolation, array deserialization, node input matching, and audio behavior on dialogue re-render.
What's New
Bug Fixes
- Fixed string variables displaying raw localization keys instead of actual text in dialogue
- Fixed string array variables not deserializing default values, causing RANDOM nodes to return empty
- Fixed connected node inputs (e.g. SET receiving value from RANDOM) not being found due to handle suffix mismatch
- Fixed dialogue audio restarting when returning from a Set node with no outgoing edge - now uses clip reference comparison matching editor behavior
- Removed unused IsEnteringDialogueViaEdge flag
Unity Plugin v1.0.0
Initial Release
The first official release of the StoryFlow plugin for Unity, bringing full dialogue runtime support to Unity projects.
What's New
New Features
- Full Runtime Engine: Complete execution engine with 160+ node types
- StoryFlow Component: MonoBehaviour for running dialogues with full C# event-driven API
- Zero-Setup Workflow: Auto-creating StoryFlowManager, auto-project discovery, auto-fallback UI
- Variable System: Boolean, integer, float, string, enum, image, audio, and character types
- Array Operations: Full array support with ForEach loops across all variable types
- Text Interpolation: Live variable interpolation with
{varname}and{Character.Name}syntax - Script Execution: RunScript (call/return with parameters) and RunFlow (jump with exit flows)
- Character System: GetCharacterVar/SetCharacterVar with built-in Name and Image fields
- Audio Playback: Loop, reset, advance-on-end, and allow-skip support
- Background Images: Dynamic background image support with persistence and reset
- Save & Load: Slot-based persistence for global variables, characters, and once-only options
- Built-in Dialogue UI: Default uGUI dialogue UI with auto-fallback when no custom UI is assigned
- Custom Inspector: Runtime debugging directly in the Inspector
- JSON Importer: Import StoryFlow Editor projects preserving folder structure
- Live Sync: WebSocket client with auto-reconnect across play mode transitions
- Toolbar Button: StoryFlow logo button with Connect/Sync toggle
Unreal Engine Plugin