Search Unity

Question How to make AnchoredPosition update after pivot of RectTransform is changed?

Discussion in 'UGUI & TextMesh Pro' started by Tuonela93, Jan 18, 2024.

  1. Tuonela93

    Tuonela93

    Joined:
    Apr 7, 2018
    Posts:
    27
    I am changing the pivot of a RectTransform at runtime and want to take the new anchoredPosition that results from this change and use it for tweening.

    However the value I get from panel.anchoredPosition.y is still the old anchoredpos. I tried waiting for 1-2 frames before asking for the value, I tried panel.ForceUpdateRectTransforms(), no result.