Deadcows/MyBox

[DisplayInspector] folding

Tommigun1980 opened this issue · 2 comments

[DisplayInspector] is great, but if you have lots of stuff in your scriptable object you can't really use [DisplayInspector] as the values take up so much space. Would it be possible to add a foldout around the displayed values, possibly with an attribute argument defining whether it should by default be folded in or out?

Also the displayed values don't use their own attribute drawers but I guess that's a Unity limitation that can't be worked around?

Thank you!

I've done a workaround for current issues. It is done for automatically assigned values (therefore there is not much need for the field to be visible). But it works for me as a sort of shortcut for our scripters. It saves search time and groups things together. It is used for settings in my case.

I would not use this for fields that have to be assigned manually. It is just too hidden, but for adjust only fields it is fine.

Nevertheless, I would prefer an integrated foldout as well.

[DisplayInspector, Foldout(nameof(Test))]
[SerializeField] public Camera Test;

Capture
Capture_2
Capture_3

@MianenCZ elegant solution!
But it is something I wanted to add for a long time, so here you go