From 04e032164b7d85c2d81c7b725f75753070d12fec Mon Sep 17 00:00:00 2001 From: StarBeats <977663818@qq.com> Date: Thu, 23 Oct 2025 10:21:26 +0800 Subject: [PATCH] update AssetDependencyGraph --- .../Editor/AssetDependencyGraph.cs | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/AssetDependencyGraph/Editor/AssetDependencyGraph.cs b/AssetDependencyGraph/Editor/AssetDependencyGraph.cs index 533f70d..1e69f9f 100644 --- a/AssetDependencyGraph/Editor/AssetDependencyGraph.cs +++ b/AssetDependencyGraph/Editor/AssetDependencyGraph.cs @@ -1,5 +1,4 @@ using MemoryPack; -using Sirenix.Utilities; using System; using System.Collections.Generic; using System.IO; @@ -469,19 +468,25 @@ namespace AssetDependencyGraph } var fullPath = dependAssetId.Path; - if (IsGuid(fullPath)) + var pathIsGuid = IsGuid(fullPath); + if (pathIsGuid) { fullPath = GUIDToPath(fullPath); } var obj = AssetDatabase.LoadMainAssetAtPath(fullPath); if(obj == null) { + if (!pathIsGuid) + { + Debug.Log($"{dependAssetId.Path} 可能已经删除"); + } continue; } Node dependGraphNode = CreateNode(assetGroup, dependAssetNode, obj, false); if (!assetGroup.AssetGraphNodes.Contains(dependGraphNode)) { + dependGraphNode.userData = depth; } @@ -560,13 +565,18 @@ namespace AssetDependencyGraph continue; } var fullPath = dependAssetId.Path; - if (IsGuid(fullPath)) + var pathIsGuid = IsGuid(fullPath); + if (pathIsGuid) { fullPath = GUIDToPath(fullPath); } var obj = AssetDatabase.LoadMainAssetAtPath(fullPath); if (obj == null) { + if (!pathIsGuid) + { + Debug.Log($"{dependAssetId.Path} 可能已经删除"); + } continue; } Node dependentGraphNode = CreateNode(assetGroup, dependAssetNode, obj, false); @@ -785,11 +795,12 @@ namespace AssetDependencyGraph objNode.extensionContainer.Add(typeContainer); objNode.RegisterCallback(e => { + Debug.Log("FocusInEvent"); }); objNode.RegisterCallback(e => { - + Debug.Log("FocusOutEvent"); }); #region Node Icon, replaced with color