You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I know it's really confusing to do complex checks. Hopefully, when I'm done with MyBox 2.0 you'll be able to simply put several ConditionalField attributes on top of one field.
But for now..
Actually, it looks like your first attempt should work. At least this quick test works for me
public enum MyEnum
{
A, B, C
}
public MyEnum EnumCondition;
public bool BoolCondition;
[ConditionalField(new[] { nameof(EnumCondition), nameof(BoolCondition) }, null, new object[] { MyEnum.B, true })]
public string WhenB_and_True;
Can you please try it again and confirm, that both queryType and someFlag are shown in inspector. And also tell me if tested field is always shown or in contrary is always hidden?
#59 is a request for MultiConditionalFields but the fix doesn't seem to work unless the types that are compared can be inverted.
As an example let's say that queryType must be Option2 and someFlag must true.
These don't work:
[ConditionalField(new[] { nameof(queryType), nameof(someFlag) }, null, new object[] { QueryType.Option2, true })]
[ConditionalField(new[] { nameof(queryType), nameof(someFlag) }, new bool[] { false, true }, new object[] { QueryType.Option2 })]
[ConditionalField(new[] { nameof(queryType), nameof(someFlag) }, null, new object[] { QueryType.Option2 }, new object[] { true })]
It seems to me that the fix only works when the types can be inverted, no?
Thank you again for a really fantastic project!!
The text was updated successfully, but these errors were encountered: