Open fawad0dev opened 3 months ago
ShowIf
is a meta-attribute, which only works under NaughtyInspector. And NaughtyInspector, only works for UnityEngine.Object
[Serializable]
class RCValue {}
unfortunately, RCValue
(even with Serializable
) is not a UnityEngine.Object
, so in NaughtyAttributes, it won't work.
Update: @MuttonYung is correct. I missed the AllowNesting
.
You are using meta-attribute in a class which is not serialized directly. Try adding [AllowNesting]
attribute together with [ShowIf]
.
https://dbrizov.github.io/na-docs/attributes/special_attributes/allow_nesting.html
it is still showing all fields![image](https://github.com/dbrizov/NaughtyAttributes/assets/160746799/dad473e7-387b-47e5-aed2-1ff6942c16d4)