unity-game-enginekeyboardscrollrect

How to scroll to a specific textField element in ScrollRect with Unity scene


I am Beginner in unity. As I am trying to create a form in the single scene with multiple textField. For keyboard i need to enable the next button also if i select the last textfield in the scene screen should be move to the particular textfield. In iOS we have the TPKeyboardAvoidScrolling framework to reduce the work. Do we have any framework for this or anyone please suggest some examples.


Solution

  • If your textview all have same size, you can simply change position of "container".

    Let's say your textviews have a size of 100x50. If you want to go to the 5th element, your localPosition would be Vector3.Up * 50 * 5.