dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.53k stars 464 forks source link

ShowAssetPreview doesn't work with generic types #335

Closed XardoX closed 2 years ago

XardoX commented 2 years ago

Basically, ShowAssetPreview doesn't work in classes that inherit from generic type class. Not sure if it's fixable. Also, I checked only on scriptableobject.

public abstract class CustomizationItem<T> : ScriptableObject
{
    [SerializeField][ShowAssetPreview(256,256)]
    private T _item;
}

public class AddonItem : CustomizationItem<GameObject>
{

}
XardoX commented 2 years ago

Ok nevermind. I was stupid and tested it on assets that don't have preview.