Deadcow
1
I’m trying to create helper attribute, that’ll check specific field is set in inspector (or maybe there is some solution already?)
For instance, default check for “Not null”:
[AssertField]
[SerializeField]
private GameObject _prefabReference;
And I need to detect “Awake()” of this component from PropertyAttribute or PropertyDrawer and do something like this:
Awake() {
Assert.IsNotNull(_referencedField,
"Field of type " + typeof(_referencedField).Name + " is null");
}
For now I’m use assertions in Awake, but sometimes it’s hard to track all fields I need:

Deadcow
2
Haha somehow google lead me to my own question over the years so I’ll decided to update it with solution I made after all:
MustBeAssignedAttribute
MustBeAssignedAttributeChecker
This attribute tracks nullrefs, empty strings, arrays and value types with default values on game start (in editor)
