When I set the y pos manually using the Rect Transform of a UI image it puts it to where it says it is. (e.g. When I set it to Y = 0 the Y position is 0
However when I set it through a script like this:
barPos.position = new Vector3(barPos.position.x, 0, barPos.position.z);
It puts the bar at position Y = -455.0943
At first, I thought it would be a problem with parenting because I parented it to a mask but the only mask axis I changed was the X value. I’m sorry for my poor wording and awkward formatting. Thanks!
On the inspector, you are setting it’s local position, meaning the object’s position relative to its’ parent; in your code, you are setting it’s global position. If you set position in script using transform.localPosition, you will get same result as your inspector value.