RectTransform localPostion.y returns global position???

In Unity 2021 LTS, why in the world am getting the global position of a UI object when I access its rectTransform.localPostion.y?

In the inspector I see the local y position of a RectTransform
8376513--1104237--upload_2022-8-19_23-8-33.png
But when I turn on debug mode, y shows the global position, which is the value returned by localPostion.y:
8376513--1104240--upload_2022-8-19_23-11-21.png

What is going on with that?



8376513--1104234--upload_2022-8-19_23-7-34.png

Wrong sub forum. This is the sub forum for the new UI toolkit, not the old uGUI.

In any case, local position != the editor friendly values displayed by the rect transform.

Local position is a property of Transform, of which RectTransform inherits from. You would want to use probably anchored position or the other rect transform specific values: Unity - Scripting API: RectTransform