- Validator: Added asset validators with material texture and shader validation
- Validator: Added option to enable/disable certain validators - Project Settings: Fixed issue, where changes weren't always saved - Unity: Removed deprecated warnings in Unity 6.4
This commit is contained in:
parent
01ac17a078
commit
dd55a87740
30 changed files with 716 additions and 38 deletions
|
|
@ -0,0 +1,23 @@
|
|||
using UnityEditor;
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Module.ProjectValidator.Editor
|
||||
{
|
||||
[CustomPropertyDrawer(typeof(ProjectValidatorSettings.ValidatorEnabled))]
|
||||
internal sealed class EditorProjectValidatorEnabledPropertyDrawer : PropertyDrawer
|
||||
{
|
||||
public override VisualElement CreatePropertyGUI(SerializedProperty property)
|
||||
{
|
||||
var spType = property.FindPropertyRelative(nameof(ProjectValidatorSettings.ValidatorEnabled.type));
|
||||
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 veEnabled = new PropertyField(spEnabled, string.Empty);
|
||||
root.Add(veEnabled);
|
||||
root.Add(veType);
|
||||
return root;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue