How to add Sprite Preview to ANY script Inspector in Unity
Вставка
- Опубліковано 30 вер 2024
- Add a Sprite Preview ⚔️ to your Scriptable Object / MonoBehaviour inspector 📝 by creating a Custom Editor in Unity🙂
#UnityTips #gamedev #unity3d #unity2d #IndieGameDev #shorts
What the actual f*** literally like 2 days ago I was trying so hard to get my icons sprite from the SO asset to show as the preview image I've done it now but I really could of done with this short out of all videos sooner either way thanks this will come in handy soon
I'm really glad that this is useful to you 🙂
This is really good. Should be standard. Is there an easy way to make this Generic?
I think you can check out this github repo github.com/dbrizov/NaughtyAttributes
what a coincidence, i was just wrestling with asset previews last week. a more modular approach would be to create a property attribute called show asset preview, which will draw the preview of the property it's applied to. this way, we don't have to create a custom editor script every time we want to display the preview of a property.
I think there is something like that on github. Can't recall the name.
@@SunnyValleyStudio I commented already about it, but I think you are thinking of NaughtyAttributes.