LogoLogo
HomepageDiscordItchPatreon
Yarn Spinner 2.4
Yarn Spinner 2.4
  • โญStart Here
  • ๐ŸงถYarn Spinner Components
  • Beginner's Guide
    • Welcome
    • โžฟSyntax Basics
    • ๐Ÿ“–Writing Narratives
    • ๐ŸŽฎUsing a Game Engine
      • Yarn Spinner for Unity
      • Yarn Spinner for Godot
      • Yarn Spinner for Rust
  • Writing Dialogue in Yarn
    • โŒจ๏ธEditing with VS Code
      • Installing the Extension
      • Writing Yarn in VS Code
      • Previewing Your Dialogue
      • Writing Together
    • โœ๏ธWriting in Yarn
      • Nodes, Lines, and Options
      • Variables
      • Flow Control
      • Markup
      • Commands
      • Functions
      • Tags and Metadata
    • ๐Ÿช„Upgrading Yarn Scripts
  • Yarn Spinner for Unity
    • Overview
    • ๐Ÿ“ฆInstallation for Unity
    • โšกUnity Quick Start
    • ๐Ÿ“ฅImporting Yarn Files
      • Yarn Projects
      • Yarn Scripts
    • ๐ŸงฑComponents
      • Dialogue Runner
      • Dialogue Views
        • Line View
        • Options List View
        • Option View
        • Creating Custom Dialogue Views
        • Dialogue Advance Input
      • Variable Storage
        • In-Memory Variable Storage
        • Custom Variable Storage Components
      • Line Provider
        • Unity Localised Line Provider
        • Text Line Provider
        • Audio Line Provider
    • ๐Ÿค–Commands and Functions
    • ๐Ÿ—บ๏ธLocalisations and Assets
      • In-built Localisation
      • Unity Localisation
    • ๐Ÿ’กFrequently Asked Questions / "How Do I...?"
    • ๐ŸŽUnity Samples
      • Intro
  • Yarn Spinner for Unreal
    • ๐Ÿง‘๐Ÿผโ€๐ŸซUnreal Beta Quickstart
  • Yarn Spinner for Rust
    • Overview
    • โšกBevy Quick Start
    • ๐Ÿ“ฅCompiling Yarn Files into Yarn Projects
    • ๐ŸงฑComponents
      • Dialogue Runner and a High Level Overview
      • Dialogue Views
      • Variable Storage
      • Assets
    • ๐Ÿค–Custom Commands and Functions
      • Commands
      • Functions
    • ๐Ÿ—บ๏ธLocalisations
    • ๐Ÿ’กFrequently Asked Questions / "How Do I...?"
    • ๐ŸŽBevy Samples
  • Yarn Spinner for Godot
    • Overview
    • ๐Ÿ“ฆInstallation for Godot
    • ๐Ÿ“ฅImporting Yarn Files
      • Yarn Projects
      • Yarn Scripts
    • ๐ŸงฑComponents
      • Dialogue Runner
      • Dialogue Views
        • Line View
        • Options List View
        • Option View
        • Creating Custom Dialogue Views
      • Variable Storage
        • In-Memory Variable Storage
        • Custom Variable Storage Components
      • Line Provider
        • Text Line Provider
      • Markup Palette
    • ๐Ÿค–Commands and Functions
    • ๐Ÿ—บ๏ธLocalization
    • Advanced Guides
      • Implementing Custom Variable Storage
  • Unity Tutorial Projects
    • ๐Ÿ› ๏ธChoose-Your-Path Game
    • ๐Ÿ› ๏ธChoose-Your-Path Game with Visuals
    • ๐Ÿ› ๏ธNPC Dialogue Game
  • Unity Add-Ons
    • โญAbout Add-Ons
    • Dialogue Wheel
      • Installing Dialogue Wheel
      • Using Six-Segment Wheel
      • Using Auto-Layout Wheel
      • Dialogue Wheel Examples
    • Speech Bubbles
      • Installing Speech Bubbles
      • Using Speech Bubbles
      • Speech Bubble Examples
  • Advanced Guides
    • Building a Custom Dialogue Runner
    • Yarn Variables and Custom Variable Storage
  • About
    • Crediting Yarn Spinner
    • The Yarn Spinner Team
    • GitHub Repositories
    • Community Projects
  • API Documentation
    • C#
      • Yarn Namespace
        • BuiltinTypes
          • Any
          • Boolean
          • Number
          • String
          • TypeMappings
        • Command
          • Text
        • CommandHandler
        • Dialogue
          • DefaultStartNodeName
          • Dialogue(Yarn.IVariableStorage)
          • AddProgram(Program)
          • Continue()
          • ExpandSubstitutions(string,IList<string>)
          • GetStringIDForNode(string)
          • GetTagsForNode(string)
          • NodeExists(string)
          • ParseMarkup(string)
          • SetNode(string)
          • SetProgram(Program)
          • SetSelectedOption(int)
          • Stop()
          • UnloadAll()
          • CommandHandler
          • CurrentNode
          • DialogueCompleteHandler
          • IsActive
          • LanguageCode
          • Library
          • LineHandler
          • LogDebugMessage
          • LogErrorMessage
          • NodeCompleteHandler
          • NodeNames
          • NodeStartHandler
          • OptionsHandler
          • PrepareForLinesHandler
          • VariableStorage
        • DialogueCompleteHandler
        • DialogueException
        • FunctionType
          • Description
          • Methods
          • Name
          • Parameters
          • Parent
          • ReturnType
        • Header
          • KeyFieldNumber
          • ValueFieldNumber
          • Header()
          • Header(Header)
          • CalculateSize()
          • Clone()
          • Equals(object)
          • Equals(Header)
          • GetHashCode()
          • MergeFrom(pb::CodedInputStream)
          • MergeFrom(Header)
          • ToString()
          • WriteTo(pb::CodedOutputStream)
          • Descriptor
          • Key
          • Parser
          • Value
        • IType
          • Description
          • Methods
          • Name
          • Parent
        • IVariableStorage
          • Clear()
          • SetValue(string,bool)
          • SetValue(string,float)
          • SetValue(string,string)
          • TryGetValue(string,T)
        • Library
          • DeregisterFunction(string)
          • FunctionExists(string)
          • GenerateUniqueVisitedVariableForNode(string)
          • GetFunction(string)
          • ImportLibrary(Library)
          • RegisterFunction(string,Delegate)
          • RegisterFunction(string,Func<TResult>)
          • RegisterFunction(string,Func<T1, TResult>)
          • RegisterFunction(string,Func<T1, T2, TResult>)
          • RegisterFunction(string,Func<T1, T2, T3, TResult>)
          • RegisterFunction(string,Func<T1, T2, T3, T4, TResult>)
          • RegisterFunction(string,Func<T1, T2, T3, T4, T5, TResult>)
        • Line
          • ID
          • Substitutions
        • LineHandler
        • Logger
        • MemoryVariableStore
          • Clear()
          • SetValue(string,bool)
          • SetValue(string,float)
          • SetValue(string,string)
          • TryGetValue(string,T)
        • Node
          • ToString()
          • Headers
          • Instructions
          • Labels
          • Name
          • SourceTextStringID
          • Tags
        • NodeCompleteHandler
        • NodeStartHandler
        • OptionSet
          • Options
          • Option
            • DestinationNode
            • ID
            • IsAvailable
            • Line
        • OptionsHandler
        • PrepareForLinesHandler
        • Program
          • Combine(Program[])
          • LineIDsForNode(string)
          • ToString()
          • InitialValues
          • Name
          • Nodes
      • Yarn.Markup Namespace
        • MarkupAttribute
          • ToString()
          • Length
          • Name
          • Position
          • Properties
        • MarkupParseException
        • MarkupParseResult
          • Attributes
          • Text
          • DeleteRange(MarkupAttribute)
          • TextForAttribute(MarkupAttribute)
          • TryGetAttributeWithName(string,MarkupAttribute)
        • MarkupProperty
          • Name
          • Value
        • MarkupValue
          • ToString()
          • BoolValue
          • FloatValue
          • IntegerValue
          • StringValue
          • Type
        • MarkupValueType
          • Bool
          • Float
          • Integer
          • String
      • Yarn.Compiler Namespace
        • BasicBlock
          • AddDestination(string,Condition)
          • AddDestination(BasicBlock,Condition)
          • Ancestors
          • Descendants
          • DescendantsWithPlayerVisibleContent
          • Destinations
          • FirstInstructionIndex
          • Instructions
          • LabelName
          • Name
          • NodeName
          • PlayerVisibleContent
          • CommandElement
            • CommandText
          • Condition
            • DirectJump
            • ExpressionIsFalse
            • ExpressionIsTrue
            • Fallthrough
            • Option
          • Destination
            • Block
            • Condition
            • NodeName
            • Type
            • DestinationType
              • Block
              • Node
          • LineElement
            • LineID
          • OptionsElement
            • Options
            • Option
              • Destination
              • LineID
          • PlayerVisibleContentElement
        • CompilationJob
          • CompilationType
          • Files
          • Library
          • VariableDeclarations
          • CreateFromFiles(IEnumerable<string>,Library)
          • CreateFromFiles(string[])
          • CreateFromString(string,string,Library)
          • File
            • FileName
            • Source
          • Type
            • DeclarationsOnly
            • FullCompilation
            • StringsOnly
        • CompilationResult
          • ContainsImplicitStringTags
          • DebugInfo
          • Declarations
          • Diagnostics
          • FileTags
          • Program
          • StringTable
        • Compiler
          • Compile(CompilationJob)
          • FlattenParseTree(IParseTree)
          • GetDocumentComments(CommonTokenStream,ParserRuleContext,bool)
          • GetLineIDForNodeName(string)
        • DebugInfo
          • GetLineInfo(int)
          • LineInfo
            • CharacterNumber
            • FileName
            • LineNumber
            • NodeName
        • Declaration
          • ExternalDeclaration
          • CreateVariable(string,Yarn.IType,IConvertible,string)
          • Equals(object)
          • GetHashCode()
          • ToString()
          • DefaultValue
          • Description
          • IsImplicit
          • IsVariable
          • Name
          • Range
          • SourceFileLine
          • SourceFileName
          • SourceNodeName
          • Type
        • DeclarationBuilder
          • WithDefaultValue(System.IConvertible)
          • WithDescription(string)
          • WithImplicit(bool)
          • WithName(string)
          • WithRange(Yarn.Compiler.Range)
          • WithSourceFileName(string)
          • WithSourceNodeName(string)
          • WithType(IType)
          • Declaration
        • DeferredTypeDiagnostic
          • CreateDeferredTypeDiagnostic(string,Diagnostic)
          • diagnostic
          • Name
        • Diagnostic
          • Diagnostic(string,ParserRuleContext,string,DiagnosticSeverity)
          • Diagnostic(string,string,DiagnosticSeverity)
          • Diagnostic(string,DiagnosticSeverity)
          • Diagnostic(string,Range,string,DiagnosticSeverity)
          • Equals(object)
          • GetHashCode()
          • ToString()
          • Column
          • Context
          • FileName
          • Line
          • Message
          • Range
          • Severity
          • DiagnosticSeverity
            • Error
            • Info
            • Warning
        • FileParseResult
          • FileParseResult(string,IParseTree,CommonTokenStream)
          • Equals(object)
          • GetHashCode()
          • Name
          • Tokens
          • Tree
        • FunctionTypeBuilder
          • WithParameter(IType)
          • WithReturnType(IType)
          • FunctionType
        • IndentAwareLexer
          • IndentAwareLexer(ICharStream,TextWriter,TextWriter)
          • NextToken()
          • Warnings
          • Warning
            • Message
            • Token
        • InstructionCollectionExtensions
          • GetBasicBlocks(Node)
        • Position
          • Equals(object)
          • GetHashCode()
          • Character
          • Line
        • Project
          • CurrentProjectFileVersion
          • GetJson()
          • IsMatchingPath(string)
          • LoadFromFile(string)
          • SaveToFile(string)
          • BaseLanguage
          • CompilerOptions
          • Definitions
          • DefinitionsPath
          • ExcludeFilePatterns
          • FileVersion
          • Localisation
          • Path
          • SourceFilePatterns
          • SourceFiles
          • LocalizationInfo
            • Assets
            • Strings
        • Range
          • Range()
          • Range(int,int,int,int)
          • Equals(object)
          • GetHashCode()
          • End
          • Start
        • StringInfo
          • fileName
          • isImplicitTag
          • lineNumber
          • metadata
          • nodeName
          • text
          • ToString()
        • Utility
          • AddTagsToLines(string,ICollection<string>)
          • DetermineNodeConnections(string[])
          • ExtractStringBlocks(IEnumerable<Node>)
          • GenerateYarnFileWithDeclarations(IEnumerable<Yarn.Compiler.Declaration>,string,IEnumerable<string>,IDictionary<string, string>)
          • ParseSource(string)
          • TagLines(string,ICollection<string>)
      • Yarn.Compiler.Upgrader Namespace
        • LanguageUpgrader
          • Upgrade(UpgradeJob)
        • OrderedSet
          • OrderedSet()
          • OrderedSet(IEqualityComparer<T>)
          • Add(T)
          • Add(IEnumerable<T>)
          • Clear()
          • Contains(T)
          • CopyTo(T[],int)
          • GetEnumerator()
          • Remove(T)
          • Count
          • IsReadOnly
        • TextReplacement
          • Comment
          • OriginalText
          • ReplacementText
          • Start
          • StartLine
          • OriginalLength
          • ReplacementLength
        • UpgradeJob
          • Files
          • UpgradeType
          • UpgradeJob(UpgradeType,IEnumerable<CompilationJob.File>)
        • UpgradeResult
          • Files
          • Diagnostics
          • OutputFile
            • Diagnostics
            • IsNewFile
            • OriginalSource
            • Path
            • Replacements
            • UpgradedSource
        • UpgradeType
          • Version1to2
      • Yarn.Unity Namespace
        • Actions
          • Actions(DialogueRunner,Library)
          • AddCommandHandler(string,Action)
          • AddCommandHandler(string,Delegate)
          • AddCommandHandler(string,Func<IEnumerator>)
          • AddCommandHandler(string,Func<Coroutine>)
          • AddCommandHandler(string,MethodInfo)
          • AddCommandHandler(string,Action<T1>)
          • AddCommandHandler(string,Func<T1, IEnumerator>)
          • AddCommandHandler(string,Func<T1, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2>)
          • AddCommandHandler(string,Func<T1, T2, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3>)
          • AddCommandHandler(string,Func<T1, T2, T3, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5, T6>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5, T6, T7>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5, T6, T7, T8>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, Coroutine>)
          • AddCommandHandler(string,Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, IEnumerator>)
          • AddCommandHandler(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Coroutine>)
          • AddFunction(string,Delegate)
          • AddFunction(string,Func<TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)
          • AddFunction(string,Func<T1, TResult>)
          • AddFunction(string,Func<T1, T2, TResult>)
          • AddFunction(string,Func<T1, T2, T3, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, T6, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, T6, T7, TResult>)
          • AddFunction(string,Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)
          • AddRegistrationMethod(Action<IActionRegistration>)
          • GetLibrary()
          • RegisterActions()
          • RemoveCommandHandler(string)
          • RemoveFunction(string)
          • SetupForProject(YarnProject)
          • Commands
          • DialogueRunner
          • Library
        • AudioLineProvider
          • audioLanguage
          • textLanguageCode
          • GetLocalizedLine(Line)
          • PrepareForLines(IEnumerable<string>)
          • LinesAvailable
          • LocaleCode
        • CharacterColorView
          • RunLine(LocalizedLine,Action)
          • CharacterColorData
            • characterName
            • displayColor
        • Culture
          • DisplayName
          • IsNeutralCulture
          • Name
          • NativeName
          • Culture(System.Globalization.CultureInfo)
        • Cultures
          • GetCulture(string)
          • GetCultures()
          • HasCulture(string)
          • CurrentNeutralCulture
        • DialogueAdvanceInput
          • continueAction
          • continueActionKeyCode
          • continueActionReference
          • continueActionType
          • dialogueView
          • enableActionOnStart
          • Action
          • ContinueActionType
            • InputSystemAction
            • InputSystemActionFromAsset
            • KeyCode
            • None
        • DialogueCharacterNameView
          • onDialogueStarted
          • onNameNotPresent
          • onNameUpdate
          • DialogueStarted()
          • RunLine(LocalizedLine,Action)
        • DialogueOption
          • DialogueOptionID
          • IsAvailable
          • Line
          • TextID
        • DialogueReference
          • nodeName
          • project
          • DialogueReference()
          • DialogueReference(YarnProject,string)
          • M:Yarn.Unity.DialogueReference.op_Implicit(Yarn.Unity.DialogueReference)~System.String
          • IsValid
        • DialogueRunner
          • dialogueViews
          • lineProvider
          • onCommand
          • onDialogueComplete
          • onDialogueStart
          • onNodeComplete
          • onNodeStart
          • runSelectedOptionAsLine
          • startAutomatically
          • startNode
          • verboseLogging
          • yarnProject
          • AddCommandHandler(string,System.Action)
          • AddCommandHandler(string,Delegate)
          • AddCommandHandler(string,System.Func<IEnumerator>)
          • AddCommandHandler(string,System.Func<Coroutine>)
          • AddCommandHandler(string,MethodInfo)
          • AddCommandHandler(string,System.Action<T1>)
          • AddCommandHandler(string,System.Func<T1, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2>)
          • AddCommandHandler(string,System.Func<T1, T2, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Coroutine>)
          • AddFunction(string,Delegate)
          • AddFunction(string,System.Func<TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)
          • AddFunction(string,System.Func<T1, TResult>)
          • AddFunction(string,System.Func<T1, T2, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)
          • Clear()
          • GetTagsForNode(String)
          • LoadStateFromPersistentStorage(string)
          • LoadStateFromPlayerPrefs(string)
          • NodeExists(string)
          • OnViewRequestedInterrupt()
          • RemoveCommandHandler(string)
          • RemoveFunction(string)
          • SaveStateToPersistentStorage(string)
          • SaveStateToPlayerPrefs(string)
          • SetDialogueViews(DialogueViewBase[])
          • SetInitialVariables(bool)
          • SetProject(YarnProject)
          • SplitCommandText(string)
          • StartDialogue(string)
          • Stop()
          • CurrentNodeName
          • Dialogue
          • IsDialogueRunning
          • VariableStorage
          • StringUnityEvent
        • DialogueViewBase
          • requestInterrupt
          • DialogueComplete()
          • DialogueStarted()
          • DismissLine(Action)
          • InterruptLine(LocalizedLine,Action)
          • RunLine(LocalizedLine,Action)
          • RunOptions(DialogueOption[],Action<int>)
          • UserRequestedViewAdvancement()
        • Effects
          • FadeAlpha(CanvasGroup,float,float,float,CoroutineInterruptToken)
          • PausableTypewriter(TextMeshProUGUI,float,Action,Action,Action,Stack<(int position, float duration)>,CoroutineInterruptToken)
          • Typewriter(TextMeshProUGUI,float,Action,CoroutineInterruptToken)
          • CoroutineInterruptToken
            • Complete()
            • Interrupt()
            • Start()
            • CanInterrupt
            • WasInterrupted
        • IActionRegistration
          • AddCommandHandler(string,System.Action)
          • AddCommandHandler(string,Delegate)
          • AddCommandHandler(string,System.Func<IEnumerator>)
          • AddCommandHandler(string,System.Func<Coroutine>)
          • AddCommandHandler(string,MethodInfo)
          • AddCommandHandler(string,System.Action<T1>)
          • AddCommandHandler(string,System.Func<T1, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2>)
          • AddCommandHandler(string,System.Func<T1, T2, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, Coroutine>)
          • AddCommandHandler(string,System.Action<T1, T2, T3, T4, T5, T6, T7, T8, T9>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, IEnumerator>)
          • AddCommandHandler(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, Coroutine>)
          • AddFunction(string,Delegate)
          • AddFunction(string,System.Func<TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, TResult>)
          • AddFunction(string,System.Func<T1, TResult>)
          • AddFunction(string,System.Func<T1, T2, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, TResult>)
          • AddFunction(string,System.Func<T1, T2, T3, T4, T5, T6, T7, T8, TResult>)
          • RemoveCommandHandler(string)
          • RemoveFunction(string)
        • ICommand
          • Name
        • InMemoryVariableStorage
          • showDebug
          • Clear()
          • Contains(string)
          • GetAllVariables()
          • GetDebugList()
          • SetAllVariables(Dictionary<string, float>,Dictionary<string, string>,Dictionary<string, bool>,bool)
          • SetValue(string,bool)
          • SetValue(string,float)
          • SetValue(string,string)
          • TryGetValue(string,T)
        • LanguageAttribute
        • LineMetadata
          • GetLineIDs()
          • GetMetadata(string)
        • LineProviderBehaviour
          • GetLocalizedLine(Yarn.Line)
          • PrepareForLines(IEnumerable<string>)
          • Start()
          • LinesAvailable
          • LocaleCode
          • YarnProject
        • LineView
          • DialogueComplete()
          • DismissLine(Action)
          • GetPauseDurationsInsideLine(Markup.MarkupParseResult)
          • InterruptLine(LocalizedLine,Action)
          • OnContinueClicked()
          • PaletteMarkedUpText(Markup.MarkupParseResult,MarkupPalette)
          • RunLine(LocalizedLine,Action)
          • UserRequestedViewAdvancement()
        • Localization
          • AddLocalizedObject(string,T)
          • AddLocalizedObjects(IEnumerable<KeyValuePair<string, T>>)
          • AddLocalizedString(string,string)
          • AddLocalizedStrings(IEnumerable<KeyValuePair<string, string>>)
          • AddLocalizedStrings(IEnumerable<StringTableEntry>)
          • Clear()
          • ContainsLocalizedObject(string)
          • ContainsLocalizedString(string)
          • GetLineIDs()
          • GetLocalizedObject(string)
          • GetLocalizedString(string)
          • SetLocalizedObject(string,T)
          • ContainsLocalizedAssets
          • LocaleCode
          • UsesAddressableAssets
        • LocalizationType
          • Unity
          • YarnInternal
        • LocalizedLine
          • Asset
          • Metadata
          • RawText
          • Substitutions
          • TextID
          • CharacterName
          • Text
          • TextWithoutCharacterName
        • MarkupPalette
          • ColourMarkers
          • ColorForMarker(string,Color)
          • ColorMarker
            • Color
            • Marker
        • OptionsListView
          • DialogueComplete()
          • OnEnable()
          • Reset()
          • RunLine(LocalizedLine,Action)
          • RunOptions(DialogueOption[],Action<int>)
          • Start()
        • OptionView
          • OnOptionSelected
          • palette
          • InvokeOptionSelected()
          • OnPointerClick(PointerEventData)
          • OnPointerEnter(PointerEventData)
          • OnSubmit(BaseEventData)
          • Option
        • SampleRenderDetector
        • SerializedDictionary
          • Add(TKey,TValue)
          • Add(KeyValuePair<TKey, TValue>)
          • Clear()
          • Contains(KeyValuePair<TKey, TValue>)
          • ContainsKey(TKey)
          • CopyTo(KeyValuePair<TKey, TValue>[],int)
          • GetEnumerator()
          • Remove(TKey)
          • Remove(KeyValuePair<TKey, TValue>)
          • TryGetValue(TKey,TValue)
          • Count
          • IsReadOnly
          • this[TKey key]
          • Keys
          • Values
        • StringTableEntry
          • Comment
          • File
          • ID
          • Language
          • LineNumber
          • Lock
          • Node
          • Text
          • StringTableEntry(StringTableEntry)
          • CreateCSV(IEnumerable<StringTableEntry>)
          • Equals(object)
          • GetHashCode()
          • ParseFromCSV(string)
          • ToString()
        • TextLineProvider
          • textLanguageCode
          • GetLocalizedLine(Yarn.Line)
          • PrepareForLines(IEnumerable<string>)
          • LinesAvailable
          • LocaleCode
        • VariableStorageBehaviour
          • Clear()
          • Contains(string)
          • GetAllVariables()
          • SetAllVariables(FloatDictionary,StringDictionary,BoolDictionary,bool)
          • SetValue(string,bool)
          • SetValue(string,float)
          • SetValue(string,string)
          • TryGetValue(string,T)
        • VoiceOverView
          • audioSource
          • fadeOutTimeOnLineFinish
          • waitTimeAfterLineComplete
          • waitTimeBeforeLineStart
          • DialogueComplete()
          • DismissLine(Action)
          • InterruptLine(LocalizedLine,Action)
          • RunLine(LocalizedLine,Action)
          • UserRequestedViewAdvancement()
        • YarnActionAttribute
          • Name
        • YarnCommandAttribute
          • Injector
        • YarnFunctionAttribute
        • YarnNodeAttribute
          • yarnProjectAttribute
        • YarnParameterAttribute
          • Injector
        • YarnProject
          • baseLocalization
          • compiledYarnProgram
          • lineMetadata
          • localizations
          • localizationType
          • searchAssembliesForActions
          • GetHeaders(string)
          • GetLineIDsForNodes(IEnumerable<string>)
          • GetLocalization(string)
          • InitialValues
          • NodeNames
          • Program
        • YarnStateInjectorAttribute
          • Injector
      • Yarn.Unity.UnityLocalization Namespace
        • UnityLocalisedLineProvider
          • GetLocalizedLine(Yarn.Line)
          • PrepareForLines(IEnumerable<string>)
          • Start()
          • LinesAvailable
          • LocaleCode
    • Rust
      • bevy_yarnspinner
      • bevy_yarnspinner_example_dialogue_view
      • yarnspinner
