- Home /
Display TM symbol in enum on GUI
Hi! I'm working on a tool in Unity and I have an editor window with an enum popup on it. I want one of the things in the enum to display as This Thing(TM Symbol) Stuff .Is there anyway I can get the tm symbol? Thanks, any help is much appreciated.
Answer by FortisVenaliter · Aug 03, 2017 at 09:55 PM
Unity generally uses UTF-8, if I recall correctly, so can't you just add that character to the name of the enum? I've never actually tried that.
If not, you'll need to write a custom editor class that can manually add the character in to the selected option.
Hmm, So I'm trying to type the T$$anonymous$$ symbol in Visual Studio, but it won't even compile and says unrecognized symbol
Yeah, you're probably going to need to do it in an editor class then. When using Strings, C# has an escape sequence for unicode characters. I think it's \uXXXXXX.
Note that the escape sequence for \u is exactly 4 hex character(2 bytes) and for \U it's 8 (4 bytes)
The ™ (tm) symbol has the code point "0x2122" so you would have to use either "\u2122" or "\U00002122"
Your answer
Follow this Question
Related Questions
french accent and dynamic fonts 1 Answer
Why aren't asian fonts rendering dynamically? 0 Answers
Umlaut shown as ?? in GUILayout.Button 3 Answers
Is there a way to measure the pixel with/height of a string with a given font? 2 Answers
GUI text font change 3 Answers