private static bool OnPrefabGameObjectTraverse(ObjectTraverseInfo objectInfo) { #if !UNITY_2020_1_OR_NEWER if (currentObjectIndex % ObjectTraverseUpdateStep == 0) #endif { if (IssuesFinder.ShowProgressBar(2, 3, itemIndex, totalItems, string.Format("Processing prefab: {0}", currentAssetName))) { return(false); } } currentObjectIndex++; bool skipTree; if (IssuesDetector.StartGameObject(objectInfo.current, objectInfo.inPrefabInstance, out skipTree)) { CSTraverseTools.TraverseGameObjectComponents(objectInfo, OnComponentTraverse); IssuesDetector.EndGameObject(objectInfo.current); } objectInfo.skipCurrentTree = skipTree; return(true); }
private static void OnGameObjectComponentTraverse(ObjectTraverseInfo traverseInfo, Component component, int orderIndex) { if (component == null) return; var target = traverseInfo.current; var componentName = CSComponentTools.GetComponentName(component); if (CSObjectTools.IsHiddenInInspector(component)) { orderIndex = -1; } var addSettings = new EntryAddSettings { componentName = componentName, componentIndex = orderIndex, componentInstanceId = component.GetInstanceID(), }; TraverseObjectProperties(target, component, addSettings); }
private static bool OnGameObjectTraverse(ObjectTraverseInfo traverseInfo) { var target = traverseInfo.current; currentObjectCache = null; //Debug.Log("OnGameObjectTraverse " + target); if (traverseInfo.inPrefabInstance) { //Debug.Log("traverseInfo.dirtyComponents " + traverseInfo.dirtyComponents); var prefabAssetSource = CSPrefabTools.GetAssetSource(target); if (prefabAssetSource != null) { var instanceId = prefabAssetSource.GetInstanceID(); TryAddEntryToMatchedConjunctions(target, instanceId, null); if (traverseInfo.dirtyComponents == null) { traverseInfo.skipCurrentTree = true; return(true); } } } var thumbnail = AssetPreview.GetMiniThumbnail(target); if (thumbnail != null && (thumbnail.hideFlags & HideFlags.HideAndDontSave) == 0) { var addSettings = new EntryAddSettings { prefix = "[Object Icon]", }; TryAddEntryToMatchedConjunctions(target, thumbnail.GetInstanceID(), addSettings); } CSTraverseTools.TraverseGameObjectComponents(traverseInfo, OnGameObjectComponentTraverse); return(true); }
private static bool OnGameObjectTraverse(ObjectTraverseInfo objectInfo) { if (currentObjectIndex % ObjectTraverseUpdateStep == 0) { if (IssuesFinder.ShowProgressBar(1, 3, itemIndex, totalItems, string.Format("Processing scene: {0} root {1}/{2}", currentAssetName, objectInfo.rootIndex + 1, objectInfo.TotalRoots))) { return(false); } } currentObjectIndex++; bool skipTree; if (IssuesDetector.StartGameObject(objectInfo.current, objectInfo.inPrefabInstance, out skipTree)) { CSTraverseTools.TraverseGameObjectComponents(objectInfo, OnComponentTraverse); IssuesDetector.EndGameObject(objectInfo.current); } objectInfo.skipCurrentTree = skipTree; return(true); }
public static bool OnGameObjectTraverse(ObjectTraverseInfo traverseInfo) { var target = traverseInfo.current; //Debug.Log("OnGameObjectTraverse " + target); if (traverseInfo.inPrefabInstance) { var prefabAssetSource = CSPrefabTools.GetAssetSource(target); if (prefabAssetSource != null) { var instanceId = prefabAssetSource.GetInstanceID(); currentProcessReferenceCallback(target, instanceId, null); if (traverseInfo.dirtyComponents == null) { traverseInfo.skipCurrentTree = true; return true; } } } var thumbnail = AssetPreview.GetMiniThumbnail(target); if (thumbnail != null && (thumbnail.hideFlags & HideFlags.HideAndDontSave) == 0) { var addSettings = new EntryAddSettings { prefix = "[Object Icon]", }; currentProcessReferenceCallback(target, thumbnail.GetInstanceID(), addSettings); } CSTraverseTools.TraverseGameObjectComponents(traverseInfo, OnGameObjectComponentTraverse); return true; }
private static void OnGameObjectComponentTraverse(ObjectTraverseInfo traverseInfo, Component component, int orderIndex) { if (component == null) { return; } var target = traverseInfo.current; var componentName = component.GetType().Name; if ((component.hideFlags & HideFlags.HideInInspector) != 0) { componentName += " (HideInInspector)"; orderIndex = -1; } var addSettings = new EntryAddSettings { componentName = componentName, componentIndex = orderIndex, }; TraverseObjectProperties(target, component, addSettings); }
private static void OnComponentTraverse(ObjectTraverseInfo objectInfo, Component component, int orderIndex) { IssuesDetector.ProcessComponent(component, orderIndex); }