- I am trying to build an app which
scans the qr code with a device,the
result of the qrcode appears on the
input field after scanning.but when
the inputfield is active the keyboard
appears. - i dont want thekey board to be
appear on the screen when the
input field is active. - Is their any other method that i
could use to take the input from
the scanning device.
Instead of using a InputText use a regular Text and fill it with Input.inputString every frame.
In my case I call the following function every frame just to fill the invisibleInputText wich is a regular text.
public void ComputeInputString()
{
foreach (char c in Input.inputString)
{
if (c == '\b') // has backspace/delete been pressed?
{
if (invisibleInputText.text.Length != 0)
{
invisibleInputText.text = invisibleInputText.text.Substring(0, invisibleInputText.text.Length - 1);
}
}
else
{
invisibleInputText.text += c;
}
}
}