Home › Page › UghText


Inherits from MonoBehaviour

UghText provides an interface between TextMesh and the Ugh system.  UghText adds additional functionality such as word wrap and drop shadows.

name type description
wordWrap boolean If word wrapping should be used.
maxWidth float The width, in Unity units, at which word wrap occurs.
useMaxHeight boolean If the text should be truncated during word wrapping.
maxHeight float The heigh, in Unity units, at which word wrap text should truncate.
logStyleClipping boolean If true, text will truncate after the first new-line character.
dropShadowMaterial Material The material used to render drop shadows.  No drop shadows will appear if this is null.
dropShadowLocalOffset Vector3 The offset, in Unity units, of the drop shadow.
text LocalizedString Direct access to the LocalizedString used to display text.  Avoid using this, when possible.
Text string Get and set the displayed text.
name type description
ForceUpdate void Forces the UghText to update.
GetParentPublisher UghPublisher Gets the UghPublisher which this UghText is connected to.


Using UghText in Script

public void ForceUpdate()

This function will cause UghText to update.  This function is called automatically when the value of Text is changed, but must be called manually if other values are changed.  (For example, if dropShadowMaterial is changed.)

public UghPublisher GetParentPublisher()

This function will return the first UghPublisher in the hierarchy above the UghText.  This is primarily used as support for other Ugh elements.