Exemplo n.º 1
0
        private static void ProcessPrefab(AssetInfo asset, string assetName, int prefabIndex, int totalPrefabs)
        {
            currentObjectIndex = 0;

            itemIndex  = prefabIndex;
            totalItems = totalPrefabs;

            currentAssetName = assetName;

            var prefabRootGameObject = CSPrefabTools.GetPrefabAssetRoot(asset.Path);

            if (prefabRootGameObject == null)
            {
                return;
            }
            IssuesDetector.StartPrefabAsset(asset);
            CSTraverseTools.TraversePrefabGameObjects(prefabRootGameObject, true, false, OnPrefabGameObjectTraverse);
            IssuesDetector.EndPrefabAsset(asset);
        }
Exemplo n.º 2
0
        private Object GetObjectWithThisIssue()
        {
            Object result = null;

            if (Location == RecordLocation.Scene)
            {
                var scene = CSSceneTools.GetSceneByPath(Path);
                result = CSObjectTools.FindGameObjectInScene(scene, objectId, transformPath);
            }
            else
            {
                //var assetFile = AssetsMap.GetAssetInfoWithPath(path);
                var prefabRoot = CSPrefabTools.GetPrefabAssetRoot(Path);
                if (prefabRoot != null)
                {
                    result = CSObjectTools.FindChildGameObjectRecursive(prefabRoot.transform, objectId, prefabRoot.transform.name, transformPath);
                }
            }
            return(result);
        }