Is the Required attribute error necessary ?

Issue #405 resolved
Matas Ramasauskas created an issue
[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)

  1. Bjarke Elias

    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!

  2. mSkull001

    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.

  3. Log in to comment