Add an option to mark fields with Required attribute by default and add the Optional attribute

Issue #931 resolved
Artem Perepelitsa created an issue

I found myself adding the Required attribute to most of serialized UnityEngine.Object fields. It is a common case, as optional fields are maybe 5% of overall references in my projects. The attribute is sprinkled everywhere in the code.
I would like to have the option to have fields, eligible for the Required attribute (UnityEngine.Object, strings), be required by default. And instead, use the Optional attribute occasionally when I need it. The option would be represented as a toggle in the Preferences window.

Comments (1)

  1. Tor Esa Vestergaard

    This feature is implemented in Odin Validator in the form of the "Reference Required By Default" rule.

  2. Log in to comment