Powered by GitBook

Community

  • Discord
  • Bluesky
  • Mastodon
  • Itch

Yarn Spinnerยฎ and Secret Labยฎ are trade marks of Secret Lab Pty. Ltd., and are used by Yarn Spinner Pty. Ltd. under license.

On this page

Was this helpful?

Edit on GitHub
Export as PDF
  1. Writing Dialogue in Yarn

Upgrading Yarn Scripts

Upgrading your Yarn Spinner 1.x scripts to Yarn Spinner 2.x is easy.

PreviousTags and MetadataNextOverview

Last updated 3 years ago

Was this helpful?

The Yarn Spinner Console (ysc) can upgrade your older .yarn scripts to the latest syntax.

The Yarn Spinner Console (ysc) is in heavy development, and is likely to have its own complete section here, in the documentation, before long. Until then, find further initial documentation via .

To upgrade your scripts:

Install the version of Yarn Spinner Console that matches your version of Yarn Spinner. You can do this via the . Choose Releases in the sidebar, and download the appropriate binary for your platform. If you just want the latest release, you can find it .

Run the upgrader on your scripts. To upgrade, you must run ysc on your command-line/terminal with the upgrade parameter and a path to a yarn file:

$ ysc upgrade myOldYarnFile.yarn

You can also run the upgrade on multiple scripts at once. To do this, you can pass in as many .yarn files as you want:

ysc upgrade myOldYarnFile.yarn myOtherOldYarnFile.yarn

By default, ysc will replace the existing .yarn files you've passed in, as part of the upgrade. If you don't want it to do this, either make sure you have a backup, or pass in the --output-directory option, after the upgrade parameter. For example:

ysc upgrade --output-directory ./output myOldYarnFile.yarn
๐Ÿช„
its GitHub project
Yarn Spinner Console GitHub Project
here