dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.47k stars 463 forks source link

[Request] Add Tabs (in unity GUILayout.Toolbar) #384

Open Dragon-0609 opened 5 months ago

Dragon-0609 commented 5 months ago

Let's say, I have a script that has lots of serialized fields. I want to organize them. They're split to parts (in vertical order), but with tabs, they might be organized much better.

image

In the example below, there're 2 tabs. First is Default for fields that weren't specified. Another is Conifg. In config I keep a lot of things like speed, duration, delay and etc, that is specified just once.

TylerTemp commented 5 months ago

Well, this project has not been update for years.

Changing the field's order and display requires an Editor level component, which means, if NaughtyAttributes does not implement this feature, you need to switch to something else, and you need to:

  1. Remove NA's hijacking on UnityEngine.Object drawer
  2. Using only non-meta attributes of NA (or completely switch out of NA)

I have a project which has this feature plus all NA's features. If you're interested please have a look. I'm using it in my personal project and my company's project and have fixed many issues.

However it's quite new so it still can have bugs (feel free to report them!)

A glance of Tabs:

layout_compare


Other options are:

  1. Odin, it has this feature and many more. But it does not have many features I want, like AnimatorParams, AnimatorState. And it's license...
  2. Markup-Attributes, focusing only on layouts.
Dragon-0609 commented 1 month ago

Odin, it has this feature and many more. But it does not have many features I want, like AnimatorParams, AnimatorState. And it's license...

I don't like Odin. One of my colleague used it. It was super buggy. He had to switch to debug mode each time he wanted to change smth in scriptable object.