private void ApplyImportSetting(NodeData node, IEnumerable <PerformGraph.AssetGroups> incoming, Action <NodeData, string, float> progressFunc) { var referenceImporter = GetReferenceAssetImporter(node); var configurator = new ImportSettingsConfigurator(referenceImporter); foreach (var ag in incoming) { foreach (var assets in ag.assetGroups.Values) { foreach (var asset in assets) { var importer = AssetImporter.GetAtPath(asset.importFrom); if (!configurator.IsEqual(importer)) { if (progressFunc != null) { progressFunc(node, string.Format("Modifying {0}", asset.fileNameAndExtension), 0.5f); } configurator.OverwriteImportSettings(importer); asset.TouchImportAsset(); } } } } }
private void ApplyImportSetting(NodeData node, List <Asset> assets) { if (!assets.Any()) { return; } var referenceImporter = GetReferenceAssetImporter(node); var configurator = new ImportSettingsConfigurator(referenceImporter); foreach (var asset in assets) { var importer = AssetImporter.GetAtPath(asset.importFrom); if (!configurator.IsEqual(importer)) { configurator.OverwriteImportSettings(importer); } } }
private void ApplyImportSetting(NodeData node, List<Asset> assets) { if(!assets.Any()) { return; } var referenceImporter = GetReferenceAssetImporter(node); var configurator = new ImportSettingsConfigurator(referenceImporter); foreach(var asset in assets) { var importer = AssetImporter.GetAtPath(asset.importFrom); if(!configurator.IsEqual(importer)) { configurator.OverwriteImportSettings(importer); } } }