1

Common ux case on mobile is to have the view magically scrolling when keyboard shows up so that input field remains visible above keyboard

Mobile sdks like Xamarin, ios or android would provide that functionality natively.

Would there be such command in Unity?

I could consider a default position and make the canvas/scroll view move accordingly but maybe there is already something.

Everts
  • 10,408
  • 2
  • 34
  • 45

2 Answers2

1

As far as I know, this behavior is not native in Unity at all.

You can use TouchScreenKeyboard.visible to detect if the keyboard is on screen and modify your UX as necessary yourself, though.

The docs on the TouchScreenKeyboard class says:

TouchScreenKeyboard.visible and TouchScreenKeyboard.area should be used to determine if the keyboard is being shown (activated) and what portion of the screen is using.

Andrea
  • 6,032
  • 2
  • 28
  • 55
0

So I ended up finding this one

https://forum.unity.com/threads/move-ui-above-touchkeyboard-for-mobile.353493/

I have not tried the code but this is as close to a solution.

Everts
  • 10,408
  • 2
  • 34
  • 45