Ejemplo n.º 1
0
 /// <summary>
 /// 初始化表格中特殊单元格的含义
 /// </summary>
 private static void InitExeclDefs()
 {
     Setting = new ExeclSetting
     {
         classDefine      = new ExeclDefination(0, 0),
         generateFileName = new ExeclDefination(1, 0),
         classType        = new ExeclDefination(0, 1),
         IDFieldName      = new ExeclDefination(0, 2),
         dataStart        = new ExeclDefination(5, 1),
         dataType         = new ExeclDefination(1, 0),
         keyFieldDef      = new ExeclDefination(3, 0),
         noteFieldDef     = new ExeclDefination(4, 0),
     };
 }
        protected override void CheckGUI()
        {
            base.CheckGUI();

            Setting = new ExeclSetting
            {
                classDefine = new ExeclDefination
                {
                    row    = 0,
                    column = 0,
                },
                classType = new ExeclDefination
                {
                    row    = 0,
                    column = 1,
                },
                IDFieldName = new ExeclDefination
                {
                    row    = 0,
                    column = 2,
                },
                dataStart = new ExeclDefination
                {
                    row    = 5,
                    column = 1,
                }
            };

            if (GUILayout.Button("Build Config To Res Version"))
            {
                string        path, relativeName;
                string[]      strs          = Selection.assetGUIDs;
                string        log           = string.Empty;
                List <string> relativeNames = new List <string>();
                foreach (var item in strs)
                {
                    path = AssetDatabase.GUIDToAssetPath(item);
                    CreateItemArrayWithExcel(path, out relativeName, ref log);
                    relativeNames.Add(relativeName.ToLower());
                }
                AssetDatabase.Refresh();
            }
        }