Skip to content

Commit

Permalink
fix(Tooltip): allow for line break character
Browse files Browse the repository at this point in the history
The line break character `\n` gets escaped in the inspector variable
and was not working as rich text. This fix ensures a line break can
be used correctly.
  • Loading branch information
thestonefox committed Jul 18, 2016
1 parent ddbe240 commit 18e4be0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/SteamVR_Unity_Toolkit/Scripts/VRTK_ObjectTooltip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ private void SetText(string name)
{
var tmpText = this.transform.FindChild("TooltipCanvas/" + name).GetComponent<Text>();
tmpText.material = Resources.Load("UIText") as Material;
tmpText.text = displayText;
tmpText.text = displayText.Replace("\\n", "\n");
tmpText.color = fontColor;
tmpText.fontSize = fontSize;
}
Expand Down

0 comments on commit 18e4be0

Please sign in to comment.