Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Vertical Layout Group background

Discussion in 'UGUI & TextMesh Pro' started by Karwoch, Nov 29, 2016.

  1. Karwoch

    Karwoch

    Joined:
    Sep 16, 2014
    Posts:
    111
    Hello, I`m creating a dropdown menu, everything works as I want, but I have a problem with one thing. As my container for buttons is Vertical Layout Group I can`t add any background to it - as it automaticly become another layout element, and doesn`t strech on whole container. I also added an Image component on container which have Vertical Layout Group, but it doesn`t work eather. Any solution is to this?
     
  2. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,688
    Why not just add an image to the gameobject the Vertical Layout component is on?
    That will put an image behind all your child components. If you need to have a border outside of the Group, then simply make the layout a child of a larger RectTransform that has an image. Make sense?
     
    siddhant_unity988 and Ryzeson like this.
  3. ortin

    ortin

    Joined:
    Jan 13, 2013
    Posts:
    221
    Just in case: LayoutElement script has "Ignore Layout" checkbox.
     
    Celezt likes this.