preloadGlyphs
preloadGlyphs(
app,entity,text,options?):GlyphPreload
Defined in: sdk/src/ui/text/plugin.ts:768
Put the glyphs of
Parameters
Section titled “Parameters”entity
Section titled “entity”number
The Text that will show them, which says how they are drawn. It need not be visible.
string
Repeated characters cost nothing. Text in a rich-text size or an outline is another cell, and is made when it first shows.
options?
Section titled “options?”Returns
Section titled “Returns”Call release() when the text is over: the glyphs hold their atlas pages until then.
text on the atlas before they are shown, so the frame that shows them does not pay for them. The first page of a
novel is hundreds of new characters, and they all land in one frame otherwise. Give it what is coming (a chapter, the next scene’s
lines) on a loading screen and wait on done, or let it run behind the game: it spends budgetMs a frame.