Skip to content

Commit d59d424

Browse files
committed
- feat: project path bug fix, window rename
1 parent 282aee9 commit d59d424

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

Editor/NodeViewerWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace Irehon.Editor
55
{
66
public class NodeViewerWindow : EditorWindow
77
{
8-
private static readonly string WindowName = "Assets dependencies";
8+
private static readonly string WindowName = "Assets";
99
private NodeGUILayout nodeGUILayout;
1010
private Vector2 scrollPosition;
1111

Editor/ProjectEditorUtilities.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@ public static string[] GetAllAssetsPaths()
3838

3939
public static string[] GetDependenciesPath()
4040
{
41-
var gameScenes = AssetDatabase.FindAssets("t:Scene", new string[] { "Assets/Scenes" });
42-
43-
string[] scenesAssetId = new string[gameScenes.Length];
41+
var scenes = EditorBuildSettings.scenes;
42+
string[] gameScenesPath = new string[scenes.Length];
4443

45-
for (int i = 0; i < gameScenes.Length; i++)
46-
scenesAssetId[i] = AssetDatabase.GUIDToAssetPath(gameScenes[i]);;
44+
for (int i = 0; i < scenes.Length; i++)
45+
gameScenesPath[i] = scenes[i].path;
4746

48-
return AssetDatabase.GetDependencies(scenesAssetId);
47+
return AssetDatabase.GetDependencies(gameScenesPath);
4948
}
5049
}
5150
}

0 commit comments

Comments
 (0)