Method OnValidate OnValidate() Editor only: Called by Unity when the component is serialized or the inspector is changed. Declaration protected virtual void OnValidate()