Pardon our dust! Docs for Yarn Spinner for Unity 3.2 and Yarn Spinner for Godot C# are on docs.yarnspinner.dev (the old docs site). Docs for Yarn Spinner for Unity 3.3 (pre-release, out ASAP), Yarn Spinner for Godot GDScript and Yarn Spinner for Unreal Engine (work in progress) are on /docs/ (the new docs site).

StringTableEntry

Represents a single entry in the string table
public partial struct StringTableEntry

Inherits from System.ValueType

#Constructors

#StringTableEntry(StringTableEntry)

Initializes a new instance of the StringTableEntry struct, copying values from an existing instance.
public StringTableEntry(StringTableEntry s)

Parameters

#Fields

#Comment

A comment used to describe this line to translators.
public string Comment;

Type String

#File

The name of the Yarn script in which this line was originally found.
public string File;

Type String

#ID

The line ID for this line. This value will be the same across all localizations.
public string ID;

Type String

#Language

The language that the line is written in.
public string Language;

Type String

#LineNumber

The line number in the file indicated by File at which the original version of this line can be found.
public string LineNumber;

Type String

#Lock

A string used as part of a mechanism for checking if translated versions of this string are out of date.
public string Lock;

Type String

This field contains the first 8 characters of the SHA-256 hash of the line's text as it appeared in the base localization CSV file.

When a new StringTableEntry is created in a localized CSV file for a .yarn file, the Lock value is copied over from the base CSV file, and used for the translated entry.

Because the base localization CSV is regenerated every time the .yarn file is imported, the base localization Lock value will change if a line's text changes. This means that if the base lock and translated lock differ, the translated line is out of date, and needs to be updated.

#Node

The name of the node in which this line was originally found.
public string Node;

Type String

This node can be found in the file indicated by File.

#Text

The text of this line, in the language specified by Language.
public string? Text;

Type String

#Methods

#CreateCSV(IEnumerable<StringTableEntry>)

Creates a CSV-formatted string containing data from entries.
public static string CreateCSV(IEnumerable<StringTableEntry> entries)

Parameters

  • entriesIEnumerable<Yarn.Unity.StringTableEntry>
    The StringTableEntry values to generate the spreadsheet from.

Returns String: A string containing CSV-formatted data.

#Equals(object)

public override bool Equals(object obj)

Parameters

  • objobject

Returns Boolean

#GetHashCode()

public override int GetHashCode()

Returns Int32

#ParseFromCSV(string)

Reads comma-separated value data from sourceText, and produces a collection of StringTableEntry structs.
public static IEnumerable<StringTableEntry> ParseFromCSV(string sourceText)

Parameters

  • sourceTextstring
    A string containing CSV-formatted data.

Returns IEnumerable: The parsed collection of StringTableEntry structs.

Exceptions

  • ArgumentException
    Thrown when an error occurs when parsing the string.

#ToString()

public override string ToString()

Returns String

Generated from Yarn Spinner for Unity 3.3.