public static Texture2D GetMiniTypeThumbnail(Type type) { Texture2D result; if (typeof(MonoBehaviour).IsAssignableFrom(type)) { result = EditorGUIUtility.LoadIcon(type.FullName.Replace('.', '/') + " Icon"); } else { result = AssetPreview.INTERNAL_GetMiniTypeThumbnailFromType(type); } return(result); }
/// <summary> /// <para>Returns the thumbnail for the type.</para> /// </summary> /// <param name="type"></param> public static Texture2D GetMiniTypeThumbnail(System.Type type) { return(!typeof(MonoBehaviour).IsAssignableFrom(type) ? AssetPreview.INTERNAL_GetMiniTypeThumbnailFromType(type) : EditorGUIUtility.LoadIcon(type.FullName.Replace('.', '/') + " Icon")); }
public static Texture2D GetMiniTypeThumbnail(Type type) { return(AssetPreview.INTERNAL_GetMiniTypeThumbnailFromType(type)); }