Skip hide and disable processors on array elements by default

This commit is contained in:
VladV 2022-12-09 19:43:19 +04:00
parent 191d5babe3
commit ac647eb85a
3 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,5 @@
using TriInspector;
using System.Collections.Generic;
using TriInspector;
using UnityEngine;
public class Conditionals_ShowIfSample : ScriptableObject
@ -11,7 +12,7 @@ public class Conditionals_ShowIfSample : ScriptableObject
public Vector3 showWhenMaterialIsNull;
[ShowIf(nameof(toggle))]
public Vector3 showWhenToggleIsTrue;
public List<Vector3> showWhenToggleIsTrue;
[ShowIf(nameof(toggle), false)]
public Vector3 showWhenToggleIsFalse;

View File

@ -50,6 +50,7 @@ namespace TriInspector
}
public Type ProcessorType { get; }
public bool ApplyOnArrayElement { get; set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
@ -61,6 +62,7 @@ namespace TriInspector
}
public Type ProcessorType { get; }
public bool ApplyOnArrayElement { get; set; }
}
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]

View File

@ -247,7 +247,7 @@ namespace TriInspector.Utilities
select CreateInstance<TriPropertyHideProcessor>(
processor.ProcessorType, valueType, it =>
{
//
it.ApplyOnArrayElement = processor.ApplyOnArrayElement;
it.RawAttribute = attribute;
});
}
@ -262,7 +262,7 @@ namespace TriInspector.Utilities
select CreateInstance<TriPropertyDisableProcessor>(
processor.ProcessorType, valueType, it =>
{
//
it.ApplyOnArrayElement = processor.ApplyOnArrayElement;
it.RawAttribute = attribute;
});
}