gasgiant / Markup-Attributes

A Unity Editor extension for customizing inspector layout with attributes.
MIT License
289 stars 11 forks source link

[BUG] Attributes behavior is wrong on "[SerializeField] private" field #12

Closed WilliamBenichou closed 2 years ago

WilliamBenichou commented 2 years ago

A good practice is to not put all your inspector field in public, but in private instead with the [SerializeField] attribute, that way you still control who has access to these fields in the code. It looks like MarkupAttributes doesn't support it, is there any limitation preventing that ?

gasgiant commented 2 years ago

I of course use [SerializeField] in real code and MarkupAttributes works with it without any issues. I use public in the examples simply to avoid clutter.

WilliamBenichou commented 2 years ago

I don't fully understand what's happening then, maybe just an error on my side. Was able to repro yesterday, but know it seems to be working fine. What I did was:

Anyway, thanks for the answer, I'll close this issue and reopen a new one if I can find precise repro case. And thanks for your awesome work on this plugin !