diff --git a/Editor/NodeViewerWindow.cs b/Editor/NodeViewerWindow.cs index 8777fd5..85f0b76 100644 --- a/Editor/NodeViewerWindow.cs +++ b/Editor/NodeViewerWindow.cs @@ -5,7 +5,7 @@ namespace Irehon.Editor { public class NodeViewerWindow : EditorWindow { - private static readonly string WindowName = "Assets dependencies"; + private static readonly string WindowName = "Assets"; private NodeGUILayout nodeGUILayout; private Vector2 scrollPosition; diff --git a/Editor/ProjectEditorUtilities.cs b/Editor/ProjectEditorUtilities.cs index 5f91ba4..d1f485a 100644 --- a/Editor/ProjectEditorUtilities.cs +++ b/Editor/ProjectEditorUtilities.cs @@ -38,14 +38,13 @@ public static string[] GetAllAssetsPaths() public static string[] GetDependenciesPath() { - var gameScenes = AssetDatabase.FindAssets("t:Scene", new string[] { "Assets/Scenes" }); - - string[] scenesAssetId = new string[gameScenes.Length]; + var scenes = EditorBuildSettings.scenes; + string[] gameScenesPath = new string[scenes.Length]; - for (int i = 0; i < gameScenes.Length; i++) - scenesAssetId[i] = AssetDatabase.GUIDToAssetPath(gameScenes[i]);; + for (int i = 0; i < scenes.Length; i++) + gameScenesPath[i] = scenes[i].path; - return AssetDatabase.GetDependencies(scenesAssetId); + return AssetDatabase.GetDependencies(gameScenesPath); } } } \ No newline at end of file