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
|
|
@ -25,8 +25,7 @@ namespace Module.NavigationTool.Editor.Tools
|
||||||
{
|
{
|
||||||
if (!IS_DIRTY)
|
if (!IS_DIRTY)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EditorBuildSettingsScene[] scenes = EditorBuildSettings.scenes;
|
|
||||||
var listNames = new List<string>();
|
var listNames = new List<string>();
|
||||||
var listPaths = new List<string>();
|
var listPaths = new List<string>();
|
||||||
|
|
||||||
|
|
@ -52,7 +51,7 @@ namespace Module.NavigationTool.Editor.Tools
|
||||||
if (string.IsNullOrEmpty(scenes[i].path))
|
if (string.IsNullOrEmpty(scenes[i].path))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
listNames.Add($"{Path.GetFileNameWithoutExtension(scenes[i].path)} \tBuild settings");
|
listNames.Add($"{Path.GetFileNameWithoutExtension(scenes[i].path)} \tBuild settings");
|
||||||
listPaths.Add(scenes[i].path);
|
listPaths.Add(scenes[i].path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -69,16 +68,15 @@ namespace Module.NavigationTool.Editor.Tools
|
||||||
for (var j = 0; j < assetPaths.Length; j++)
|
for (var j = 0; j < assetPaths.Length; j++)
|
||||||
{
|
{
|
||||||
string path = assetPaths[j];
|
string path = assetPaths[j];
|
||||||
|
|
||||||
if (listPaths.Contains(path))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var scene = AssetDatabase.LoadAssetAtPath<SceneAsset>(path);
|
var scene = AssetDatabase.LoadAssetAtPath<SceneAsset>(path);
|
||||||
|
|
||||||
if (scene == null)
|
if (scene == null)
|
||||||
continue;
|
continue;
|
||||||
|
if (listPaths.Contains(path))
|
||||||
|
continue;
|
||||||
|
|
||||||
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAsset bundle");
|
listNames.Add($"{Path.GetFileNameWithoutExtension(path)} \tAsset bundle");
|
||||||
listPaths.Add(path);
|
listPaths.Add(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -102,7 +100,11 @@ namespace Module.NavigationTool.Editor.Tools
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
string path = assets[i].AssetPath;
|
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);
|
listPaths.Add(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "com.module.navigationtool",
|
"name": "com.module.navigationtool",
|
||||||
"version": "0.8.0",
|
"version": "0.8.1",
|
||||||
"displayName": "Module.NavigationTool",
|
"displayName": "Module.NavigationTool",
|
||||||
"description": "Support for navigation tools, like favorites, history and toolbars",
|
"description": "Support for navigation tools, like favorites, history and toolbars",
|
||||||
"unity": "2019.2",
|
"unity": "2019.2",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue