Skip to content

Commit 42e3278

Browse files
committed
Fixed not being able to ping some asset search results in Project window (in particular, VFX graph search results)
1 parent f6a999f commit 42e3278

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Plugins/AssetUsageDetector/Editor/Utilities.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,11 @@ public static void GetObjectsToSelectAndPing( this Object obj, out Object select
190190
// Can't ping assets that are hidden from Project window (e.g. animator states of AnimatorController), ping the main asset at that path instead
191191
pingTarget = AssetDatabase.LoadMainAssetAtPath( AssetDatabase.GetAssetPath( obj ) );
192192
}
193+
else if( !AssetDatabase.IsMainAsset( obj ) && Array.IndexOf( AssetDatabase.LoadAllAssetRepresentationsAtPath( AssetDatabase.GetAssetPath( obj ) ), obj ) < 0 )
194+
{
195+
// VFX Graph assets' nodes are serialized as part of the graph but they are invisible in the Project window even though their hideFlags is None (I don't know how)
196+
pingTarget = AssetDatabase.LoadMainAssetAtPath( AssetDatabase.GetAssetPath( obj ) );
197+
}
193198
}
194199
}
195200

0 commit comments

Comments
 (0)