private void HandleOnJob2Finish() { if (this.m_job2 == null) { return; } List <GameObject> missingComponents = this.m_job2.GetMissingComponents(); List <SerializedProperty> missingProperties = this.m_job2.GetMissingProperties(); List <SearchResult> list = new List <SearchResult>(); foreach (GameObject current in missingComponents) { list.Add(new SearchResult { iid = current.GetInstanceID(), path = TnTransformUtil.GetHierarchyFullPath(current) }); } foreach (SerializedProperty current2 in missingProperties) { SearchResult item = SearchResult.Create(current2); list.Add(item); } this.m_tabMgr.ShowTab(SearchResultTabType.ResultsInGameObject, list); this.DisplaySearchFinishedDialog(list.Count); EditorUtility.ClearProgressBar(); base.Repaint(); this.m_job2 = null; }
public static SearchResult Create(SerializedProperty p) { Component component = p.serializedObject.targetObject as Component; return(new SearchResult { iid = component.GetInstanceID(), path = string.Concat(new string[] { TnTransformUtil.GetHierarchyFullPath(component.gameObject), "/<", component.GetType().Name, ">/[", TnEditorBridge.GetDisplayName(p), "]" }) }); }
public void SearchInHierarchy(List <GameObject> gos) { List <GameObject> list = new List <GameObject>(); List <SerializedProperty> list2 = new List <SerializedProperty>(); for (int i = 0; i < gos.Count; i++) { GameObject gameObject = gos[i]; if (this.m_gameObjectList.CheckGameObject(gameObject, false)) { if (EditorUtility.DisplayCancelableProgressBar("Searching", "Search in: " + gameObject.name, (float)(i + 1) / (float)gos.Count)) { break; } this.FindMissingReferencesRecursively(gameObject, true, list, list2); } } EditorUtility.ClearProgressBar(); List <SearchResult> list3 = new List <SearchResult>(); foreach (GameObject current in list) { list3.Add(new SearchResult { iid = current.GetInstanceID(), path = TnTransformUtil.GetHierarchyFullPath(current) }); } foreach (SerializedProperty current2 in list2) { SearchResult item = SearchResult.Create(current2); list3.Add(item); } this.m_tabMgr.ShowTab(SearchResultTabType.ResultsInGameObject, list3); this.DisplaySearchFinishedDialog(list3.Count); }