Word Game Builder 2.0.1f2
Reference Manual
Static Public Member Functions | Properties | List of all members
LanguageEditor Class Reference

Various resources for modifying languages through editor scripts. More...

+ Inheritance diagram for LanguageEditor:
+ Collaboration diagram for LanguageEditor:

Static Public Member Functions

static string LangToIdentifier (string languageName)
 Convert a language name into an identifier, by removing all diacritical marks. Also ensures that the name is unique. More...
 
static void SaveLanguage (WordGameLanguage language)
 Saves a language as an asset. More...
 

Properties

static string languagePath [get, set]
 The path for Word Game Builder languages. More...
 

Detailed Description

Various resources for modifying languages through editor scripts.

Member Function Documentation

static string LangToIdentifier ( string  languageName)
inlinestatic

Convert a language name into an identifier, by removing all diacritical marks. Also ensures that the name is unique.

Returns
A sanitized language name, suitible for a file.
Parameters
languageNameThe language name to convert into an identifier.

+ Here is the call graph for this function:

static void SaveLanguage ( WordGameLanguage  language)
inlinestatic

Saves a language as an asset.

Parameters
languageThe language to save.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Property Documentation

string languagePath
staticgetset

The path for Word Game Builder languages.

This value is persistent (stored in editor preferences). In order to ensure that this value does not change when switching machines or clearing editor preferences, it is recommended to create a static editor class that sets this value with the [InitializeOnLoad] attribute.

Example:

[InitializeOnLoad]
static class SetLanguagePath
{
SetLanguagePath()
{
LanguageEditor.languagePath = "My/Settings/Folder";
}
}