UIInput only works with left and top-left alignment in 2.2.7c . Things work fine until text gets longer than the field, in which case it jumps to an incorrect location if you use another alignment. Replacing this original code in UIInput.cs:
if (fit != processed)
{
processed = fit;
Vector3 pos = label.cachedTransform.localPosition;
pos.x = mPosition + label.lineWidth;
label.cachedTransform.localPosition = pos;
if (mPivot == UIWidget.Pivot.Left) label.pivot = UIWidget.Pivot.Right;
else if (mPivot == UIWidget.Pivot.TopLeft) label.pivot = UIWidget.Pivot.TopRight;
else if (mPivot == UIWidget.Pivot.BottomLeft) label.pivot = UIWidget.Pivot.BottomLeft;
}
...with this (note the bug in the last line of the original code; should set to BottomRight):
if (fit != processed)
{
processed = fit;
Vector3 pos = label.cachedTransform.localPosition;
if (mPivot == UIWidget.Pivot.Left || mPivot == UIWidget.Pivot.TopLeft || mPivot == UIWidget.Pivot.BottomLeft) {
pos.x = mPosition + label.lineWidth;
} else if (mPivot == UIWidget.Pivot.TopRight || mPivot == UIWidget.Pivot.BottomRight || mPivot == UIWidget.Pivot.Right) {
pos.x = mPosition - label.lineWidth;
}
label.cachedTransform.localPosition = pos;
if (mPivot == UIWidget.Pivot.Left) label.pivot = UIWidget.Pivot.Right;
else if (mPivot == UIWidget.Pivot.TopLeft) label.pivot = UIWidget.Pivot.TopRight;
else if (mPivot == UIWidget.Pivot.BottomLeft) label.pivot = UIWidget.Pivot.BottomRight;
else if (mPivot == UIWidget.Pivot.Right) label.pivot = UIWidget.Pivot.Left;
else if (mPivot == UIWidget.Pivot.TopRight) label.pivot = UIWidget.Pivot.TopLeft;
else if (mPivot == UIWidget.Pivot.BottomRight) label.pivot = UIWidget.Pivot.BottomLeft;
}
...seems to do the trick. For the time being, I'll manage with my local fix, but obviously it would be nice to have this fixed in the next release.
(Right-align doesn't work out of the box, you have to fiddle a bit with the collider coordinates and so forth so that everything is in the same place. But at least with this code fix you can do it.)