- Home /
3D Textbox
Hi, I'm trying to create a 3D textbox for a educational vocabulary translationprogram.
The Problem is, that the TextMesh class is not really optimized for this kinda stuff.
My Problem is, that I don't have a Textmarker so the user can edit the center of the word too. I was thinking of manually implementing it with a '|' character, but that way the letters would shift around as you parse through the text which would look kinda awkward. Does anybody know a solution for this problem?
Currently I'm doing something like this:
void Update()
{
if(ItsText.Length <= itsMaxCharacters)
{
foreach(char aChar in Input.inputString)
{
if(aChar == "\b"[0] && ItsText.Length > 0)
ItsText = ItsText.Substring(0, ItsText.Length-1);
else if(aChar != "\n"[0])
{
if(ItsText[ItsText.Length-1] == '|')
{
ItsText = ItsText.Substring(0, ItsText.Length-1);
ItsText += aChar + "|";
}
else
ItsText += aChar;
}
}
}
}
Using the guisystem is not an option because the text should rotate in 3D space and turn around
Your answer
Follow this Question
Related Questions
How do you get a caret to show in GUILayout.TextField ??? 0 Answers
GUI.Matrix Problems 0 Answers
clear textfield from default string 3 Answers
text box and button won't display 2 Answers
In Game Notepad 2 Answers