-
assigned issue to
In OdinPropertyProcessor -> ProcessMemberProperties, adding the attribute ReadOnlyAttribute does not make the property readonly, DisableIfAttribute("@true") works
Issue #747
new
In OdinPropertyProcessor
-> ProcessMemberProperties
, adding the attribute ReadOnlyAttribute
does not make the property readonly, DisableIfAttribute("@true")
works:
public class MyClassProcessor : OdinPropertyProcessor<MyClass>
{
public override void ProcessMemberProperties(List<InspectorPropertyInfo> propertyInfos)
{
foreach (InspectorPropertyInfo propertyInfo in propertyInfos)
{
propertyInfo.GetEditableAttributesList().Add(new DisableIfAttribute("@true")); // works as readonly is intended to work
propertyInfo.GetEditableAttributesList().Add(new Sirenix.OdinInspector.ReadOnlyAttribute()); // does not work
}
}
}
Comments (1)
-
- Log in to comment