How to Create a Custom Inspector with Odin?

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024
  • Create your first Unity custom inspector without a custom inspector script! Do it all with just a handful of attributes from Odin Inspector. This video looks at creating a custom inspector for a simple game manager.
    Blog Post Covering How to Create a Custom Inspector with Odin: odininspector....
    Game Manager Script (GitHub): github.com/one...
    Buy Odin Inspector: odininspector....
    Odin Inspector: odininspector....
    More Odin Tutorials: odininspector....
    Odin Attributes: odininspector....
    Devdog Discord: / discord
    Odin Project Validator: odininspector....
    Assets Used in the Video (Affiliate Links)
    Loop & Music Free: assetstore.uni...
    Mega SFX Pack: assetstore.uni...
    Low Poly Toon Battle Arena: assetstore.uni...
    #devdog #odininspector #unitygamedevelopment

Комментарии • 20

  • @sirenix7891
    @sirenix7891  4 года назад +1

    For those of you who would prefer to see this in blog form check out this link. odininspector.com/blog/custom-inspector-tutorial

  • @TheJonBrant
    @TheJonBrant 4 года назад +4

    THANK YOU! I bought Odin a while back for exactly this, but could never figure out how to get the ball rolling. The documentation is great, but I didn't know what I didn't know, and as such just sort of wandered through it aimlessly, never doing anything. This is great. Thank you so much

  • @zeiksz
    @zeiksz 4 года назад +4

    Please consider using "nameof(stuffname)" what has same result, but will follow stuffrenames as well. docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/nameof like: OnValueChanged(nameof(StateChange)) instead of simple string. If you are using string and method gets renamed, your attr is broken.

  • @SowilTM
    @SowilTM 3 года назад +1

    Amazing! Thanks

  • @aaaagamedev3524
    @aaaagamedev3524 3 года назад +2

    This is NOT a custom inspector.
    Inheriting from Editor is a custom inspector.
    Classic "all our viewers are noobs" mentality.

  • @christopherspettmann1722
    @christopherspettmann1722 4 месяца назад

    Thank for your video. Can OdinInspector also creat nested lists or nested arrays? I am using a lot of these and also have drop down menus inside nested lists. The default inspector shows all lists, but i only want to show the list that is selected in the dropdown. The other lists should be hidden. I hope odin can do the job. Would be great if you could answer it.

  • @lemuelapperson853
    @lemuelapperson853 3 года назад +1

    I'm missing a file or something. "The type or namespace name 'EnemyData' could not be found (are you missing a using directive or an assembly reference?)"
    Where is Enemy Data or Enemy Control? Thanks!

    • @sirenix7891
      @sirenix7891  3 года назад

      Enemy Data is a scriptable object that was created in a different video: ruclips.net/video/qrj90V7a7Ig/видео.html

  • @ktmochiii
    @ktmochiii 2 года назад +1

    damn. just damn. this asset is op

  • @focus9099
    @focus9099 3 года назад +1

    mmmm... I love it! Sub & like from me ;)

  • @broganking9830
    @broganking9830 4 года назад +1

    Thats cool I didn't know about InLineEditor one. One downside to this is it quickly turns into attribute soup after a while and code readability suffers a bit. Is it possible to do these things in another file and use partial class or something similar. Kind of negates the simplicity of it but some of my scripts are massive and with a team code readability is really important and since these are only aesthetic/UX changes to the inspector mostly I was wondering if there is other options?

    • @OneWheelStudio
      @OneWheelStudio 4 года назад +5

      I just now learned from the Sirenix guys there is a way to define "composite attributes." Basically you can bundle several attributes into one. So that's pretty awesome. The documentation is here:odininspector.com/documentation/sirenix.odininspector.includemyattributesattribute
      And it's definitely on the list for future videos!

    • @broganking9830
      @broganking9830 4 года назад

      @@OneWheelStudio "When this attribute is added is added..." xD I actually tripped over that typo lol.
      Thanks ill check this one out!

  • @holmbergen
    @holmbergen 4 года назад +1

    Love these tutorials. A few tips in this video I hadn't seen before, thanks!
    Maybe a tutorial in the future explaining BoxGroup/HorizontalGroup/VerticalGroup being used together would help a lot to understanding how they work. I've been using the RPG sample as a starting point for my own project and still not sure how the different groups work.
    Plus the RPG sample has been a great motivator for me for cleaning up fields and making it look nice. A separated window for creating/editing ScriptableObjects has been VERY handy compared to using the Project-view window. Thanks again!

    • @sirenix7891
      @sirenix7891  4 года назад +1

      Glad you're enjoying the videos and learning a few things along the way!
      We're working on a couple new videos that will look at scriptable objects. The second video will build an inspector and use a combination of horizontal and vertical groups to do a little organization - not a big focus but it's there. It definitely took me a bit to wrap my head around how the groups work together. I've been thinking it could be worth talking about it in a video. I'll add it to the list of ideas! Much appreciated.

  • @burnsy96
    @burnsy96 3 года назад

    I work in a team where we upload to a company depot where the package manager cannot be committed.
    Is there an option to compile the custom inspector into an editor js file to be distributed individually?

    • @sirenix7891
      @sirenix7891  3 года назад

      There is no way to compile an inspector made with Odin such that it works without Odin. Everybody that needs to see an Odin-created inspector or window needs Odin installed and needs to have a seat license.