示例#1
0
        private bool CheckIfPackageAvailable(List <LoaderInfo> loaders, CuratedInfo info)
        {
            var packages = from loader in loaders
                           where String.Compare(EditorUtilities.TypeNameToString(loader.loaderType), info.LoaderTypeInfo) == 0
                           select loader;

            return(packages.Any());
        }
示例#2
0
        private bool CheckIfCuratedLoaderExists(List <LoaderInfo> loaders, CuratedInfo info)
        {
            var skip = false;

            foreach (var loadedInfo in loaders)
            {
                var assets = AssetDatabase.FindAssets(String.Format("t:{0}", loadedInfo.loaderType));

                if (assets.Length > 0)
                {
                    string path = AssetDatabase.GUIDToAssetPath(assets[0]);

                    var typeName = EditorUtilities.TypeNameToString(loadedInfo.loaderType);

                    if (path.Contains(info.PackageName) || string.Equals(typeName, info.LoaderTypeInfo))
                    {
                        skip = true;
                        break;
                    }
                }
            }

            return(skip);
        }