Finish GameObject Inspector, start Search page, some other UI changes/fixes

This commit is contained in:
sinaioutlander
2020-11-06 20:42:16 +11:00
parent e175e9c438
commit 2efc3f6578
28 changed files with 2301 additions and 1184 deletions

View File

@ -155,6 +155,19 @@ namespace UnityExplorer.Console
pos = editor.InputField.transform.TransformPoint(pos);
// fix position when scrolled down
var scrollSize = editor.InputField.verticalScrollbar.size;
var scrollValue = editor.InputField.verticalScrollbar.value;
scrollSize += (1 - scrollSize) * (1 - scrollValue);
if (!Mathf.Approximately(scrollSize, 1))
{
var height = editor.InputField.textViewport.rect.height;
pos.y += (1 / scrollSize * height) - height;
}
m_mainObj.transform.position = new Vector3(pos.x, pos.y - 3, 0);
}
}