private static bool NeedsTransformReset(GameObject go)
 {
     if (!ValidatorData.GetMeshes(go).Any <Mesh>())
     {
         return(false);
     }
     return(!go.transform.localToWorldMatrix.isIdentity);
 }
 private static bool NeedsCollider(GameObject go)
 {
     if (!ValidatorData.GetMeshes(go).Any <Mesh>())
     {
         return(false);
     }
     return(!go.GetComponentsInChildren <Collider>(true).Any <Collider>());
 }
예제 #3
0
        private static bool NeedsCollider(GameObject go)
        {
            List <Mesh> meshes = ValidatorData.GetMeshes(go);

            if (!meshes.Any <Mesh>())
            {
                return(false);
            }
            Collider[] componentsInChildren = go.GetComponentsInChildren <Collider>(true);
            return(!componentsInChildren.Any <Collider>());
        }
예제 #4
0
        public static List <string> GetModelPaths()
        {
            List <string> pathsWithExtensions = ValidatorData.GetPathsWithExtensions(ValidatorData.MODEL_EXTENSIONS, null);
            List <string> strs = new List <string>();

            foreach (string pathsWithExtension in pathsWithExtensions)
            {
                if (!ValidatorData.GetMeshes(ValidatorData.LoadAssetAtPath <GameObject>(pathsWithExtension)).Any <Mesh>() || ValidatorData.HasAnimations(pathsWithExtension))
                {
                    continue;
                }
                strs.Add(pathsWithExtension);
            }
            return(strs);
        }
예제 #5
0
        public static List <string> GetModelPaths()
        {
            List <string> pathsWithExtensions = ValidatorData.GetPathsWithExtensions(ValidatorData.MODEL_EXTENSIONS, null);
            List <string> list = new List <string>();

            foreach (string text in pathsWithExtensions)
            {
                GameObject  go     = ValidatorData.LoadAssetAtPath <GameObject>(text);
                List <Mesh> meshes = ValidatorData.GetMeshes(go);
                if (meshes.Any <Mesh>() && !ValidatorData.HasAnimations(text))
                {
                    list.Add(text);
                }
            }
            return(list);
        }
        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);
        }
예제 #7
0
        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);
        }
예제 #8
0
        private static bool NeedsTransformReset(GameObject go)
        {
            List <Mesh> meshes = ValidatorData.GetMeshes(go);

            return(meshes.Any <Mesh>() && !go.transform.localToWorldMatrix.isIdentity);
        }