Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions Editor/AddressableImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
{
// Skip if all imported and deleted assets are addressables configurations.
var isConfigurationPass =
(importedAssets.Length > 0 && importedAssets.All(x => x.StartsWith("Assets/AddressableAssetsData"))) &&
(deletedAssets.Length > 0 && deletedAssets.All(x => x.StartsWith("Assets/AddressableAssetsData")));
(importedAssets.Length == 0 || importedAssets.All(x => x.StartsWith("Assets/AddressableAssetsData"))) &&
(deletedAssets.Length == 0 || deletedAssets.All(x => x.StartsWith("Assets/AddressableAssetsData")));
if (isConfigurationPass)
{
return;
Expand Down Expand Up @@ -277,8 +277,11 @@ static AddressableAssetEntry CreateOrUpdateAddressableAssetEntry(
foreach (var dynamicLabel in rule.dynamicLabels)
{
var label = rule.ParseReplacement(assetPath, dynamicLabel);
settings.AddLabel(label);
entry.labels.Add(label);
if (!string.IsNullOrEmpty(label))
{
settings.AddLabel(label);
entry.labels.Add(label);
}
}
}
}
Expand Down Expand Up @@ -363,10 +366,14 @@ public static void ReimportFolders(IEnumerable<String> assetPaths, bool showConf
var filesToAdd = Directory.GetFiles(assetPath, "*", SearchOption.AllDirectories);
foreach (var file in filesToAdd)
{
var filePath = file.Replace('\\', '/');
if (filePath.Contains("~/"))
continue;

// Filter out meta and DS_Store files.
if (!IsAssetIgnored(file))
if (!IsAssetIgnored(filePath))
{
pathsToImport.Add(file.Replace('\\', '/'));
pathsToImport.Add(filePath);
Comment thread
ChaosVan marked this conversation as resolved.
Outdated
}
}
}
Expand Down