Exemplo n.º 1
0
 internal static IEnumerable <ExportPackageItem> GetAssetItemsForExport(ICollection <string> guids, bool includeDependencies)
 {
     if (guids.Count == 0)
     {
         string[] collection = new string[0];
         guids = new HashSet <string>(AssetServer.CollectAllChildren(AssetServer.GetRootGUID(), collection));
     }
     ExportPackageItem[] source = PackageUtility.BuildExportPackageItemsList(guids.ToArray <string>(), includeDependencies);
     if (includeDependencies)
     {
         if (source.Any((ExportPackageItem asset) => InternalEditorUtility.IsScriptOrAssembly(asset.assetPath)))
         {
             source = PackageUtility.BuildExportPackageItemsList(guids.Union(InternalEditorUtility.GetAllScriptGUIDs()).ToArray <string>(), includeDependencies);
         }
     }
     return((from val in source
             where val.assetPath != "Assets"
             select val).ToArray <ExportPackageItem>());
 }
Exemplo n.º 2
0
 internal static IEnumerable <ExportPackageItem> GetAssetItemsForExport(ICollection <string> guids, bool includeDependencies)
 {
     if (guids.Count == 0)
     {
         guids = (ICollection <string>) new HashSet <string>((IEnumerable <string>)AssetServer.CollectAllChildren(AssetServer.GetRootGUID(), new string[0]));
     }
     ExportPackageItem[] exportPackageItemArray = PackageUtility.BuildExportPackageItemsList(guids.ToArray <string>(), includeDependencies);
     if (includeDependencies && ((IEnumerable <ExportPackageItem>)exportPackageItemArray).Any <ExportPackageItem>((Func <ExportPackageItem, bool>)(asset => InternalEditorUtility.IsScriptOrAssembly(asset.assetPath))))
     {
         exportPackageItemArray = PackageUtility.BuildExportPackageItemsList(guids.Union <string>(InternalEditorUtility.GetAllScriptGUIDs()).ToArray <string>(), includeDependencies);
     }
     return((IEnumerable <ExportPackageItem>)((IEnumerable <ExportPackageItem>)exportPackageItemArray).Where <ExportPackageItem>((Func <ExportPackageItem, bool>)(val => val.assetPath != "Assets")).ToArray <ExportPackageItem>());
 }
Exemplo n.º 3
0
 internal static IEnumerable <AssetsItem> GetAssetItemsForExport(ICollection <string> guids, bool includeDependencies)
 {
     if (guids.Count == 0)
     {
         string[] collection = new string[0];
         guids = new HashSet <string>(AssetServer.CollectAllChildren(AssetServer.GetRootGUID(), collection));
     }
     AssetsItem[] array = AssetServer.BuildExportPackageAssetListAssetsItems(guids.ToArray <string>(), includeDependencies);
     if (includeDependencies)
     {
         if (array.Any((AssetsItem asset) => InternalEditorUtility.IsScriptOrAssembly(asset.pathName)))
         {
             array = AssetServer.BuildExportPackageAssetListAssetsItems(guids.Union(InternalEditorUtility.GetAllScriptGUIDs()).ToArray <string>(), includeDependencies);
         }
     }
     return(array);
 }