unity UI rectTransform and Canvas

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 ?

Thanks in advance for your answer.

It seems I did something wrong in my code workflow. Now it works !

Thanks again