Fixed issue, where the validator enabled state couldn't be loaded correctly, if in another assembly

This commit is contained in:
Anders Ejlersen 2026-05-24 23:09:47 +02:00
parent ddb4fc25ea
commit 58acb2979d
5 changed files with 135 additions and 11 deletions

View file

@ -9,11 +9,11 @@ namespace Module.ProjectValidator.Editor
{
public override VisualElement CreatePropertyGUI(SerializedProperty property)
{
var spType = property.FindPropertyRelative(nameof(ProjectValidatorSettings.ValidatorEnabled.type));
var spType = property.FindPropertyRelative(nameof(ProjectValidatorSettings.ValidatorEnabled.name));
var spEnabled = property.FindPropertyRelative(nameof(ProjectValidatorSettings.ValidatorEnabled.enabled));
var root = new VisualElement { style = { flexDirection = FlexDirection.Row } };
var veType = new PropertyField(spType, string.Empty) { style = { flexGrow = 1f } };
var veType = new PropertyField(spType, string.Empty) { style = { flexGrow = 1f }, enabledSelf = false };
var veEnabled = new PropertyField(spEnabled, string.Empty);
root.Add(veEnabled);
root.Add(veType);