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
|
|
@ -26,7 +26,6 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -70,15 +69,14 @@ namespace Module.NavigationTool.Editor.Tools
|
|||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "com.module.navigationtool",
|
||||
"version": "0.8.0",
|
||||
"version": "0.8.1",
|
||||
"displayName": "Module.NavigationTool",
|
||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||
"unity": "2019.2",
|
||||
|
|
|
|||
Loading…
Reference in a new issue