Skip to content

Commit 1610d5f

Browse files
Update AssetsItemBuilder.cs
1 parent a400f57 commit 1610d5f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Editor/Builders/AssetsItemBuilder.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using TNRD.Utilities;
55
using UnityEditor;
66
using UnityEditor.IMGUI.Controls;
7+
using UnityEngine;
78
using UnityEngine.Assertions;
89

910
namespace TNRD.Builders
@@ -37,6 +38,12 @@ public AdvancedDropdownItem Build()
3738
{
3839
CreateItemForPath(root, assetPath);
3940
}
41+
else if (assetType == typeof(GameObject))
42+
{
43+
GameObject gameObject = AssetDatabase.LoadAssetAtPath<GameObject>(assetPath);
44+
if (gameObject.GetComponent(interfaceType) != null)
45+
CreateItemForPath(root, assetPath);
46+
}
4047
}
4148

4249
return root;

0 commit comments

Comments
 (0)