以下のコードでアセットのアイコン表示に使われているTextureが取得できる。
Texture iconTexture = AssetDatabase.GetCachedIcon (assetPath);
これでProjectビューみたいなアセット一覧が作れそう。
int selected = 0;
Vector2 scrollPosition = new Vector2 ();
List<string> assetPathList = new List<string> ();
List<GUIContent> contentList = new List<GUIContent>();
...
foreach (string assetPath in assetPathList) {
Texture iconTexture = AssetDatabase.GetCachedIcon (assetPath);
GUIContent content = new GUIContent (assetPath, iconTexture);
contentList.Add (content);
}
scrollPosition = GUILayout.BeginScrollView (scrollPosition, "Box");
selected = GUILayout.SelectionGrid (selected, _searchResultGUIContentList.ToArray(), 1);
GUILayout.EndScrollView ();