Viewing private variables quickly.

Hello,
I was wondering if there could be a way where when a programmer creates private variables in their scripts, they don’t show up in the inspector, but when a programmer right clicks on it, the value shows up. It would save the programmer time from having to switch the variable from private, to public and back to private again. Is this a good idea?

Thank you,
Michael S. Lowe

if the value is primitive, switch the inspector to debug mode then it would show up. (readonly)

1 Like

when you want to see those values? in playmode?

It’s definitely something that’s required and long overdue, unfortunately Unity’s Inspector system doesn’t have a way to render arbitrary values that are non-serialised. Currently the SerializedObject/Property system’s auto-drawing revolves around values that are serialised. The system needs an upgrade or replacement before we can get such a quality of life feature.

If you’d rather this in the short term, I recommend investing in Odin Inspector.