unity,List元素第一个成员最好是string类型

例如

List<CmyObj> m_list=new List<CmyObj>();

class CmyObj{

  string m_name;

  int m_value;

}

class CmyObj{

  int m_value; 

  string m_name;

}

以上两种CmyObj的定义方式导致m_list在inspector上显示效果不同。

第一种显示效果列好。

原文地址:https://www.cnblogs.com/wantnon/p/5307814.html