阵列中的条件抽屉位置不正确

问题描述

我在https://gist.github.com/deebrol/02f61b7611fd4eca923776077b92dfc2中使用带有条件属性代码

并稍微更改代码以适合可序列化的类

public override void OnGUI(Rect position,SerializedProperty property,GUIContent label)
{
    ShowWhenAttribute attribtue = attribute as ShowWhenAttribute ;
    string conditionFieldpath = property.propertyPath.Replace(property.name,attribtue.conditionFieldName);

    SerializedProperty conditionField = property.serializedobject.FindProperty(conditionFieldpath);

    if(conditionField == null).....
}

并使用网址的属性bool isTitle绘制字符串标题

[Serializable]
public class Url
{
    [ShowWhen("isTitle")]
    public string title;
    public bool isTitle;
}

很适合单身。

false

true

但在数组中有错误

false

error

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)