Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

[Solved] ScrollRect + input fields positionning

Discussion in 'UGUI & TextMesh Pro' started by florent-morin, Jun 10, 2015.

  1. florent-morin

    florent-morin

    Joined:
    Dec 2, 2014
    Posts:
    12
    Hello,

    This is my problem.

    I have a Panel with a ScrollRect. (container)
    Inside my container, another panel which scroll. (content)
    Inside the content panel, I use Autolayout. A vertical layout with gameobjects (padding = 20).
    Each game object has an vertical layout with a text and an input field (padding = 5, total height = 70)

    When input field has focus, I want the parent game object to be visible at the top of scroll, due to keyboard.
    I currently use verticalNormalizedPosition to do that. But its value is from 0 (bottom) to 1 (top)...

    And I don't know how to scroll to a specific item.

    Thanks.
     
  2. florent-morin

    florent-morin

    Joined:
    Dec 2, 2014
    Posts:
    12