All pages
Powered by GitBook
1 of 29

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

CurrentProjectFileVersion

Field in Project

Summary

The current version of .yarnproject file format.

public const int CurrentProjectFileVersion = YarnSpinnerProjectVersion3;

YarnSpinnerProjectVersion3

Field in Project

Summary

A version number representing Yarn Spinner 3.

public const int YarnSpinnerProjectVersion3 = 3;

IsValidVersionNumber(int)

Method in Project

Summary

Gets a value indicating whether number is a valid Yarn Spinner version number.

public static bool IsValidVersionNumber(int number)

Parameters

Name
Description

int number

LoadFromFile(string,string?)

Method in Project

Summary

Loads and parses a Project from a file on disk.

Parameters

Name
Description

string path

The path to the file to load.

string workspaceRoot

The path of the root of the workspace in which file is located.

Returns

The loaded Project .

public static Project LoadFromFile(string path, string? workspaceRoot = null)

Definitions

Property in

Gets or sets the path to a JSON file containing command and function definitions that this project references.

Definitions files are used by editing tools to provide type information and other externally-defined data used by the Yarn scripts.

ExcludeFilePatterns

Property in

Gets or sets the collection of file search patterns that should be excluded from this project.

If a file is matched by a pattern in , and is also matched by a pattern in , then it is not included in the value returned by .

public string? Definitions { get; set; }

Summary

Remarks

Project
public IEnumerable<string> ExcludeFilePatterns { get; set; }

Summary

Remarks

Project
SourceFilePatterns
ExcludeFilePatterns
SourceFiles

Strings

Property in

Gets or sets the location at which the localized string table may be found.

Assets

Property in

Gets or sets the location at which localized assets may be found.

public string? Strings { get; set; }

Summary

LocalizationInfo
public string? Assets { get; set; }

Summary

LocalizationInfo

GetJson()

Method in

Gets a string containing JSON-formatted text that represents this .

The , serialized to JSON.

public string GetJson();

Summary

Returns

Project
Project
Project

WorkspaceRootPlaceholder

Field in

A placeholder string that represents the location of the workspace root in paths.

public const string WorkspaceRootPlaceholder = "${workspaceRoot}";

Summary

Project

SaveToFile(string)

Method in

Saves a as JSON-formatted text to a file on disk.

Name
Description

AllowLanguagePreviewFeatures

Property in

Gets or sets a value indicating whether compiler features that are not intended for production use are allowed.

YarnSpinnerProjectVersion2

Field in

A version number representing Yarn Spinner 2.

Project()

Constructor in

Initializes a new instance of the class.

public void SaveToFile(string path);

string path

The path of the file to write to.

Summary

Parameters

Project
Project
public bool AllowLanguagePreviewFeatures { get; set; }

Summary

Project
public const int YarnSpinnerProjectVersion2 = 2;

Summary

Project
public Project()

Summary

Project
Project

IsMatchingPath(string)

Method in Project

Summary

Gets a value indicating whether path is a path that is included in this project.

Parameters

Name
Description

string path

The path to check.

Returns

true if path is a path that is included in this project; false otherwise.

CompilerOptions

Property in Project

Summary

Gets or sets a dictionary containing instructions that control how the Yarn Spinner compiler should compile a project.

public Dictionary<string, JsonValue> CompilerOptions { get; set; }
public bool IsMatchingPath(string path)

Project(string,string?)

Constructor in

Initializes a new instance of the class.

Name
Description
public Project(string path, string? workspaceRootPath = null)

string path

The value to use for the new instance's property.

Summary

Parameters

Project
Project

string workspaceRootPath

The path to the root of the current workspace, or null .

Path

BaseLanguage

Property in

Gets or sets the base language of the project, as an IETF BCP-47 language tag.

The base language is the language that the Yarn scripts is written in.

public string BaseLanguage { get; set; }

Summary

Remarks

Project

ExtensionData

Property in

Contains any data parsed from the source file that was not matched to a property on this type.

FileVersion

Property in

Gets or sets the file version of the project.

This value is required to be equal to .

DefinitionsPath

Property in

Gets the path to the Definitions file, relative to this project's location.

  • : Gets the absolute paths to the project's Definitions files.

DefinitionsFiles

Property in

Gets the absolute paths to the project's Definitions files.

Path

Property in

Gets the path that the was loaded from.

