Hey,
Sometimes I have problems with the resolution on mobile devices. When UIRoot.automatic is set to true it keeps the old manualHeight.
What I've noticed also in other projects, is that Mathf.Approximately isn't very accurate on mobile devices. So when I change to following code in UIRoot from
void Update ()
{
manualHeight = Mathf.Max(2, automatic ? Screen.height : manualHeight);
float size = 2f / manualHeight;
Vector3 ls = mTrans.localScale;
if (!Mathf.Approximately(ls.x, size) ||
!Mathf.Approximately(ls.y, size) ||
!Mathf.Approximately(ls.z, size))
{
mTrans
.localScale = new Vector3
(size, size, size
); }
}
to
void Update ()
{
manualHeight = Mathf.Max(2, automatic ? Screen.height : manualHeight);
float size = 2f / manualHeight;
Vector3 ls = mTrans.localScale;
if( !(Mathf.Abs( ls.x - size ) <= float.Epsilon ) ||
!(Mathf.Abs( ls.y - size ) <= float.Epsilon ) ||
!(Mathf.Abs( ls.z - size ) <= float.Epsilon ))
{
mTrans
.localScale = new Vector3
(size, size, size
); }
}
everything works like a charm.
Anybody else can confirm this?