Hi,I 'm making a keyboard in UI for Unity but I’m not sure how to simulate the space button via button.This is what I found :
public void ClickBackspace()
{
string tempGetString = myText.text;
if(tempGetString.Length > 0)
{
string tempString = tempGetString.Substring(0, tempGetString.Length -1);
myText.text = tempString;
}
}
In this way I simulate the delete button so according to my logic with this it becomes the space but it doesn’t work
public void Clickspace()
{
string tempGetString = myText.text;
if(tempGetString.Length > 0)
{
string tempString = tempGetString.Length +1;
myText.text = tempString;
}
}
Thanks for the help ![]()