What is the difference between anchored position and local position in Unity?
Asked Answered
Q

1

7

I am new to unity. I am trying to figure out what is the difference between anchored position and local position and where can the both be applied?

Quad answered 20/9, 2020 at 9:12 Comment(0)
S
-1

Anchored Position

The Anchored Position is the position of the pivot of the RectTransform taking into consideration the anchor reference point. The anchor reference point is the position of the anchors. If the anchors are not together, Unity estimates the four anchor positions using the pivot placement as a reference.

Local Position

localPosition is the position of the GameObject with respect to its parent object. transform. position is the position of the GameObject with respect to the root. Within local space of a GameObject, the center (or pivot) is always (0, 0, 0).




Source: Unity Forum

Sherrie answered 20/9, 2020 at 10:32 Comment(5)
Could you please describe what is "anchor reference point" and how Unity estimates four anchor positions using the pivot placement?Abessive
It is the position of the anchors. If the anchors are not together, Unity estimates the four anchor positions using the pivot placement as a reference.Sherrie
Anyone asking this question would have also searched the unity docs. This is not helpful.Overline
Copy paste from Unity docs. Not helpful.Wasson
It is indeed from unity forum. I did mention it.Sherrie

© 2022 - 2024 — McMap. All rights reserved.