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

Change size on panel without affecting child image/sprites

Discussion in 'UGUI & TextMesh Pro' started by pKallv, Mar 17, 2015.

  1. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,129
    Is it possible to change size on a panel with multiple child sprites without changing the sprite sizes at the same time?

    I have a panel with 36 smaller images/sprites and would like to increase the size on the panel, manually in the editor.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,744
    If the anchors of the child are all in the same place, then the size of your parent RectTransform will not affect its children.
     
    tetraxel and SimonDarksideJ like this.
  3. pKallv

    pKallv

    Joined:
    Mar 2, 2014
    Posts:
    1,129
    thanks
     
  4. Burkard

    Burkard

    Joined:
    Feb 22, 2014
    Posts:
    13
    If you don't want to change the anchors of the children, you can move all children to another (temp) empty object, resize the panel, and then make the buttons/sprites children of the panel again.
     
    feika likes this.