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

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

Constructors

NameDescription
Project()Initializes a new instance of the Project class.
Project(string,string?)Initializes a new instance of the Project class.

Fields

NameDescription
CurrentProjectFileVersionThe current version of .yarnproject file format.
WorkspaceRootPlaceholderA placeholder string that represents the location of the workspace root in paths.
YarnSpinnerProjectVersion2A version number representing Yarn Spinner 2.
YarnSpinnerProjectVersion3A version number representing Yarn Spinner 3.

Methods

NameDescription
GetJson()Gets a string containing JSON-formatted text that represents this Project .
IsMatchingPath(string)Gets a value indicating whether path is a path that is included in this project.
IsValidVersionNumber(int)Gets a value indicating whether number is a valid Yarn Spinner version number.
LoadFromFile(string,string?)Loads and parses a Project from a file on disk.
SaveToFile(string)Saves a Project as JSON-formatted text to a file on disk.

Properties

NameDescription
AllowLanguagePreviewFeaturesGets or sets a value indicating whether compiler features that are not intended for production use are allowed.
BaseLanguageGets or sets the base language of the project, as an IETF BCP-47 language tag.
CompilerOptionsGets or sets a dictionary containing instructions that control how the Yarn Spinner compiler should compile a project.
DefinitionsGets or sets the path to a JSON file containing command and function definitions that this project references.
DefinitionsFilesGets the absolute paths to the project’s Definitions files.
DefinitionsPathGets the path to the Definitions file, relative to this project’s location.
ExcludeFilePatternsGets or sets the collection of file search patterns that should be excluded from this project.
ExtensionDataContains any data parsed from the source file that was not matched to a property on this type.
FileVersionGets or sets the file version of the project.
LocalisationGets or sets the collection of LocalizationInfo objects that store information about where localized data for this project is found.
PathGets the path that the Project was loaded from.
SourceFilePatternsGets or sets the collection of file search patterns used to locate Yarn files that form this project.
SourceFilesGets the collection of Yarn files that should be used to compile the project.
WorkspaceRootPathThe location of the root of the workspace in which this project is located.