0.8.1: Fixed issue, where scenes in build settings and addressabels would appear multiple times, due to scenes in build settings automatically being added to addressables
This commit is contained in:
parent
6fc88d3986
commit
7b5efffaf8
2 changed files with 12 additions and 10 deletions
|
|
@ -25,8 +25,7 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
{
|
||||
if (!IS_DIRTY)
|
||||
return;
|
||||
|
||||
EditorBuildSettingsScene[] scenes = EditorBuildSettings.scenes;
|
||||
|
||||
var listNames = new List<string>();
|
||||
var listPaths = new List<string>();
|
||||
|
||||
|
|
@ -52,7 +51,7 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
if (string.IsNullOrEmpty(scenes[i].path))
|
||||
continue;
|
||||
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(scenes[i].path)} \tBuild settings");
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(scenes[i].path)} \tBuild settings");
|
||||
listPaths.Add(scenes[i].path);
|
||||
}
|
||||
}
|
||||
|
|
@ -69,16 +68,15 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
for (var j = 0; j < assetPaths.Length; j++)
|
||||
{
|
||||
string path = assetPaths[j];
|
||||
|
||||
if (listPaths.Contains(path))
|
||||
continue;
|
||||
|
||||
|
||||
var scene = AssetDatabase.LoadAssetAtPath<SceneAsset>(path);
|
||||
|
||||
if (scene == null)
|
||||
continue;
|
||||
if (listPaths.Contains(path))
|
||||
continue;
|
||||
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAsset bundle");
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAsset bundle");
|
||||
listPaths.Add(path);
|
||||
}
|
||||
}
|
||||
|
|
@ -102,7 +100,11 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
continue;
|
||||
|
||||
string path = assets[i].AssetPath;
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAddressable");
|
||||
|
||||
if (listPaths.Contains(path))
|
||||
continue;
|
||||
|
||||
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAddressable");
|
||||
listPaths.Add(path);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue