求教 unity2020,list嵌套list,Inspector面板显示异常
unity3d吧
全部回复
仅看楼主
level 5
水agh 楼主
测试代码:
public class TestData : MonoBehaviour
{
public List<string> ArmyEntry = new List<string>() { "dsaf" };
public List<AA> LevelUpList = new List<AA>() { new AA() };
public List<Data> data = new List<Data>(1);
public Data data2 = new Data();
}
[System.Serializable]
public class Data
{
public List<string> ArmyEntry = new List<string>() { "dsaf" };
public List<AA> d = new List<AA>() { new AA() };
public int Hp;
public int Armour;
public int Shield;
public int NearAttack;
public int NearAttackAP;
public int RangedAttack;
public int RangedAttackAP;
}
[System.Serializable]
public class AA
{
public string aefawf;
public bool dds;
}
测试截图:
2021年04月25日 03点04分 1
level 6
有解决吗?我刚用2020也发现了这个问题[泪]
2021年04月28日 03点04分 2
更新到2021版本解决的...
2021年04月28日 07点04分
level 6
如果嵌套在里面的List或者数组不用重排序的话,给他加上[NonReorderable]特性,这样就和以前的显示一样,也不会出现重叠的问题了。(治标不治本,嵌套可重排序的数组或者List的重叠问题依然存在)
2021年04月28日 03点04分 3
level 1
请问楼主有解决吗?这个问题也困扰我很久。
2023年04月04日 09点04分 4
升级版本解决
2023年04月04日 09点04分
1