when using anchoredPosition3D to set the position of UI, The PosY value is always 0, like
this.GetComponent<RectTransform> ().anchoredPosition3D = new Vector3 (-222f, -222f,0);
the result is PosX = -222, PosY = 0, PosZ = 0.
I have to do like this to set a position.
this.GetComponent<RectTransform> ().anchoredPosition3D = new Vector3 (-222f, -222f,0);
this.GetComponent<RectTransform> ().anchoredPosition = new Vector2 (-222f, -222f);
I have the exact same problem. For some kind of reason, the z-value gets filled in where the y-value should go…
That’s a bug. We’ve fixed it here. The fix won’t make it to 4.6.0, but will be included in one of the patch releases following shortly after.
We have a problem abount 4.6.0 's anchoredPosition3D ,
I set a Vector3 value to anchoredPosition3D,
thie POS Y value still 0,
i know this version not fixed,
but this function “anchoredPosition3D” is a basic function,
if not fixed yet,our project can’t dynamic to control UI position.
hope you can help us,Thanks a lot.