dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.53k stars 464 forks source link

[Request] Support showing null reference #344

Open Kotsuha opened 1 year ago

Kotsuha commented 1 year ago

Been using NaughtyAttribute for a long time. Thanks for this wonderful plugins.

Currently NaughtyAttribute doesn't support showing null reference. It would say:

Foo is null. ShowNonSerializedFieldAttribute doesn't support reference types with null value.

Is there possibilities for this? I haven't look into the code. I'd imagine to make it work just like Unity did - display a blank object field.

TylerTemp commented 9 months ago

Code is here, called at here and here

It'll be incorrect to display a blank object field because it might be not a object, like a string.

If it's a dynamic field then, maybe display a red background label says "null"?