Visibility attributes (ShowIf, HideIf, etc.) are ignored by RequiredAttribute (and other validation features).
Issue #566
resolved
[SerializeField, ShowIf("_foo"), Required] private ScriptableObject _requiredNoMatterWhat; // Validation will still apply to this field.
private bool _foo = false;
Comments (4)
-
-
- changed status to open
This is now considered a feature targeted for Odin 3.0. Expect it and many other useful things to be there!
-
-
assigned issue to
-
assigned issue to
-
- changed status to resolved
This is in the 3.0 beta
- Log in to comment
Is there any news about this? I have a setup where I hide structs when it is not needed, but I still want to have a value be [Required] when the struct it is not hidden. For normal use this is not a problem since the error is hidden, but the scenen validator still reports it.