Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question How to make width of a rect transform object adjust to child objects increasing from one side

Discussion in 'UGUI & TextMesh Pro' started by Kujji, Aug 22, 2023.

  1. Kujji

    Kujji

    Joined:
    Oct 20, 2021
    Posts:
    109
    In the game, UI objects (buttons) are dynamically created, they can be added and removed, the parent object should adjust to their size and only grow to the right, i used anchor but it still increase in two sides

    Video of adding objects and their propereties:
     
  2. Kujji

    Kujji

    Joined:
    Oct 20, 2021
    Posts:
    109
    Solved by simple setting Categories object pivot x to 0 upload_2023-8-23_10-39-58.png