Home › Page › UghText

UghText

Revision for “UghText” created on 17 April, 2013 @ 19:01

Title
UghText
Content
Inherits from MonoBehaviour UghText provides an interface between <a title="Unity TextMesh doccumentation" href="http://docs.unity3d.com/Documentation/Components/class-TextMesh.html">TextMesh</a> and the Ugh system.  UghText adds additional functionality such as word wrap and drop shadows. [table caption="Variables" colwidth=20%|20%] 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, <a title="LocalizedString" href="http://ugh.graveck.com/wiki/localizedstring">LocalizedString</a>, "Direct access to the LocalizedString used to display text.  Avoid using this, when possible. Text, string, Get and set the displayed text. [/table] [table caption="Functions" colwidth=20%|20%] name, type, description ForceUpdate, void, Forces the UghText to update. GetParentPublisher, <a title="UghPublisher" href="http://ugh.graveck.com/wiki/ugh-scripting-reference/ughpublisher">UghPublisher</a>, Gets the UghPublisher which this UghText is connected to. [/table] <strong>Using UghText in Script</strong> [sourcecode language="csharp"]public void ForceUpdate()[/sourcecode] 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.) [sourcecode language="csharp"]public UghPublisher GetParentPublisher()[/sourcecode] This function will return the first UghPublisher in the hierarchy above the UghText.  This is primarily used as support for other Ugh elements.
Excerpt


OldNewDate CreatedAuthorActions
17 April, 2013 @ 19:01 admin
2 April, 2013 @ 17:08 [Autosave] admin
2 April, 2013 @ 17:03 admin
2 April, 2013 @ 17:03 admin
2 April, 2013 @ 17:01 admin
2 April, 2013 @ 16:57 admin
2 April, 2013 @ 16:55 admin
2 April, 2013 @ 16:54 admin
2 April, 2013 @ 16:54 admin
2 April, 2013 @ 16:53 admin
18 March, 2013 @ 16:22 admin
18 March, 2013 @ 16:21 admin
18 March, 2013 @ 16:14 admin
18 March, 2013 @ 16:13 admin
18 March, 2013 @ 16:09 admin
11 March, 2013 @ 18:33 admin
7 March, 2013 @ 18:31 admin
6 March, 2013 @ 21:50 admin
6 March, 2013 @ 21:50 admin