コード例 #1
0
 private void ScanForOrientations()
 {
     foreach (string modelPath in ValidatorData.GetModelPaths())
     {
         GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(modelPath);
         if (ModelScanner.IsUpright(gameObject))
         {
             continue;
         }
         this.orientationCheck.AddPath(AssetDatabase.GetAssetPath(gameObject));
     }
 }
コード例 #2
0
ファイル: ModelScanner.cs プロジェクト: JeReT/AssetStoreTools
        private void ScanForOrientations()
        {
            List <string> modelPaths = ValidatorData.GetModelPaths();

            foreach (string path in modelPaths)
            {
                GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(path);
                if (!ModelScanner.IsUpright(gameObject))
                {
                    this.orientationCheck.AddPath(AssetDatabase.GetAssetPath(gameObject));
                }
            }
        }
コード例 #3
0
        private void ScanForPrefabs()
        {
            List <string>    pathsWithExtensions = ValidatorData.GetPathsWithExtensions(ValidatorData.PREFAB_EXTENSIONS, null);
            HashSet <string> strs = new HashSet <string>();

            foreach (string pathsWithExtension in pathsWithExtensions)
            {
                GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(pathsWithExtension);
                if (gameObject == null)
                {
                    continue;
                }
                foreach (Mesh mesh in ValidatorData.GetMeshes(gameObject))
                {
                    strs.Add(AssetDatabase.GetAssetPath(mesh));
                }
            }
            List <string> modelPaths = ValidatorData.GetModelPaths();
            List <string> list       = modelPaths.Except <string>(strs, new CustomPathComparer()).ToList <string>();

            this.prefabsCheck.AddPaths(list);
        }
コード例 #4
0
ファイル: ModelScanner.cs プロジェクト: JeReT/AssetStoreTools
        private void ScanForPrefabs()
        {
            List <string>    pathsWithExtensions = ValidatorData.GetPathsWithExtensions(ValidatorData.PREFAB_EXTENSIONS, null);
            HashSet <string> hashSet             = new HashSet <string>();

            foreach (string path in pathsWithExtensions)
            {
                GameObject gameObject = ValidatorData.LoadAssetAtPath <GameObject>(path);
                if (gameObject != null)
                {
                    List <Mesh> meshes = ValidatorData.GetMeshes(gameObject);
                    foreach (Mesh mesh in meshes)
                    {
                        string assetPath = AssetDatabase.GetAssetPath(mesh);
                        hashSet.Add(assetPath);
                    }
                }
            }
            List <string> modelPaths = ValidatorData.GetModelPaths();
            List <string> paths      = modelPaths.Except(hashSet, new CustomPathComparer()).ToList <string>();

            this.prefabsCheck.AddPaths(paths);
        }