Novelty scripting reference > Types > Text

Text

Text is a sub-class of Object and shares all of its members and methods.
Text is a reference type. This means it has no constructor and can only be passed around by handle (Text@).

Object types that can be cast as Text: <SystemText>, <Text>


Methods

string GetFont() const
Returns the name of the font asset.

bool SetFont(const string &in fontName)
Change the font asset. Returns true if successful.

string GetText() const
Returns the text content.

void SetText(const string &in text)
Change the text content.


Sample

// Casting an Object handle to Text handle
Text@ txt = Scene.GetObject("A text object") as Text;

Back to top