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

unity UI rectTransform and Canvas

Discussion in 'UGUI & TextMesh Pro' started by Liszt, Feb 19, 2015.

  1. Liszt

    Liszt

    Joined:
    Jan 12, 2015
    Posts:
    29
    Hi, someone have issues with recttransform values driven by canvas ?

    I want to get the "width / height" values from a RectTransform component which is associated with "Canvas/CanvasScaler" but the values that I get are the initial ones not the ones driven by the canvas scaler.

    Someone already encountered this issue ? There is something special to do to get them ?

    EDIT : I just see, I can get the value but I must wait so much time :x. I think in fact this value is not update until the canvas is not rendered to the screen...

    EDIT 2 : I did something wrong in my code workflow. Now it's ok !

    Thanks in advance for your answer.
     
    Last edited: Feb 19, 2015