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

Layout Group and Input Field size

Discussion in 'UGUI & TextMesh Pro' started by XikoNorris, Oct 1, 2021.

  1. XikoNorris

    XikoNorris

    Joined:
    Jun 12, 2020
    Posts:
    4
    I'm build a login screen in mobile, using vertical layout group for the UI elements. As can be seen in the input image I attached, the Input Field is not resized by the layout group, being stuck in the "minimum size" even if I try to stretch it.

    I have found a way to do it by adding a Layout Element component and checking Ignore Layout, but it feels like a workaround instead of the right way to do it. Am I right to it this way or is there a "correct" way of doing this?

    The fact that if try to add a new Input Field (for the password in this case), it will be placed at the same height instead of below it and I need to manually set its height reinforces the idea to me that I'm missing something when using input fields with a layout group.
     

    Attached Files:

    Last edited: Oct 1, 2021
  2. EnjeruDarari

    EnjeruDarari

    Joined:
    Jul 6, 2020
    Posts:
    6