title: GetAssetPreview always returns null for UnityEngine.UI.Image
body: <p>I have an array of prefabs i want to show a preview of in my custom editor. This works for gameobjects with a mesh renderer, for example the basic quad. However when i try to use <code>AssetPreview.GetAssetPreview(tilePrefab.gameObject);</code> on gameobject with a UnityEngine.UI.Image and a canvas renderer it always returns null.</p>
  
  <p>Below is the part of the code that draws the previews.</p>
  
  <pre><code>public class MapEditor : Editor
  {
      public override void OnInspectorGUI()
      {
          for (int prefabIndex = 0; prefabIndex &lt; TileSet.TilePrefabs.Count; prefabIndex++)
              DrawIconTexture(prefabIndex, columnCount);
      }
  
      private void DrawIconTexture(int prefabIndex, int columnCount)
      {
          TileBehaviour tilePrefab = TileSet.TilePrefabs[prefabIndex];
          Texture iconTexture = AssetPreview.GetAssetPreview(tilePrefab.gameObject);
          Rect iconRect = GetIconRect(prefabIndex, columnCount);
  
          if (iconTexture != null)
              GUI.DrawTexture(iconRect, iconTexture);
          else if (AssetPreview.IsLoadingAssetPreview(tilePrefab.gameObject.GetInstanceID()))
              Repaint();
      }
  }
  </code></pre>
  
  <p>I know GetAssetPreview loads assets async, that is solved by the repaint. I have also tried</p>
  
  <pre><code>while(iconTexture == null)
      iconTexture = AssetPreview.GetAssetPreview(tilePrefab.gameObject);
  </code></pre>
  
  <p>But that never finishes.</p>
  
  <p>I also tried to use the texture of the Image</p>
  
  <pre><code>if (iconTexture == null)
      iconTexture = tilePrefab.GetComponent&lt;Image&gt;().sprite.texture;
  </code></pre>
  
  <p>But that does not work because the sprite is in an atlas and all of the atlas is shown.</p>