API Reference
Complete reference for the StoryFlow Unity plugin API. This page covers all public classes, structs, interfaces, enums, events, and methods available in the StoryFlow.Runtime assembly.
Reading This Reference
All types in this reference are in the StoryFlow, StoryFlow.Data, StoryFlow.UI, or StoryFlow.Utilities namespaces. Inspector fields are shown as properties. C# events use the standard event Action pattern and can be subscribed to with +=. UnityEvents can be wired up in the Inspector.
StoryFlowManager
MonoBehaviour, Singleton - Manages shared state across all StoryFlowComponent instances. Persists across scene loads via DontDestroyOnLoad. Auto-creates itself at runtime when first accessed - no manual setup required. Automatically discovers the project asset in your project.
Properties
Instance StoryFlowManager static The singleton instance. Auto-creates a new manager GameObject if one does not already exist.
Project StoryFlowProjectAsset The project asset containing scripts, characters, and global variables. Assign in the Inspector or set at runtime via SetProject().
Methods
| Method | Returns | Description |
|---|---|---|
| Project | ||
SetProject(StoryFlowProjectAsset project) | void | Assigns a new project asset and reinitializes all shared state (global variables, characters, once-only options). |
GetProject() | StoryFlowProjectAsset | Returns the current project asset, or null if none is set. |
HasProject() | bool | Returns true if a project asset has been assigned. |
GetScript(string path) | StoryFlowScriptAsset | Gets a script asset by its path from the current project. Returns null if not found. |
GetAllScriptPaths() | List<string> | Returns a list of all script paths registered in the current project. |
| Save & Load | ||
SaveToSlot(string slotName) | bool | Saves global variables, runtime characters, and once-only options to the named slot. Returns true on success. |
LoadFromSlot(string slotName) | bool | Loads global state from the named slot. Fails if dialogue is active. Returns true on success. |
DoesSaveExist(string slotName) | bool | Returns true if a save exists at the specified slot. |
DeleteSave(string slotName) | void | Deletes the save at the specified slot, if it exists. |
| Reset | ||
ResetGlobalVariables() | void | Re-initializes global variables from the project asset, discarding runtime changes. |
ResetRuntimeCharacters() | void | Re-initializes runtime character data from the project asset, discarding runtime changes. |
ResetAllState() | void | Resets global variables, runtime characters, and once-only option tracking to project defaults. |
| Dialogue Tracking | ||
NotifyDialogueStarted() | void | Called by StoryFlowComponent when a dialogue session starts. Increments the active dialogue count. |
NotifyDialogueEnded() | void | Called by StoryFlowComponent when a dialogue session ends. Decrements the active dialogue count. |
IsDialogueActive() | bool | Returns true if any StoryFlowComponent currently has an active dialogue. |
// Example: manager setup and save/load
var manager = StoryFlowManager.Instance;
manager.SetProject(myProjectAsset);
// Save state after dialogue completes
manager.SaveToSlot("autosave");
// Load state later (ensure no dialogue is active)
if (manager.DoesSaveExist("autosave"))
{
manager.LoadFromSlot("autosave");
} StoryFlowComponent
MonoBehaviour - The core runtime component that drives dialogue execution. Add it to any GameObject that needs to run StoryFlow dialogue. Decorated with [DisallowMultipleComponent].
Properties
Script StoryFlowScriptAsset Reference to the script asset to run when StartDialogue() is called with no arguments. If not assigned, falls back to the project's startup script.
LanguageCode string default: "en" Language code for localized string lookup (e.g., "en", "fr", "ja").
DialogueUI StoryFlowDialogueUI Optional dialogue UI handler. If set, the component automatically binds to it and sends dialogue state updates. If left empty, a built-in fallback UI is auto-created at runtime. Set to null only if you subscribe to events directly and handle all UI yourself.
StopAudioOnDialogueEnd bool default: true When enabled, stops any playing dialogue audio when the dialogue session ends.
DialogueAudioMixerGroup AudioMixerGroup Audio mixer group for dialogue audio playback. Assign to route dialogue audio through your game's audio mix.
DialogueVolumeMultiplier float default: 1.0, range: 0-2 Volume multiplier applied to all dialogue audio playback.
Events
StoryFlowComponent provides both standard C# events (for code subscriptions via +=) and Inspector-assignable UnityEvent fields for the most common events.
C# Events
| Event | Signature | Description |
|---|---|---|
OnDialogueStarted | Action | Fired when a dialogue session starts. |
OnDialogueUpdated | Action<StoryFlowDialogueState> | Fired when the dialogue state changes (new node, text re-render, etc.). |
OnDialogueEnded | Action | Fired when the dialogue session ends. |
OnVariableChanged | Action<StoryFlowVariable, bool> | Fired when a variable value changes. The bool parameter indicates whether the variable is global. |
OnScriptStarted | Action<string> | Fired when execution enters a new script via RunScript. Parameter: script path. |
OnScriptEnded | Action<string> | Fired when execution returns from a RunScript call. Parameter: script path. |
OnError | Action<string> | Fired when an execution error occurs. Parameter: error message. |
OnBackgroundImageChanged | Action<Sprite> | Fired when a SetBackgroundImage node sets a new background. |
OnAudioPlayRequested | Action<AudioClip, bool> | Fired when a PlayAudio node requests audio playback. The bool indicates looping. |
UnityEvents (Inspector-assignable)
| Event | Type | Description |
|---|---|---|
OnDialogueStartedEvent | UnityEvent | Inspector-assignable version of OnDialogueStarted. |
OnDialogueUpdatedEvent | UnityEvent<StoryFlowDialogueState> | Inspector-assignable version of OnDialogueUpdated. |
OnDialogueEndedEvent | UnityEvent | Inspector-assignable version of OnDialogueEnded. |
Methods
| Method | Returns | Description |
|---|---|---|
| Dialogue Control | ||
StartDialogue() | void | Starts dialogue using the configured Script asset, or the project's startup script if Script is not assigned. |
StartDialogue(string scriptPath) | void | Starts dialogue with the specified script path, overriding the Script property. |
StartDialogue(StoryFlowScriptAsset script) | void | Starts dialogue with a direct reference to a script asset. |
SelectOption(string optionId) | void | Selects a dialogue option by its ID. Advances execution along the chosen path. Marks once-only options as used. |
AdvanceDialogue() | void | Advances a narrative-only dialogue node (no options). Only works when CanAdvance is true. |
StopDialogue() | void | Immediately stops dialogue execution. Fires OnDialogueEnded. Stops audio if StopAudioOnDialogueEnd is enabled. |
PauseDialogue() | void | Pauses dialogue execution. State is preserved; no further events fire until resumed. |
ResumeDialogue() | void | Resumes a paused dialogue. Execution continues from where it was paused. |
PauseExecution() | void | Pauses node execution after the current node completes. The next node is held until ResumeExecution(). |
ResumeExecution() | void | Resumes execution from where it was paused by PauseExecution(). |
PauseExecutionFor(float seconds) | Coroutine | Pauses execution for the given duration, then resumes automatically. Returns the coroutine handle. |
| State Access | ||
GetCurrentDialogue() | StoryFlowDialogueState | Returns the current dialogue state, or null if no dialogue is active. |
IsDialogueActive() | bool | Returns true if a dialogue session is currently active. |
IsWaitingForInput() | bool | Returns true if the dialogue is currently waiting for player input. |
IsPaused() | bool | Returns true if the dialogue is currently paused. |
GetProject() | StoryFlowProjectAsset | Returns the effective project asset from StoryFlowManager.Instance.Project. |
| Variable Access | ||
GetBoolVariable(string name, bool global = false) | bool | Gets a boolean variable by display name. When global is false, searches local scope first. |
SetBoolVariable(string name, bool value, bool global = false) | void | Sets a boolean variable by display name. Fires OnVariableChanged. |
GetIntVariable(string name, bool global = false) | int | Gets an integer variable by display name. |
SetIntVariable(string name, int value, bool global = false) | void | Sets an integer variable by display name. Fires OnVariableChanged. |
GetFloatVariable(string name, bool global = false) | float | Gets a float variable by display name. |
SetFloatVariable(string name, float value, bool global = false) | void | Sets a float variable by display name. Fires OnVariableChanged. |
GetStringVariable(string name, bool global = false) | string | Gets a string variable by display name. |
SetStringVariable(string name, string value, bool global = false) | void | Sets a string variable by display name. Fires OnVariableChanged. |
GetEnumVariable(string name, bool global = false) | string | Gets an enum variable by display name. Returns the current enum value as a string. |
SetEnumVariable(string name, string value, bool global = false) | void | Sets an enum variable by display name. Fires OnVariableChanged. |
GetCharacterVariable(string charPath, string varName) | StoryFlowVariant | Gets a character variable value by character path and variable name. Reads from runtime character data. |
SetCharacterVariable(string charPath, string varName, StoryFlowVariant value) | void | Sets a character variable value. Mutates runtime character data, not the source asset. |
ResetVariables() | void | Clears cached node states and re-initializes local variables from the current script asset. |
| Localization & Assets | ||
GetLocalizedString(string key) | string | Looks up a localized string using the component's LanguageCode. |
ResolveAsset<T>(string assetKey) | T | Resolves a Unity asset by key. Checks the current script's resolved assets first, then the project's. T must extend UnityEngine.Object. |
| Input Options | ||
InputChanged(string optionId, string value) | void | Reports a string input change for a dialogue input option. Wraps the value and delegates to the typed overload. |
InputChanged(string optionId, StoryFlowVariant value) | void | Reports a typed input change. Stores the value, re-interpolates dialogue text, broadcasts the update, and follows the option's "on change" edge if one exists. |
| Audio | ||
PlayDialogueAudio(AudioClip clip, bool loop) | void | Plays a dialogue audio clip. Creates an AudioSource on demand. Stops any currently playing dialogue audio first. |
StopDialogueAudio() | void | Stops the dialogue audio source if it is currently playing. |
IsDialogueAudioPlaying() | bool | Returns true if dialogue audio is currently playing. |
SetAudioAdvanceState(bool waiting, bool allowSkip) | void | Controls the audio-advance gate. When waiting is true, the component polls for audio completion and auto-advances. allowSkip determines if manual advance is allowed before audio finishes. |
// Example: subscribing to events and controlling dialogue
var storyFlow = GetComponent<StoryFlowComponent>();
storyFlow.OnDialogueStarted += () => Debug.Log("Dialogue started");
storyFlow.OnDialogueUpdated += (state) =>
{
Debug.Log($"Speaker: {state.Character?.Name}, Text: {state.Text}");
foreach (var option in state.Options)
Debug.Log($" Option: {option.Text} (id: {option.Id})");
};
storyFlow.OnDialogueEnded += () => Debug.Log("Dialogue ended");
storyFlow.OnError += (msg) => Debug.LogError($"StoryFlow error: {msg}");
// Start the dialogue
storyFlow.StartDialogue();
// Later, when the player selects an option:
storyFlow.SelectOption(selectedOptionId);
// Or advance narrative text:
storyFlow.AdvanceDialogue(); StoryFlowDialogueState
[Serializable] class - Namespace: StoryFlow.Data - Represents the current state of a dialogue node. Passed to OnDialogueUpdated listeners and returned by GetCurrentDialogue().
| Name | Type | Description |
|---|---|---|
NodeId | string | The unique ID of the dialogue node in the script graph. |
Title | string | Optional title text for the dialogue node. |
Text | string | The interpolated dialogue text with all {varname} placeholders resolved. |
Image | Sprite | The resolved image sprite for the dialogue node, or null. |
Audio | AudioClip | The resolved audio clip for the dialogue node, or null. |
Character | StoryFlowCharacterData | The resolved character data for the dialogue node. Contains name, portrait, and variables. |
TextBlocks | List<StoryFlowTextBlock> | Segmented text blocks for advanced rendering. Each block has an Id and Text. |
Options | List<StoryFlowOption> | The list of dialogue options available to the player. |
IsValid | bool | Whether this dialogue state contains valid data for rendering. |
CanAdvance | bool | true if the dialogue has a default output edge and no options - the player can click "continue" to advance. |
AudioLoop | bool | Whether dialogue audio should loop continuously. |
AudioReset | bool | Whether to stop previous audio when this dialogue has no audio assigned. |
AudioAdvanceOnEnd | bool | Whether the dialogue should auto-advance when its audio clip finishes playing. |
AudioAllowSkip | bool | Whether the player can manually advance past the audio-gated wait. |
StoryFlowOption
| Name | Type | Description |
|---|---|---|
Id | string | Unique identifier for this option. Pass to SelectOption(). |
Text | string | Display text for the option (interpolated). |
IsOnceOnly | bool | If true, this option disappears after being selected once (tracked across the session). |
IsSelected | bool | Reserved field. Currently not populated by the runtime (always false). |
InputType | string | For input options: the type of input ("string", "integer", "float", "boolean", "enum"). Empty for regular button options. |
DefaultValue | string | The default value for input options. |
StoryFlowTextBlock
| Name | Type | Description |
|---|---|---|
Id | string | Unique identifier for the text block. |
Text | string | The interpolated text content of this block. |
StoryFlowVariable
[Serializable] class - Namespace: StoryFlow.Data - Represents a single variable in a StoryFlow project. Used for both local (script-scoped) and global variables.
| Name | Type | Description |
|---|---|---|
Id | string | Unique identifier for the variable (matches the editor's internal ID). |
Name | string | Display name of the variable. Used by the Get/SetXxxVariable methods on StoryFlowComponent. |
Type | StoryFlowVariableType | The data type of this variable (Boolean, Integer, Float, String, Enum, Image, Audio, Character). |
Value | StoryFlowVariant | The current typed value of the variable. |
IsArray | bool | Whether this variable is an array type. |
EnumValues | List<string> | For enum variables: the list of allowed enum values. |
IsInput | bool | Whether this variable is marked as an input parameter for the script. |
IsOutput | bool | Whether this variable is marked as an output parameter for the script. |
StoryFlowVariant
[Serializable] class - Namespace: StoryFlow.Data - A polymorphic value container that holds a single typed value. Used as the Value field on StoryFlowVariable and for character variables.
Properties
| Name | Type | Description |
|---|---|---|
Type | StoryFlowVariableType | The active type of this variant. |
BoolValue | bool | The boolean value (valid when Type == Boolean). |
IntValue | int | The integer value (valid when Type == Integer). |
FloatValue | float | The float value (valid when Type == Float). |
StringValue | string | The string value (valid when Type == String). Also used for Image, Audio, and Character asset keys. |
EnumValue | string | The enum value as a string (valid when Type == Enum). |
ArrayValue | List<StoryFlowVariant> | The array value for array-typed variables. |
Getters
| Method | Returns | Description |
|---|---|---|
GetBool(bool defaultValue = false) | bool | Returns BoolValue if type is Boolean, otherwise defaultValue. |
GetInt(int defaultValue = 0) | int | Returns IntValue if type is Integer, otherwise defaultValue. |
GetFloat(float defaultValue = 0f) | float | Returns FloatValue if type is Float, otherwise defaultValue. |
GetString(string defaultValue = "") | string | Returns StringValue if type is String, otherwise defaultValue. |
GetEnum(string defaultValue = "") | string | Returns EnumValue if type is Enum, otherwise defaultValue. |
GetArray() | List<StoryFlowVariant> | Returns the array value, creating an empty list if null. |
Setters
| Method | Description |
|---|---|
SetBool(bool value) | Sets type to Boolean and stores the value. |
SetInt(int value) | Sets type to Integer and stores the value. |
SetFloat(float value) | Sets type to Float and stores the value. |
SetString(string value) | Sets type to String and stores the value. |
SetEnum(string value) | Sets type to Enum and stores the value. |
Reset() | Resets all value fields to their defaults (false, 0, "", null). |
Static Factory Methods
| Method | Returns | Description |
|---|---|---|
StoryFlowVariant.Bool(bool value) | StoryFlowVariant | Creates a Boolean variant. |
StoryFlowVariant.Int(int value) | StoryFlowVariant | Creates an Integer variant. |
StoryFlowVariant.Float(float value) | StoryFlowVariant | Creates a Float variant. |
StoryFlowVariant.String(string value) | StoryFlowVariant | Creates a String variant. |
StoryFlowVariant.Enum(string value) | StoryFlowVariant | Creates an Enum variant. |
StoryFlowVariant.DeserializeFromJson(StoryFlowVariableType type, string json) | StoryFlowVariant | Deserializes a variant from a type and plain-text JSON value string. Used by importers and save/load. |
Other
| Method | Returns | Description |
|---|---|---|
ToString() | string | Returns a string representation of the active value based on its type. |
StoryFlowCharacterData
[Serializable] class - Namespace: StoryFlow.Data - Runtime character data resolved from the imported character definitions. Contains the character's name, portrait image, and per-character variables.
| Name | Type | Description |
|---|---|---|
Name | string | The display name of the character. |
ImageAssetKey | string | The asset key for the character's portrait image (before resolution). |
Image | Sprite | The character's portrait image, or null. |
Variables | Dictionary<string, StoryFlowVariant> | Quick-lookup dictionary of character variables keyed by name. |
VariablesList | List<StoryFlowVariable> | Full list of character variables with metadata. Used for save/load and mutation. |
Methods
| Method | Returns | Description |
|---|---|---|
FindVariableByName(string name) | StoryFlowVariable | Finds a variable in VariablesList by its display name. Returns null if not found. |
StoryFlowSettings
ScriptableObject - Namespace: StoryFlow.Data - Project-wide settings for the StoryFlow plugin. Create via Assets > Create > StoryFlow > Settings and place in a Resources/ folder named StoryFlowSettings.
| Name | Type | Description |
|---|---|---|
Instance | StoryFlowSettings | Static property. Returns the cached settings instance loaded from Resources/StoryFlowSettings. |
DefaultProject | StoryFlowProjectAsset | Default project asset to auto-load. Leave empty for manual loading. |
DefaultImportPath | string | Default output path for imported assets, relative to Assets/. Default: "StoryFlow". |
VerboseLogging | bool | Enable verbose logging for node execution. Logs every node that is processed. |
LogVariableChanges | bool | Log variable changes at runtime. Includes variable name, value, and scope in the log. |
Static Methods
| Method | Returns | Description |
|---|---|---|
SetInstance(StoryFlowSettings settings) | void | Explicitly sets the settings instance. Useful for testing or custom initialization. |
ClearCache() | void | Clears the cached instance, forcing a fresh lookup from Resources on next access. |
UI Classes
The plugin provides an interface and an abstract base class for building dialogue UIs. You can choose whichever approach fits your project architecture.
IStoryFlowDialogueUI
interface - Namespace: StoryFlow.UI - Implement this when your class already extends another MonoBehaviour base and cannot inherit from StoryFlowDialogueUI. You must manually subscribe to events on StoryFlowComponent.
| Method | Parameters | Description |
|---|---|---|
OnDialogueStarted() | - | Called when dialogue execution begins. |
HandleDialogueUpdated(StoryFlowDialogueState state) | state: the current dialogue state | Called whenever the dialogue state changes. Primary method for rendering dialogue content. |
OnDialogueEnded() | - | Called when dialogue execution finishes. |
OnVariableChanged(StoryFlowVariable variable, bool isGlobal) | variable: the changed variable, isGlobal: scope flag | Called when a variable changes value during execution. |
StoryFlowDialogueUI
abstract MonoBehaviour, implements IStoryFlowDialogueUI - Namespace: StoryFlow.UI - The recommended base class for dialogue UIs. Extend this and override the virtual methods. The component automatically subscribes to events when initialized.
Lifecycle
| Method | Description |
|---|---|
IsBoundTo(StoryFlowComponent component) | Returns true if this UI is already bound to the given component. |
InitializeWithComponent(StoryFlowComponent component) | Binds this UI to a component, subscribing to all dialogue events. Called automatically if assigned to the component's DialogueUI field. |
Virtual Methods (Override These)
| Method | Description |
|---|---|
OnDialogueStarted() | Called when dialogue starts. Show your UI panel here. |
HandleDialogueUpdated(StoryFlowDialogueState state) | Called on every dialogue state change. Update text, options, character portrait, etc. |
OnDialogueEnded() | Called when dialogue ends. Hide your UI panel here. |
OnVariableChanged(StoryFlowVariable variable, bool isGlobal) | Called when a variable changes. Useful for reactive UI elements. |
OnBackgroundImageChanged(Sprite backgroundImage) | Called when a SetBackgroundImage node changes the persistent background. |
Convenience Methods
| Method | Returns | Description |
|---|---|---|
SelectOption(string optionId) | void | Forwards to storyFlowComponent.SelectOption(). Call from your UI button handlers. |
AdvanceDialogue() | void | Forwards to storyFlowComponent.AdvanceDialogue(). |
InputChanged(string optionId, string value) | void | Forwards to storyFlowComponent.InputChanged(). |
GetLocalizedString(string key) | string | Resolves a localized string using the component's language code. |
GetCurrentDialogue() | StoryFlowDialogueState | Gets the current dialogue state snapshot. |
IsDialogueActive() | bool | Returns true if dialogue is currently active on the bound component. |
// Example: custom dialogue UI
using StoryFlow.Data;
using StoryFlow.UI;
using UnityEngine;
using UnityEngine.UI;
public class MyDialogueUI : StoryFlowDialogueUI
{
[SerializeField] private Text nameText;
[SerializeField] private Text dialogueText;
[SerializeField] private GameObject optionsPanel;
[SerializeField] private Button continueButton;
[SerializeField] private GameObject panel;
public override void OnDialogueStarted()
{
panel.SetActive(true);
}
public override void HandleDialogueUpdated(StoryFlowDialogueState state)
{
nameText.text = state.Character?.Name ?? "";
dialogueText.text = state.Text;
// Show continue button or options
continueButton.gameObject.SetActive(state.CanAdvance);
optionsPanel.SetActive(state.Options.Count > 0);
// Build option buttons...
}
public override void OnDialogueEnded()
{
panel.SetActive(false);
}
} StoryFlowSaveHelpers
static class - Namespace: StoryFlow.Utilities - Low-level save/load utilities used internally by StoryFlowManager. Save files are stored at Application.persistentDataPath/StoryFlow/Saves/{slotName}.json.
| Member | Type / Returns | Description |
|---|---|---|
CurrentSaveVersion | string ("1.0.0") | Current save format version. Used for version compatibility checks on load. |
Save(string slotName, ...) | void | Serializes global variables, runtime characters, and once-only options to JSON and writes to disk. |
SaveAsync(string slotName, ...) | Task<bool> | Asynchronous variant of Save using non-blocking file I/O. Returns true on success. |
Load(string slotName) | StoryFlowSaveData | Reads and deserializes save data from the named slot. Returns null if the file does not exist. |
LoadAsync(string slotName) | Task<StoryFlowSaveData> | Asynchronous variant of Load. Returns null on failure. |
Exists(string slotName) | bool | Returns true if a save file exists at the named slot. |
Delete(string slotName) | void | Deletes the save file at the named slot, if it exists. |
Use StoryFlowManager Instead
For most use cases, call StoryFlowManager.SaveToSlot() and LoadFromSlot() instead of using StoryFlowSaveHelpers directly. The manager handles merging saved data back into the active runtime state.
StoryFlowNodeDispatcher
static class - Namespace: StoryFlow.Execution.NodeHandlers - The dispatch table that maps StoryFlowNodeType values to handler methods. Provides extension points for custom node types.
| Method | Returns | Description |
|---|---|---|
ProcessNode(StoryFlowComponent component, StoryFlowNode node) | void | Dispatches a node to the appropriate handler. Falls back to custom handlers if no built-in handler exists. |
RegisterHandler(StoryFlowNodeType type, Action<StoryFlowComponent, StoryFlowNode> handler) | void | Registers or overrides a handler for a built-in node type. |
UnregisterHandler(StoryFlowNodeType type) | bool | Removes a handler. Returns true if a handler was removed. |
HasHandler(StoryFlowNodeType type) | bool | Checks whether a handler is registered for the given node type. |
RegisterCustomHandler(string typeName, Action<StoryFlowComponent, StoryFlowNode> handler) | void | Registers a handler for a custom node type by string name. Use for node types not in the StoryFlowNodeType enum. |
UnregisterCustomHandler(string typeName) | bool | Unregisters a custom string-named handler. |
// Example: registering a custom node handler
StoryFlowNodeDispatcher.RegisterCustomHandler("myCustomNode",
(component, node) =>
{
Debug.Log($"Custom node executed: {node.Id}");
// Do your custom logic here, then advance to the next node:
// component.ProcessNextNodeFromSource(node.Id);
}); Enums
StoryFlowVariableType
Namespace: StoryFlow.Data - Defines the data types available for StoryFlow variables.
| Value | Description |
|---|---|
Boolean | A true/false value. |
Integer | A whole number (int). |
Float | A floating-point number. |
String | A text string. |
Enum | A named option from a predefined list. |
Image | A reference to an image asset (Sprite). |
Audio | A reference to an audio asset (AudioClip). |
Character | A reference to a character definition. |
StoryFlowNodeType
Namespace: StoryFlow.Data - Defines all node types supported by the runtime. Organized into categories:
| Category | Values |
|---|---|
| Special | Unknown (= 0, default/fallback value) |
| Control Flow | Start, End, Branch, RunScript, RunFlow, EntryFlow |
| Dialogue | Dialogue |
| Boolean | GetBool, SetBool, AndBool, OrBool, NotBool, EqualBool |
| Integer | GetInt, SetInt, PlusInt, MinusInt, MultiplyInt, DivideInt, RandomInt, GreaterInt, GreaterOrEqualInt, LessInt, LessOrEqualInt, EqualInt |
| Float | GetFloat, SetFloat, PlusFloat, MinusFloat, MultiplyFloat, DivideFloat, RandomFloat, GreaterFloat, GreaterOrEqualFloat, LessFloat, LessOrEqualFloat, EqualFloat |
| String | GetString, SetString, ConcatenateString, EqualString, ContainsString, ToUpperCase, ToLowerCase, LengthString |
| Enum | GetEnum, SetEnum, EqualEnum, SwitchOnEnum, RandomBranch |
| Type Conversions | IntToBoolean, FloatToBoolean, IntToString, FloatToString, StringToInt, StringToFloat, IntToFloat, FloatToInt, IntToEnum, BooleanToInt, BooleanToFloat, StringToEnum, EnumToString |
| Arrays | Full set of array operations for each type (Bool, Int, Float, String, Image, Character, Audio): Get*Array, Set*Array, Get*ArrayElement, Set*ArrayElement, GetRandom*ArrayElement, Add*ArrayElement, Remove*ArrayElement, Clear*Array, *ArrayLength, *ArrayContains, FindIn*Array, ForEach*Loop |
| Media | GetImage, SetImage, SetBackgroundImage, GetAudio, SetAudio, PlayAudio, GetCharacter, SetCharacter |
| Character Variables | GetCharacterVar, SetCharacterVar |