- changed status to resolved
Is the Required attribute error necessary ?
Issue #405
resolved
[SerializeField, Required, ShowIf("_isConstant")] private T _constant;
Where T can be any type, even a primitive such as float. Odin throws an error that the type can't be null thus cannot set the value.
Comments (2)
-
-
I'm going to reintroduce this error message (especially as it currently doesn't call the next drawer and thus value fields just aren't displayed).
Use the SuppressInvalidAttributeError attribute to fix this error instead.
- Log in to comment
No, I agree with you. I've removed the error saying:
"Value types cannot be null, and thus cannot be marked as required."
Thanks a lot!