dbrizov / NaughtyAttributes

Attribute Extensions for Unity
MIT License
4.58k stars 465 forks source link

[Request] Support showing null reference #344

Open Kotsuha opened 2 years ago

Kotsuha commented 2 years 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 10 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"?