public override void FetchData()
{
Profiler.BeginSample("SceneHierarchyWindow.FetchData");
int depth = 0;
double timeSinceStartup = EditorApplication.timeSinceStartup;
HierarchyProperty property = new HierarchyProperty(HierarchyType.GameObjects);
property.Reset();
property.alphaSorted = this.IsUsingAlphaSort();
if (this.m_RootInstanceID != 0)
{
bool flag = property.Find(this.m_RootInstanceID, null);
string displayName = !flag ? "RootOfSceneHierarchy" : property.name;
base.m_RootItem = new GameObjectTreeViewItem(this.m_RootInstanceID, depth, null, displayName);
if (!flag)
{
Debug.LogError("Root gameobject with id " + this.m_RootInstanceID + " not found!!");
}
}
else
{
base.m_RootItem = new GameObjectTreeViewItem(this.m_RootInstanceID, depth, null, "RootOfSceneHierarchy");
}
if (!base.showRootNode)
{
this.SetExpanded(base.m_RootItem, true);
}
bool hasSearchString = !string.IsNullOrEmpty(this.m_SearchString);
if (hasSearchString)
{
property.SetSearchFilter(this.m_SearchString, this.m_SearchMode);
}
base.m_VisibleRows = this.CalcVisibleItems(property, hasSearchString);
this.m_NeedsChildParentReferenceSetup = true;
base.m_NeedRefreshVisibleFolders = false;
if ((this.sortingState.sortingObject != null) && this.sortingState.implementsCompare)
{
this.SortVisibleRows();
}
double num3 = EditorApplication.timeSinceStartup;
double num4 = num3 - timeSinceStartup;
double num5 = num3 - this.m_LastFetchTime;
if ((num5 > 0.1) && (num4 > 0.05))
{
this.m_DelayedFetches++;
}
else
{
this.m_DelayedFetches = 0;
}
this.m_LastFetchTime = timeSinceStartup;
base.m_TreeView.SetSelection(Selection.instanceIDs, false);
if (SceneHierarchyWindow.s_Debug)
{
Debug.Log(string.Concat(new object[] { "Fetch time: ", num4 * 1000.0, " ms, alphaSort = ", this.IsUsingAlphaSort() }));
}
Profiler.EndSample();
}