当键盘出现在统一输入字段中时如何向上移动面板
How to move pannel up when keyboard appears in unity input field
我正在使用unity canvas设计菜单但是当键盘出现时屏幕没有向上移动有没有办法在键盘出现时将屏幕向上移动
The screen i have without the keyboard
The screen i have with android keyboard
有什么办法可以在我点击输入字段时将整个面板向上移动
您的 Unity canvas 可能与您的菜单重叠,canvas 将其视为 "displayed" 但事实上并非如此。您需要的是一种方式告诉 Unity 您的区域当前较小,并使剩余部分可滚动。我强烈建议您看一下 THIS scripting tutorial about ScrollRect in Unity, as well as the documentation about Screen TouchScreenKeyboard classes. I am not familiar with how Unity works with Android, but you may have to calculate your current visible space by yourself. This link 可以帮助您开始获得合适的尺寸。
我正在使用unity canvas设计菜单但是当键盘出现时屏幕没有向上移动有没有办法在键盘出现时将屏幕向上移动 The screen i have without the keyboard
The screen i have with android keyboard
有什么办法可以在我点击输入字段时将整个面板向上移动
您的 Unity canvas 可能与您的菜单重叠,canvas 将其视为 "displayed" 但事实上并非如此。您需要的是一种方式告诉 Unity 您的区域当前较小,并使剩余部分可滚动。我强烈建议您看一下 THIS scripting tutorial about ScrollRect in Unity, as well as the documentation about Screen TouchScreenKeyboard classes. I am not familiar with how Unity works with Android, but you may have to calculate your current visible space by yourself. This link 可以帮助您开始获得合适的尺寸。