private void ScrollIfNeeded() { if (m_ScrollToTarget == null) { return; } EditorApplication.delayCall -= ScrollIfNeeded; if (float.IsNaN(layout.height) || layout.height == 0 || float.IsNaN(m_ScrollToTarget.layout.height)) { EditorApplication.delayCall += ScrollIfNeeded; return; } var scrollViews = UIUtils.GetParentsOfType <ScrollView>(m_ScrollToTarget); foreach (var scrollview in scrollViews) { UIUtils.ScrollIfNeeded(scrollview, m_ScrollToTarget); } m_ScrollToTarget = null; }