Project
public class ProjectInherits from System.Object
#Nested Types
- CompilerOptionsData classStores additional information that describes to the compiler how the project should be compiled.
- LocalizationInfo classStores the locations of where localized assets and a localized string table for a Yarn Project may be found.
#Constructors
#Project()
public Project()#Project(string, string?)
public Project(string path, string? workspaceRootPath = null)Parameters
pathstringThe value to use for the new instance's Path property.workspaceRootPathstringThe path to the root of the current workspace, ornull.
#Fields
#CurrentProjectFileVersion
.yarnproject file format.public const int CurrentProjectFileVersion = YarnSpinnerProjectVersion5;Type Int32
#WorkspaceRootPlaceholder
public const string WorkspaceRootPlaceholder = "${workspaceRoot}";Type String
#YarnSpinnerProjectVersion2
public const int YarnSpinnerProjectVersion2 = 2;Type Int32
#YarnSpinnerProjectVersion3
public const int YarnSpinnerProjectVersion3 = 3;Type Int32
#YarnSpinnerProjectVersion4
public const int YarnSpinnerProjectVersion4 = 4;Type Int32
#YarnSpinnerProjectVersion5
public const int YarnSpinnerProjectVersion5 = 5;Type Int32
#Properties
#AllowLanguagePreviewFeatures
public bool AllowLanguagePreviewFeatures { get; set; }Type Boolean
#BaseLanguage
public string BaseLanguage { get; set; }Type String
#CompilerOptions
public CompilerOptionsData CompilerOptions { get; set; }Type CompilerOptionsData
#Definitions
public List<string>? Definitions { get; set; }Type List
#DefinitionsFiles
public IEnumerable<string> DefinitionsFiles { get; }Type IEnumerable
#DefinitionsPath Obsolete
Use Definitions
public string? DefinitionsPath { get; }Type String
See also
#ExcludeFilePatterns
public IEnumerable<string> ExcludeFilePatterns { get; set; }Type IEnumerable
#ExtensionData
public Dictionary<string, JsonElement>? ExtensionData { get; set; }Type Dictionary
#FileVersion
public int FileVersion { get; set; }Type Int32
#Localisation
public Dictionary<string, LocalizationInfo> Localisation { get; set; }Type Dictionary
#Path
public string? Path { get; set; }Type String
#SourceFilePatterns
public IEnumerable<string> SourceFilePatterns { get; set; }Type IEnumerable
#SourceFiles
public IEnumerable<string> SourceFiles { get; }Type IEnumerable
Yarn.Compiler.Project.Matcher to find all files
specified by SourceFilePatterns, excluding those that
are specified by ExcludeFilePatterns.#WorkspaceRootPath
public string? WorkspaceRootPath { get; set; }Type String
#Methods
#GetJson()
public string GetJson();Returns String: The Project, serialized to JSON.
#IsMatchingPath(string)
path is a path
that is included in this project.public bool IsMatchingPath(string path)Parameters
pathstringThe path to check.
Returns Boolean: true if path is a path
that is included in this project; false
otherwise.
#IsValidVersionNumber(int)
number is a valid
Yarn Spinner version number.public static bool IsValidVersionNumber(int number)Parameters
numberint
Returns Boolean
#LoadFromFile(string, string?)
public static Project LoadFromFile(string path, string? workspaceRoot = null)Parameters
pathstringThe path to the file to load.workspaceRootstringThe path of the root of the workspace in whichfileis located.
Returns Project: The loaded Project.
Exceptions
System.ArgumentExceptionThrown when the contents of the file cannot be loaded.
#SaveToFile(string)
public void SaveToFile(string path);Parameters
pathstringThe path of the file to write to.
Generated from Yarn Spinner for Unity 3.3.