- Home /
Question by
RadhikaKulkarni · Jul 21, 2021 at 10:28 AM ·
c#androidunityeditor
How to get android keyboard value for showing image?
I created a translator in Unity which on keypress gives you the symbol of the pressed letter. It works for my laptop but now I need to convert it into an android application. Is getting the input value from an android phone be the same as a laptop keyboard? ``if (Input.GetKeyDown(KeyCode.A))
{
originalSpriteA = Resources.Load("A", typeof(Sprite)) as Sprite;
GameObject obj = new GameObject("Image");
obj.transform.localScale = new Vector3(0.02f, 0.02f, 0.02f);
Image rend = obj.AddComponent(typeof(Image)) as Image;
rend.sprite = originalSpriteA;
rend.transform.SetParent(newParent);
}
This is the code I used for the Desktop version.
Comment
Your answer
Follow this Question
Related Questions
Draw a line from object to indicate power 0 Answers
UnityEngine.Android not does not exist 0 Answers
Unity 2019 sqlite3 connection android 0 Answers
Pass the Context between classes inside Android plugin 0 Answers