After updated to v2.2.2, there are a few problem
1. sometime the ratio become zero because mRoot.manualHeight is INT
float ratio = (mRoot != null) ? mRoot.manualHeight / Screen.height * 0.5f : 0.5f;
=>
float ratio = (mRoot != null) ? (float)mRoot.manualHeight / Screen.height * 0.5f : 0.5f;
2. the anchored GameObject does not follow to the UIPanel outside the Screen.
float oldZ = v.z;
if (widgetContainer != null)
{
v = widgetContainer.transform.parent.TransformPoint(v);
}
else if (panelContainer != null)
{
v = panelContainer.transform.parent.TransformPoint(v);
}
v.z = oldZ;
=>
//float oldZ = v.z;
if (widgetContainer != null)
{
v = widgetContainer.transform.TransformPoint(v);
}
else if (panelContainer != null)
{
v = panelContainer.transform.TransformPoint(v);
}
//v.z = oldZ;