Skip to main content

GlyphInstance

A class in Root.Township, Alta.Pages.

One glyph image on a rendered page (book or sign page). PageRenderer loads glyph positions into these child objects; works in edit mode too.

Constructors​

MemberWhat it is
GlyphInstance()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Glyph.Positioning detailsBacking field for Details.
private Image imageThe UI image the glyph sprite is put on, cached on first load.
private bool isCalibratingSerialized flag not read by this class.

Properties​

MemberWhat it is
Glyph.Positioning Details { get; }The glyph and where it sits on the page.

Methods​

MemberWhat it is
void CalculateFromTransform()Fills Details from the object's current transform, creating it if needed.
bool Load(Glyph.Positioning details)Shows a glyph: sets the sprite and name and applies its position. With no glyph, hides the object. Returns false if it was already hidden.
2 private and internal methods
MemberWhat it is
private void OnValidate()In the editor (not playing), validates and reloads Details.
private void Start()Empty.

Used in​

Members of other types that take, return or hold a GlyphInstance: