Hi, I am developing a 2D game and the main canvas’ render mode is set to World Space. The main camera is placed in the middle of the canvas.
I am trying to get the Y position of an object’s RectTransform using GetComponent().position.y, however, the value I got was different to the pos Y value I see in the Unity Editor. Specifically, the value I got through the code was as though the object’s anchor is in middle centre, but I want its position in left top anchor mode. Is there a way to get this?