Hi All,
Anyone know how to add a trademark symbol (the TM) to a gui object? If I go to the edit/special characters and select the TM glyph. when I paste it into my script, it shows up as a question mark.
Any help would be much appreciated.
thanks,
Did you check to make sure it exists in the font you’re using?
Yup. I know it does. In the font, the unicode char # is U-2112.
ideas?
But does it appear in the Unity font? Check the font texture in the inspector panel.
Yup. It’s right there near the end. One thing I realized is that Unitron text encoding was set to Western (ASCII). Once I changed the encoding to Unicode (UTF-16) I was able to place the TM. Now the question is, does anything else change in my script because of this change? most likely not right?
thanks
d
I discovered that if you save your textAsset in Unitron as Unicode (UTF-8) the ™™ appeared when assigning a textAsset to a string in Awake:
// This is cut out of a more extensive script but should be the meat of how the text is read
var textAsset : TextAsset;
private var textString : String;
function Start() {
textString = textAsset.text;
}
function OnGUI() {
// Set up a window so I can apply a touchPhase scroll behaviour to the window
introWindowRect = GUI.Window (0, introWindowRect, CreateTextWindow, "");
}
function CreateTextWindow (windowID : int) {
GUI.Label (Rect (10, scrollVector, 255, scrollMin), textString, "textStyle");
}
I’d expect this to work in other cases as well.