예제 #1
0
        public void ExportExcel(ScriptableObject sobj, string path)
        {
            Type type = sobj.GetType();

            FieldInfo[] fields = type.GetFields();
            for (int i = 0; i < fields.Length; i++)
            {
                if (fields[i].IsPublic)
                {
                    object value = fields[i].GetValue(sobj);
                    if (value is IList)
                    {
                        ExcelHandler.ExportListToExcel(value as IList, path);
                        break;
                    }
                }
            }
        }