This value is not stored when the file is saved, but is instead determined when the file is loaded by , or provided when the is constructed.

public Dictionary<string, JsonElement>? ExtensionData { get; set; }

Summary

Project
public int FileVersion { get; set; }

Summary

Remarks

Project
CurrentProjectFileVersion
public string? DefinitionsPath { get; }

This property is obsolete and may be removed from a future version of Yarn Spinner: Use DefinitionsFilesPattern.

Summary

See Also

Project
Project.DefinitionsFiles
public IEnumerable<string> DefinitionsFiles { get; }

Summary

Project
public string? Path { get; set; }

Summary

Remarks

Project
Project
LoadFromFile(string,string?)
Project

Localisation

Property in Project

Summary

Gets or sets the collection of LocalizationInfo objects that store information about where localized data for this project is found.

public Dictionary<string, LocalizationInfo> Localisation { get; set; }

WorkspaceRootPath

Property in Project

Summary

The location of the root of the workspace in which this project is located.

public string? WorkspaceRootPath { get; set; }

SourceFilePatterns

Property in Project

Summary

Gets or sets the collection of file search patterns used to locate Yarn files that form this project.

public IEnumerable<string> SourceFilePatterns { get; set; }

LocalizationInfo

Class in Project

Inherits from System.Object

Summary

Stores the locations of where localized assets and a localized string table for a Yarn Project may be found.

public class LocalizationInfo

Properties

Name
Description

SourceFiles

Property in

Gets the collection of Yarn files that should be used to compile the project.

This collection uses a Yarn.Compiler.Project.Matcher to find all files specified by , excluding those that are specified by .

public IEnumerable<string> SourceFiles { get; }

Summary

Remarks

Project
SourceFilePatterns
ExcludeFilePatterns

Gets or sets the location at which localized assets may be found.

Gets or sets the location at which the localized string table may be found.

Assets
Strings

Project

Class in Yarn.Compiler

Inherits from System.Object

Summary

Yarn Projects represent instructions on where to find Yarn scripts and associated assets, and how they should be compiled.

public class Project

Classes

Name
Description

Name
Description
Name
Description
Name
Description
Name
Description

Stores the locations of where localized assets and a localized string table for a Yarn Project may be found.

Initializes a new instance of the class.

Initializes a new instance of the class.

The current version of .yarnproject file format.

A placeholder string that represents the location of the workspace root in paths.

Gets a string containing JSON-formatted text that represents this .

Gets a value indicating whether path is a path that is included in this project.

Gets or sets a value indicating whether compiler features that are not intended for production use are allowed.

Gets or sets the base language of the project, as an IETF BCP-47 language tag.

Constructors

Fields

Methods

Properties

LocalizationInfo

A version number representing Yarn Spinner 2.

A version number representing Yarn Spinner 3.

Gets a value indicating whether number is a valid Yarn Spinner version number.

Loads and parses a from a file on disk.

Saves a as JSON-formatted text to a file on disk.

Gets or sets a dictionary containing instructions that control how the Yarn Spinner compiler should compile a project.

Gets or sets the path to a JSON file containing command and function definitions that this project references.

Gets the absolute paths to the project's Definitions files.

Gets the path to the Definitions file, relative to this project's location.

Gets or sets the collection of file search patterns that should be excluded from this project.

Contains any data parsed from the source file that was not matched to a property on this type.

Gets or sets the file version of the project.

Gets or sets the collection of objects that store information about where localized data for this project is found.

Gets the path that the was loaded from.

Gets or sets the collection of file search patterns used to locate Yarn files that form this project.

Gets the collection of Yarn files that should be used to compile the project.

The location of the root of the workspace in which this project is located.

Project()
Project
Project(string,string?)
Project
CurrentProjectFileVersion
WorkspaceRootPlaceholder
YarnSpinnerProjectVersion2
GetJson()
Project
IsMatchingPath(string)
IsValidVersionNumber(int)
AllowLanguagePreviewFeatures
BaseLanguage
CompilerOptions
YarnSpinnerProjectVersion3
LoadFromFile(string,string?)
Project
SaveToFile(string)
Project
Definitions
DefinitionsFiles
DefinitionsPath
ExcludeFilePatterns
ExtensionData
FileVersion
Localisation
LocalizationInfo
Path
Project
SourceFilePatterns
SourceFiles
WorkspaceRootPath