Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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);
        }