Skip to content

Commit 2a10dc2

Browse files
committed
Fix getting preview target in the AssetPreviewAttributeDrawer
1 parent 3cd9f67 commit 2a10dc2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Assets/Editor Toolbox/Editor/Drawers/Regular/AssetPreviewAttributeDrawer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private void DrawAssetPreview(Rect rect, Texture2D previewTexture)
5656

5757
protected override float GetPropertyHeightSafe(SerializedProperty property, GUIContent label)
5858
{
59-
var target = property.objectReferenceValue;
59+
var target = GetValidTarget(property.objectReferenceValue);
6060
var previewTexture = AssetPreview.GetAssetPreview(target);
6161
if (previewTexture == null)
6262
{

0 commit comments

Comments
 (0)