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

Question Knowing the actual size of an image in a layout

Discussion in 'UGUI & TextMesh Pro' started by giggioz, Oct 12, 2022.

  1. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    I have an horizontal layout that contains 7 GameObjects with an Image The image is resized because I want it to keep the aspect ratio. Now I need to know (from script) the actual size of the image because it is not the same as its container, how to do that? Thanks
     

    Attached Files: