Unity中是否有更简洁的序列化多个私有变量的方法?也许不是
[SerializeField]
private float num1;
[SerializeField]
private float num2;
[SerializeField]
private float num3;
[SerializeField]
private float num4;
它可能是这样的
[SerializeField]
private float num1;
private float num2;
private float num3;
private float num4;
[/SerializeField]
这可能吗?
答案 0 :(得分:7)
是的,是
[SerializeField]
float num1,num2,num3,num4,num5;
[SerializeField]
string name, lastName, address, school;