Ok, I have a string that has
in it, but string.Contains("
") always returns false.
string temp = lp.levelName;
Debug.Log(temp);
Debug.Log("
" + temp.Contains("
“));
temp = temp.Replace(”
", “”);
Debug.Log("Replace
" + temp);
nameText.text = temp;
Log output (after a lot of useless info)
MATCH
3
False
Replace
MATCH
3
I use
t.levelName = EditorGUILayout.TextField("Level Name", t.levelName);
to enter the level name, so maybe it’s doing some strange modifications to the string there.
Edit:
Ok seconds after posting this I find it’s a bug with EditorGUILayout.TextField
http://forum.unity3d.com/threads/177932-BUG-EditorGUILayout-TextField-escapes-the-string