- Home /
How to store a tab character in an inspector field
I have some code which uses the string.Split method. It takes either a char, string or arrays of chars/strings as delimiters. I'd like to expose these delimiters to the Unity inspector, but the way I'm currently using it, feels clumsy.
At the moment I am pasting a tab character into the inspector field, which will work, but appears to be invisible. I'd rather use an escape sequence like '\t' for tab, but this isn't working, because Unity seems to auto-escape strings instead of taking them as literals. I always get "\\t" instead of '\t'.
Is there any better way to store this kind of character in Unity? Or can I "un-escape" the Unity string in a way, that works with all ASCII characters?
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Finding a character unicode in C# 0 Answers
Multiple Cars not working 1 Answer
Problem recognizing declaration of array of strings 1 Answer