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

КОМЕНТАРІ • 8

  • @YoutuberUser002
    @YoutuberUser002 5 місяців тому +1

    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

  • @drewalkemade3715
    @drewalkemade3715 5 місяців тому +1

    This is really good. Should be standard. Is there an easy way to make this Generic?

    • @SunnyValleyStudio
      @SunnyValleyStudio  5 місяців тому

      I think you can check out this github repo github.com/dbrizov/NaughtyAttributes

  • @bunggo9914
    @bunggo9914 5 місяців тому

    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.

    • @SunnyValleyStudio
      @SunnyValleyStudio  5 місяців тому

      I think there is something like that on github. Can't recall the name.

    • @ImmortalTimothyM
      @ImmortalTimothyM 5 місяців тому +1

      ​@@SunnyValleyStudio I commented already about it, but I think you are thinking of NaughtyAttributes.