1.8.3: Added HideLabel attribute

This commit is contained in:
Anders Ejlersen 2023-11-04 17:47:58 +01:00
parent 61c7356b3a
commit 3259b62387
12 changed files with 97 additions and 8 deletions

View file

@ -42,9 +42,14 @@ namespace Module.Inspector.Editor
return true;
}
public override string GetValidationError(SerializedProperty property)
public override string GetValidationError(ValidatePropertyAttribute attribute, SerializedProperty property)
{
return "NotNullField: Value is null";
string errorMessage = ((NotNullFieldAttribute)attribute).errorMessage;
if (string.IsNullOrEmpty(errorMessage))
return "NotNullField: Value is null";
return errorMessage;
}
}
}