Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Dropdown Template Styling Issues

Discussion in 'UGUI & TextMesh Pro' started by Jose-Abalos, Nov 29, 2023.

  1. Jose-Abalos

    Jose-Abalos

    Joined:
    Jan 31, 2014
    Posts:
    6
    Hi, I'm using a Dropdown with the default settings, but I've changed the sprites for the template dropdown list and ran into a series of problems.
    Here's how it looks in practice:
    Dropdown.jpg

    As you can see, the list starts way too close to the top and finishes way too close to the bottom. The item also starts way too close to the left edge.
    I can fix the horizontal offset by modifying the position of the Item Checkmark and the Item Label in the Item section of the prefab.

    However, the vertical issues are proving to be trickier. I've noticed that this is partly because the parent Template object has the Image component with the brown borders, but the Viewport object is the same size as Template, and is set that way because of the ScrollRect component, so even if I unlink the Viewport from the ScrollRect, resize and link again, it resizes.

    Is there a way I can change the size and position of the Viewport, or any other way I can set the items in the list to display correctly?

    Thanks in advance!