using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using LeoLuz.Extensions;
#if UNITY_EDITOR
using UnityEditor;
using System.Reflection;
#endif
namespace LeoLuz.PropertyAttributes
{
public class hideIf : PropertyAttribute
{
public string varName;
public object value;
public bool skipLine;
public bool readOnly;
public float labelWidth;
public float valueWidth;
public bool withMold;
///
/// (string varToCheck, object ValueToCheck,drawNextInThisLine?, readOnly?)
/// If skipline is true, inspector will discart the line and draw next field in same line
///
public hideIf(string varToCheck, object ValueToCheck, bool drawNextInThisLine = true, bool readOnly = false, float labelWidth = 0, float valueWidth = 0)
{
this.varName = varToCheck;
this.value = ValueToCheck;
this.skipLine = drawNextInThisLine;
this.readOnly = readOnly;
this.labelWidth = labelWidth;
this.valueWidth = valueWidth;
}
public hideIf(string varToCheck, object ValueToCheck, bool withMold)
{
this.varName = varToCheck;
this.value = ValueToCheck;
this.withMold = withMold;
}
public hideIf(string value, float labelWidth = 0, float valueWidth = 0)
{
this.value = value;
this.labelWidth = labelWidth;
this.valueWidth = valueWidth;
}
public hideIf(string varToCheck, object ValueToCheck, float labelWidth, float valueWidth, bool drawNextInThisLine = true, bool readOnly = false)
{
this.varName = varToCheck;
this.value = ValueToCheck;
this.skipLine = drawNextInThisLine;
this.readOnly = readOnly;
this.labelWidth = labelWidth;
this.valueWidth = valueWidth;
}
public IDictionary