├── .gitignore ├── Assets ├── Editor.meta ├── Editor │ ├── ExcelConvertor.meta │ ├── ExcelConvertor │ │ ├── ConvertorTools.cs │ │ ├── ConvertorTools.cs.meta │ │ ├── ExampleDataConvertor.cs │ │ └── ExampleDataConvertor.cs.meta │ ├── ExcelTools.meta │ └── ExcelTools │ │ ├── ExcelTools.cs │ │ ├── ExcelTools.cs.meta │ │ ├── TableExcelLoader.cs │ │ └── TableExcelLoader.cs.meta ├── Plugins.meta ├── Plugins │ ├── Editor.meta │ ├── Editor │ │ ├── EPPlus.meta │ │ └── EPPlus │ │ │ ├── EPPlus.XML │ │ │ ├── EPPlus.XML.meta │ │ │ ├── EPPlus.dll │ │ │ ├── EPPlus.dll.meta │ │ │ ├── readme.txt │ │ │ └── readme.txt.meta │ ├── ExcelConvertor.meta │ └── ExcelConvertor │ │ ├── Example.cs │ │ ├── Example.cs.meta │ │ ├── TableAttributes.cs │ │ ├── TableAttributes.cs.meta │ │ ├── TableBytesLoader.cs │ │ └── TableBytesLoader.cs.meta ├── Resources.meta ├── Resources │ ├── Tables.meta │ └── Tables │ │ ├── ExampleData.bytes │ │ └── ExampleData.bytes.meta ├── Scripts.meta └── Scripts │ ├── TableReader.meta │ └── TableReader │ ├── ExampleDataReader.cs │ ├── ExampleDataReader.cs.meta │ ├── TableManager.cs │ └── TableManager.cs.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset └── UnityConnectSettings.asset ├── README.md ├── Tables └── ExampleData.xlsx └── UnityPackageManager └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.sln 2 | *.csproj 3 | *.userprefs 4 | *.suo 5 | Library 6 | /obj 7 | /Temp 8 | .idea 9 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d62a81b74ae44d0458f37ed58aa08cd7 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelConvertor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5a21e4f13118936448110c35d82d5ad2 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelConvertor/ConvertorTools.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using UnityEditor; 4 | using System.IO; 5 | 6 | public class ConvertTools 7 | { 8 | [MenuItem("ExcelTools/转换所有表")] 9 | public static void ConvertAll() 10 | { 11 | if (!Directory.Exists("Assets/Resources/Tables")) 12 | { 13 | Directory.CreateDirectory("Assets/Resources/Tables"); 14 | } 15 | ExampleDataConvertor.Convert(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelConvertor/ConvertorTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ff599fd27c7c9604481583d79cd62369 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelConvertor/ExampleDataConvertor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using OfficeOpenXml; 6 | using System.IO; 7 | 8 | public class ExampleDataConvertor 9 | { 10 | private static List m_data = new List(); 11 | public static bool Convert() 12 | { 13 | if (ReadExcel()) 14 | { 15 | SaveBytes(); 16 | return true; 17 | } 18 | else 19 | { 20 | return false; 21 | } 22 | } 23 | 24 | private static bool ReadExcel() 25 | { 26 | ExcelPackage package = TableExcelLoader.Load("ExampleData"); 27 | if (null == package) 28 | { 29 | return false; 30 | } 31 | ExcelWorksheet sheet = package.Workbook.Worksheets["ExampleData"]; 32 | if (null == sheet) 33 | { 34 | return false; 35 | } 36 | int defaultKey = new int(); 37 | for (int index = 1; index <= sheet.Dimension.Rows; ++index) 38 | { 39 | var tableData = new ExampleData(); 40 | int innerIndex = 1; 41 | { 42 | tableData.ID = sheet.Cells[index, innerIndex++].GetValue(); 43 | tableData.Name = ExcelTools.GetCellString(sheet.Cells[index, innerIndex++]); 44 | tableData.FloatValue = sheet.Cells[index, innerIndex++].GetValue(); 45 | try 46 | { 47 | tableData.EnumValue = (TestEnum)Enum.Parse(typeof(TestEnum), ExcelTools.GetCellString(sheet.Cells[index, innerIndex++])); 48 | } 49 | catch(System.Exception ex) 50 | { 51 | Debug.LogException(ex); 52 | } 53 | int length_FixedList_4 = 5; 54 | int count_FixedList_4 = sheet.Cells[index, innerIndex++].GetValue(); 55 | tableData.FixedList = new int[count_FixedList_4]; 56 | for (int index_FixedList_4 = 0; index_FixedList_4 < length_FixedList_4; ++index_FixedList_4) 57 | { 58 | if (index_FixedList_4 >= count_FixedList_4) break; 59 | 60 | tableData.FixedList[index_FixedList_4] = sheet.Cells[index, innerIndex++].GetValue(); 61 | } 62 | int length_AutoList_4 = 5; 63 | int count_AutoList_4 = sheet.Cells[index, innerIndex++].GetValue(); 64 | tableData.AutoList = new int[count_AutoList_4]; 65 | for (int index_AutoList_4 = 0; index_AutoList_4 < length_AutoList_4; ++index_AutoList_4) 66 | { 67 | if (index_AutoList_4 >= count_AutoList_4) break; 68 | 69 | tableData.AutoList[index_AutoList_4] = sheet.Cells[index, innerIndex++].GetValue(); 70 | } 71 | ExampleInnerData obj_InnerData_4 = new ExampleInnerData(); 72 | { 73 | obj_InnerData_4.ID = sheet.Cells[index, innerIndex++].GetValue(); 74 | int length_AutoList_5 = 5; 75 | int count_AutoList_5 = sheet.Cells[index, innerIndex++].GetValue(); 76 | obj_InnerData_4.AutoList = new ExampleInnerInnerData[count_AutoList_5]; 77 | for (int index_AutoList_5 = 0; index_AutoList_5 < length_AutoList_5; ++index_AutoList_5) 78 | { 79 | if (index_AutoList_5 >= count_AutoList_5) break; 80 | 81 | { 82 | obj_InnerData_4.AutoList[index_AutoList_5].ID = sheet.Cells[index, innerIndex++].GetValue(); 83 | try 84 | { 85 | obj_InnerData_4.AutoList[index_AutoList_5].EnumValue = (TestEnum)Enum.Parse(typeof(TestEnum), ExcelTools.GetCellString(sheet.Cells[index, innerIndex++])); 86 | } 87 | catch(System.Exception ex) 88 | { 89 | Debug.LogException(ex); 90 | } 91 | } 92 | } 93 | } 94 | tableData.InnerData = obj_InnerData_4; 95 | int length_InnerDataList_4 = 5; 96 | int count_InnerDataList_4 = sheet.Cells[index, innerIndex++].GetValue(); 97 | tableData.InnerDataList = new ExampleInnerData[count_InnerDataList_4]; 98 | for (int index_InnerDataList_4 = 0; index_InnerDataList_4 < length_InnerDataList_4; ++index_InnerDataList_4) 99 | { 100 | if (index_InnerDataList_4 >= count_InnerDataList_4) break; 101 | 102 | { 103 | tableData.InnerDataList[index_InnerDataList_4].ID = sheet.Cells[index, innerIndex++].GetValue(); 104 | int length_AutoList_6 = 5; 105 | int count_AutoList_6 = sheet.Cells[index, innerIndex++].GetValue(); 106 | tableData.InnerDataList[index_InnerDataList_4].AutoList = new ExampleInnerInnerData[count_AutoList_6]; 107 | for (int index_AutoList_6 = 0; index_AutoList_6 < length_AutoList_6; ++index_AutoList_6) 108 | { 109 | if (index_AutoList_6 >= count_AutoList_6) break; 110 | 111 | { 112 | tableData.InnerDataList[index_InnerDataList_4].AutoList[index_AutoList_6].ID = sheet.Cells[index, innerIndex++].GetValue(); 113 | try 114 | { 115 | tableData.InnerDataList[index_InnerDataList_4].AutoList[index_AutoList_6].EnumValue = (TestEnum)Enum.Parse(typeof(TestEnum), ExcelTools.GetCellString(sheet.Cells[index, innerIndex++])); 116 | } 117 | catch(System.Exception ex) 118 | { 119 | Debug.LogException(ex); 120 | } 121 | } 122 | } 123 | } 124 | } 125 | } 126 | if (tableData.ID == defaultKey) 127 | { 128 | continue; 129 | } 130 | var existKey = m_data.Find(innerItem => innerItem.ID == tableData.ID); 131 | if (null != existKey) 132 | { 133 | Debug.LogWarning(string.Format("Already has the key {0}, replace the old data.", tableData.ID)); 134 | m_data.Remove(existKey); 135 | } 136 | 137 | m_data.Add(tableData); 138 | } 139 | return true; 140 | } 141 | 142 | private static bool SaveBytes() 143 | { 144 | using (FileStream bytesFile = File.Create("Assets/Resources/Tables/ExampleData.bytes")) 145 | { 146 | using (BinaryWriter writer = new BinaryWriter(bytesFile)) 147 | { 148 | writer.Write(m_data.Count); 149 | foreach (var tableData in m_data) 150 | { 151 | writer.Write(tableData.ID); 152 | writer.Write(tableData.Name); 153 | writer.Write(tableData.FloatValue); 154 | writer.Write((int)tableData.EnumValue); 155 | writer.Write(tableData.FixedList.Length); 156 | foreach (var obj_FixedList_5 in tableData.FixedList) 157 | { 158 | writer.Write(obj_FixedList_5); 159 | } 160 | writer.Write(tableData.AutoList.Length); 161 | foreach (var obj_AutoList_5 in tableData.AutoList) 162 | { 163 | writer.Write(obj_AutoList_5); 164 | } 165 | var obj_InnerData_5 = tableData.InnerData; 166 | { 167 | writer.Write(obj_InnerData_5.ID); 168 | writer.Write(obj_InnerData_5.AutoList.Length); 169 | foreach (var obj_AutoList_6 in obj_InnerData_5.AutoList) 170 | { 171 | writer.Write(obj_AutoList_6.ID); 172 | writer.Write((int)obj_AutoList_6.EnumValue); 173 | } 174 | } 175 | writer.Write(tableData.InnerDataList.Length); 176 | foreach (var obj_InnerDataList_5 in tableData.InnerDataList) 177 | { 178 | writer.Write(obj_InnerDataList_5.ID); 179 | writer.Write(obj_InnerDataList_5.AutoList.Length); 180 | foreach (var obj_AutoList_6 in obj_InnerDataList_5.AutoList) 181 | { 182 | writer.Write(obj_AutoList_6.ID); 183 | writer.Write((int)obj_AutoList_6.EnumValue); 184 | } 185 | } 186 | } 187 | } 188 | } 189 | return true; 190 | } 191 | } 192 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelConvertor/ExampleDataConvertor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbd3b7d16ea81be4d8b79c0d4dd2b497 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelTools.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 668d269c1590cb84dbe294fdc3939f0f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelTools/ExcelTools.cs: -------------------------------------------------------------------------------- 1 | using OfficeOpenXml; 2 | using System; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | using System.IO; 6 | using System.Reflection; 7 | using OfficeOpenXml.FormulaParsing; 8 | using OfficeOpenXml.FormulaParsing.Excel.Functions.Text; 9 | using UnityEditor; 10 | using UnityEngine; 11 | 12 | public class ExcelTools 13 | { 14 | private static Type[] m_tableTypes = { 15 | typeof(ExampleData) 16 | }; 17 | 18 | private static readonly string TableReaderFolder = "Assets/Scripts/TableReader"; 19 | private static readonly string TableConvertorFolder = "Assets/Editor/ExcelConvertor"; 20 | [MenuItem("ExcelTools/生成表格代码")] 21 | public static void CreateAllTableCodes() 22 | { 23 | CreateAllTableConvertor(); 24 | CreateAllTableReader(); 25 | } 26 | //[MenuItem("ExcelTools/生成读表代码")] 27 | public static void CreateAllTableReader() 28 | { 29 | Directory.Delete(TableReaderFolder, true); 30 | AssetDatabase.Refresh(); 31 | Directory.CreateDirectory(TableReaderFolder); 32 | 33 | using (StreamWriter writer = File.CreateText(TableReaderFolder + "/TableManager.cs")) 34 | { 35 | string csStr = "using UnityEngine;\nusing System.Collections;\n\npublic class TableManager\n{\n\tpublic static void LoadTables()\n\t{\n"; 36 | foreach (Type type in m_tableTypes) 37 | { 38 | CreateTableReader(type); 39 | if (type.IsDefined(typeof(PreLoadAttributes), true)) 40 | { 41 | csStr += string.Format("\t\t{0}Reader.Load();\n", type.ToString()); 42 | } 43 | } 44 | csStr += "\t}\n}\n"; 45 | writer.Write(csStr); 46 | } 47 | 48 | AssetDatabase.Refresh(); 49 | } 50 | private static void CreateTableReader(Type type) 51 | { 52 | if (!type.IsClass) 53 | { 54 | Debug.LogWarning("Type " + type.ToString() + "is not class."); 55 | return; 56 | } 57 | using (StreamWriter writer = File.CreateText(TableReaderFolder + "/" + type.ToString() + "Reader.cs")) 58 | { 59 | writer.Write(CreateReaderCS(type)); 60 | } 61 | } 62 | public static string CreateReaderCS(Type type) 63 | { 64 | PropertyInfo[] props = type.GetProperties(); 65 | PropertyInfo keyInfo = null; 66 | foreach (var prop in props) 67 | { 68 | if (prop.IsDefined(typeof(KeyPropAttributes), false)) 69 | { 70 | keyInfo = prop; 71 | break; 72 | } 73 | } 74 | if (null != keyInfo) 75 | { 76 | return CreateDictionayReader(type, keyInfo); 77 | } 78 | else 79 | { 80 | return CreateListReader(type); 81 | } 82 | } 83 | public static string CreateDictionayReader(Type type, PropertyInfo keyInfo) 84 | { 85 | string csStr = "using System.Collections.Generic;\nusing System.IO;\n\npublic class {ClassName}Reader\n{\n\tpublic static {ClassName} Lookup({KeyType} key)\n\t{\n\t\tif (null == m_data && !Load())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\t{ClassName} data = null;\n\t\tm_data.TryGetValue(key, out data);\n\t\treturn data;\n\t}\n\tpublic static bool Load()\n\t{\n\t\tbyte[] bytes = TableBytesLoader.Load(\"{ClassName}\");\n\t\tif (null == bytes)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tusing (MemoryStream stream = new MemoryStream(bytes))\n\t\t{\n\t\t\tusing (BinaryReader reader = new BinaryReader(stream))\n\t\t\t{\n\t\t\t\tm_data = new Dictionary<{KeyType}, {ClassName}>();\n\t\t\t\tint dataCount = reader.ReadInt32();\n\t\t\t\tfor (int index = 0; index < dataCount; ++index)\n\t\t\t\t{\n\t\t\t\t\t{ClassName} tableData = new {ClassName}();\n{ReadObject}\t\t\t\t\tm_data.Add(tableData.{KeyPropName}, tableData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate static Dictionary<{KeyType}, {ClassName}> m_data = null;\n}\n"; 86 | csStr = csStr.Replace("{ClassName}", type.ToString()); 87 | csStr = csStr.Replace("{KeyType}", GetTypeName(keyInfo.PropertyType)); 88 | csStr = csStr.Replace("{KeyPropName}", keyInfo.Name); 89 | csStr = csStr.Replace("{ReadObject}", CreateObjectReaderString(type, "\t\t\t\t\t", "tableData")); 90 | return csStr; 91 | } 92 | public static string CreateListReader(Type type) 93 | { 94 | string csStr = "using System;\nusing System.Collections.Generic;\nusing System.IO;\n\npublic class {ClassName}Reader\n{\n\tpublic static {ClassName} Lookup(Predicate<{ClassName}> condition)\n\t{\n\t\tif (null == m_data && !Load())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn m_data.Find(condition);\n\t}\n\tpublic static List<{ClassName}> LookupAll(Predicate<{ClassName}> condition)\n\t{\n\t\tif (null == m_data && !Load())\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn m_data.FindAll(condition);\n\t}\n\tpublic static bool Load()\n\t{\n\t\tbyte[] bytes = TableBytesLoader.Load(\"{ClassName}\");\n\t\tif (null == bytes)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tusing (MemoryStream stream = new MemoryStream(bytes))\n\t\t{\n\t\t\tusing (BinaryReader reader = new BinaryReader(stream))\n\t\t\t{\n\t\t\t\tm_data = new List<{ClassName}>();\n\t\t\t\tint dataCount = reader.ReadInt32();\n\t\t\t\tfor (int index = 0; index < dataCount; ++index)\n\t\t\t\t{\n\t\t\t\t\t{ClassName} tableData = new {ClassName}();\n{ReadObject}\t\t\t\t\tm_data.Add(tableData);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate static List<{ClassName}> m_data = null;\n}\n"; 95 | csStr = csStr.Replace("{ClassName}", type.ToString()); 96 | csStr = csStr.Replace("{ReadObject}", CreateObjectReaderString(type, "\t\t\t\t\t", "tableData")); 97 | return csStr; 98 | } 99 | public static string Push(ref string preTab) 100 | { 101 | string returnStr = string.Format("{0}{{\n", preTab); 102 | preTab += "\t"; 103 | return returnStr; 104 | } 105 | public static string Pop(ref string preTab) 106 | { 107 | preTab = preTab.Substring(1); 108 | return string.Format("{0}}}\n", preTab); 109 | } 110 | public static string CreateObjectReaderString(Type type, string preTab, string dataName) 111 | { 112 | string csStr = Push(ref preTab); 113 | 114 | PropertyInfo[] propInfoList = type.GetProperties(); 115 | foreach (var propInfo in propInfoList) 116 | { 117 | if (propInfo.PropertyType.IsEnum) 118 | { 119 | csStr += string.Format("{0}{1}.{2} = ({3})reader.ReadInt32();\n", preTab, dataName, propInfo.Name, propInfo.PropertyType.ToString()); 120 | } 121 | else if (propInfo.PropertyType.IsPrimitive) 122 | { 123 | string typeName = propInfo.PropertyType.ToString(); 124 | typeName = typeName.Substring("System.".Length); 125 | csStr += string.Format("{0}{1}.{2} = reader.Read{3}();\n", preTab, dataName, propInfo.Name, typeName); 126 | } 127 | else if (propInfo.PropertyType == typeof(string)) 128 | { 129 | csStr += string.Format("{0}{1}.{2} = reader.ReadString();\n", preTab, dataName, propInfo.Name); 130 | } 131 | else if (propInfo.PropertyType.IsArray) 132 | { 133 | string countName = string.Format("count_{0}_{1}", propInfo.Name, preTab.Length); 134 | string indexName = string.Format("index_{0}_{1}", propInfo.Name, preTab.Length); 135 | string newDataName = string.Format("{0}.{1}[{2}]", dataName, propInfo.Name, indexName); 136 | 137 | string subTypeName = propInfo.PropertyType.ToString(); 138 | subTypeName = subTypeName.Substring(0, subTypeName.Length - 2); 139 | Type subType = GetTypeByName(subTypeName); 140 | if (null != subType) 141 | { 142 | csStr += string.Format("{0}int {1} = reader.ReadInt32();\n", preTab, countName); 143 | csStr += string.Format("{0}{1}.{2} = new {3}[{4}];\n", preTab, dataName, propInfo.Name, GetTypeName(subType), countName); 144 | csStr += string.Format("{0}for (int {1} = 0; {1} < {2}; ++{1})\n", preTab, indexName, countName); 145 | if (subType.IsEnum) 146 | { 147 | csStr += Push(ref preTab); 148 | csStr += string.Format("{0}{1} = ({2})reader.ReadInt32();\n", preTab, newDataName, subTypeName); 149 | csStr += Pop(ref preTab); 150 | } 151 | else if (subType.IsPrimitive) 152 | { 153 | csStr += Push(ref preTab); 154 | csStr += string.Format("{0}{1} = reader.Read{2}();\n", preTab, newDataName, subTypeName.Substring("System.".Length)); 155 | csStr += Pop(ref preTab); 156 | } 157 | else if (subType == typeof(string)) 158 | { 159 | csStr += Push(ref preTab); 160 | csStr += string.Format("{0}{1} = reader.ReadString();\n", preTab, newDataName); 161 | csStr += Pop(ref preTab); 162 | } 163 | else 164 | { 165 | csStr += CreateObjectReaderString(subType, preTab, newDataName); 166 | } 167 | } 168 | } 169 | else 170 | { 171 | string objName = string.Format("obj_{0}_{1}", propInfo.Name, preTab.Length); 172 | csStr += string.Format("{0}{1} {2} = new {1}();\n", preTab, GetTypeName(propInfo.PropertyType), objName); 173 | csStr += CreateObjectReaderString(propInfo.PropertyType, preTab, objName); 174 | csStr += string.Format("{0}{1}.{2} = {3};\n", preTab, dataName, propInfo.Name, objName); 175 | } 176 | } 177 | csStr += Pop(ref preTab); 178 | return csStr; 179 | } 180 | 181 | //[MenuItem("ExcelTools/生成Excel转换代码")] 182 | public static void CreateAllTableConvertor() 183 | { 184 | Directory.Delete(TableConvertorFolder, true); 185 | AssetDatabase.Refresh(); 186 | Directory.CreateDirectory(TableConvertorFolder); 187 | 188 | using (StreamWriter writer = File.CreateText(TableConvertorFolder + "/ConvertorTools.cs")) 189 | { 190 | string csStr = "using UnityEngine;\nusing System.Collections;\nusing UnityEditor;\nusing System.IO;\n\npublic class ConvertTools\n{\n\t[MenuItem(\"ExcelTools/转换所有表\")]\n\tpublic static void ConvertAll()\n\t{\n\t\tif (!Directory.Exists(\"Assets/Resources/Tables\"))\n\t\t{\n\t\t\tDirectory.CreateDirectory(\"Assets/Resources/Tables\");\n\t\t}\n"; 191 | foreach (Type type in m_tableTypes) 192 | { 193 | CreateTableConvertor(type); 194 | csStr += string.Format("\t\t{0}Convertor.Convert();\n", type.ToString()); 195 | } 196 | csStr += "\t}\n}\n"; 197 | writer.Write(csStr); 198 | } 199 | AssetDatabase.Refresh(); 200 | } 201 | public static void CreateTableConvertor(Type type) 202 | { 203 | if (!type.IsClass) 204 | { 205 | Debug.LogWarning("Type " + type.ToString() + "is not class."); 206 | return; 207 | } 208 | using (StreamWriter writer = File.CreateText(TableConvertorFolder + "/" + type.ToString() + "Convertor.cs")) 209 | { 210 | writer.Write(CreateConvertorCS(type)); 211 | } 212 | } 213 | public static string CreateConvertorCS(Type type) 214 | { 215 | PropertyInfo[] props = type.GetProperties(); 216 | PropertyInfo keyInfo = null; 217 | foreach (var prop in props) 218 | { 219 | if (prop.IsDefined(typeof(KeyPropAttributes), false)) 220 | { 221 | keyInfo = prop; 222 | break; 223 | } 224 | } 225 | if (null != keyInfo) 226 | { 227 | return CreateDictionayConvertor(type, keyInfo); 228 | } 229 | else 230 | { 231 | return CreateListConvertor(type); 232 | } 233 | } 234 | public static string CreateDictionayConvertor(Type type, PropertyInfo keyInfo) 235 | { 236 | string csStr = "using UnityEngine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing OfficeOpenXml;\nusing System.IO;\n\npublic class {ClassName}Convertor\n{\n\tprivate static List<{ClassName}> m_data = new List<{ClassName}>();\n\tpublic static bool Convert()\n\t{\n\t\tif (ReadExcel())\n\t\t{\n\t\t\tSaveBytes();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tprivate static bool ReadExcel()\n\t{\n\t\tExcelPackage package = TableExcelLoader.Load(\"{ClassName}\");\n\t\tif (null == package)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tExcelWorksheet sheet = package.Workbook.Worksheets[\"{ClassName}\"];\n\t\tif (null == sheet)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t{KeyType} defaultKey = new {KeyType}();\n\t\tfor (int index = 1; index <= sheet.Dimension.Rows; ++index)\n\t\t{\n\t\t\tvar tableData = new {ClassName}();\n\t\t\tint innerIndex = 1;\n{ReadExcel}\t\t\tif (tableData.{KeyPropName} == defaultKey)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tvar existKey = m_data.Find(innerItem => innerItem.{KeyPropName} == tableData.{KeyPropName});\n\t\t\tif (null != existKey)\n\t\t\t{\n\t\t\t\tDebug.LogWarning(string.Format(\"Already has the key {0}, replace the old data.\", tableData.{KeyPropName}));\n\t\t\t\tm_data.Remove(existKey);\n\t\t\t}\n\n\t\t\tm_data.Add(tableData);\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate static bool SaveBytes()\n\t{\n\t\tusing (FileStream bytesFile = File.Create(\"Assets/Resources/Tables/{ClassName}.bytes\"))\n\t\t{\n\t\t\tusing (BinaryWriter writer = new BinaryWriter(bytesFile))\n\t\t\t{\n\t\t\t\twriter.Write(m_data.Count);\n\t\t\t\tforeach (var tableData in m_data)\n{WriteBytes}\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n"; 237 | csStr = csStr.Replace("{ClassName}", type.ToString()); 238 | csStr = csStr.Replace("{KeyType}", GetTypeName(keyInfo.PropertyType)); 239 | csStr = csStr.Replace("{KeyPropName}", keyInfo.Name); 240 | csStr = csStr.Replace("{ReadExcel}", CreateObjrectReadExcel(type, "\t\t\t", "tableData")); 241 | csStr = csStr.Replace("{WriteBytes}", CreateObjrectWriteBytes(type, "\t\t\t\t", "tableData")); 242 | return csStr; 243 | } 244 | public static string CreateListConvertor(Type type) 245 | { 246 | string csStr = "using UnityEngine;\nusing System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing OfficeOpenXml;\nusing System.IO;\n\npublic class {ClassName}Convertor\n{\n\tprivate static List<{ClassName}> m_data = new List<{ClassName}>();\n\tpublic static bool Convert()\n\t{\n\t\tif (ReadExcel())\n\t\t{\n\t\t\tSaveBytes();\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tprivate static bool ReadExcel()\n\t{\n\t\tExcelPackage package = TableExcelLoader.Load(\"{ClassName}\");\n\t\tif (null == package)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tExcelWorksheet sheet = package.Workbook.Worksheets[\"{ClassName}\"];\n\t\tif (null == sheet)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tfor (int index = 1; index <= sheet.Dimension.Rows; ++index)\n\t\t{\n\t\t\tvar tableData = new {ClassName}();\n\t\t\tint innerIndex = 1;\n{ReadExcel}\t\t\tm_data.Add(tableData);\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate static bool SaveBytes()\n\t{\n\t\tusing (FileStream bytesFile = File.Create(\"Assets/Resources/Tables/{ClassName}.bytes\"))\n\t\t{\n\t\t\tusing (BinaryWriter writer = new BinaryWriter(bytesFile))\n\t\t\t{\n\t\t\t\twriter.Write(m_data.Count);\n\t\t\t\tforeach (var tableData in m_data)\n{WriteBytes}\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n}\n"; 247 | csStr = csStr.Replace("{ClassName}", type.ToString()); 248 | csStr = csStr.Replace("{ReadExcel}", CreateObjrectReadExcel(type, "\t\t\t", "tableData")); 249 | csStr = csStr.Replace("{WriteBytes}", CreateObjrectWriteBytes(type, "\t\t\t\t", "tableData")); 250 | return csStr; 251 | } 252 | 253 | public static string GetCellString(ExcelRangeBase cell) 254 | { 255 | var value = cell.GetValue(); 256 | return string.IsNullOrEmpty(value) ? string.Empty : value; 257 | } 258 | public static string CreateObjrectReadExcel(Type type, string preTab, string dataName) 259 | { 260 | string csStr = Push(ref preTab); 261 | 262 | PropertyInfo[] propInfoList = type.GetProperties(); 263 | foreach (var propInfo in propInfoList) 264 | { 265 | if (propInfo.PropertyType.IsEnum) 266 | { 267 | csStr += string.Format("{0}try\n", preTab); 268 | csStr += Push(ref preTab); 269 | csStr += string.Format("{0}{1}.{2} = ({3})Enum.Parse(typeof({3}), ExcelTools.GetCellString(sheet.Cells[index, innerIndex++]));\n", preTab, dataName, propInfo.Name, propInfo.PropertyType.ToString()); 270 | csStr += Pop(ref preTab); 271 | csStr += string.Format("{0}catch(System.Exception ex)\n{0}{{\n{0}\tDebug.LogException(ex);\n{0}}}\n", preTab); 272 | } 273 | else if (propInfo.PropertyType.IsPrimitive) 274 | { 275 | csStr += string.Format("{0}{1}.{2} = sheet.Cells[index, innerIndex++].GetValue<{3}>();\n", preTab, dataName, propInfo.Name, GetTypeName(propInfo.PropertyType)); 276 | } 277 | else if (propInfo.PropertyType == typeof(string)) 278 | { 279 | csStr += string.Format("{0}{1}.{2} = ExcelTools.GetCellString(sheet.Cells[index, innerIndex++]);\n", preTab, dataName, propInfo.Name); 280 | } 281 | else if (propInfo.PropertyType.IsArray) 282 | { 283 | string maxLength = string.Format("length_{0}_{1}", propInfo.Name, preTab.Length); 284 | string countName = string.Format("count_{0}_{1}", propInfo.Name, preTab.Length); 285 | string indexName = string.Format("index_{0}_{1}", propInfo.Name, preTab.Length); 286 | string newDataName = string.Format("{0}.{1}[{2}]", dataName, propInfo.Name, indexName); 287 | 288 | object[] arrayLengthAttr = propInfo.GetCustomAttributes(typeof(ArrayLengthAttributes), true); 289 | if (null != arrayLengthAttr && arrayLengthAttr.Length > 0) 290 | { 291 | foreach (object attr in arrayLengthAttr) 292 | { 293 | ArrayLengthAttributes realAttr = attr as ArrayLengthAttributes; 294 | csStr += string.Format("{0}int {1} = {2};\n", preTab, maxLength, realAttr.Length); 295 | break; 296 | } 297 | } 298 | csStr += string.Format("{0}int {1} = sheet.Cells[index, innerIndex++].GetValue();\n", preTab, countName); 299 | 300 | string subTypeName = propInfo.PropertyType.ToString(); 301 | subTypeName = subTypeName.Substring(0, subTypeName.Length - 2); 302 | Type subType = GetTypeByName(subTypeName); 303 | if (null != subType) 304 | { 305 | csStr += string.Format("{0}{1}.{2} = new {3}[{4}];\n", preTab, dataName, propInfo.Name, GetTypeName(subType), countName); 306 | csStr += string.Format("{0}for (int {1} = 0; {1} < {2}; ++{1})\n", preTab, indexName, maxLength); 307 | csStr += Push(ref preTab); 308 | csStr += string.Format("{0}if ({1} >= {2}) break;\n\n", preTab, indexName, countName); 309 | if (subType.IsEnum) 310 | { 311 | csStr += string.Format("{0}try\n", preTab); 312 | csStr += Push(ref preTab); 313 | csStr += string.Format("{0}{1} = ({2})Enum.Parse(typeof({2}), ExcelTools.GetCellString(sheet.Cells[index, innerIndex++]));\n", preTab, newDataName, GetTypeName(subType)); 314 | csStr += Pop(ref preTab); 315 | csStr += string.Format("{0}catch(System.Exception ex)\n{0}{{\n{0}\tDebug.LogException(ex);\n{0}}}\n", preTab); 316 | } 317 | else if (subType.IsPrimitive) 318 | { 319 | csStr += string.Format("{0}{1} = sheet.Cells[index, innerIndex++].GetValue<{2}>();\n", preTab, newDataName, GetTypeName(subType)); 320 | } 321 | else if (subType == typeof(string)) 322 | { 323 | csStr += string.Format("{0}{1} = ExcelTools.GetCellString(sheet.Cells[index, innerIndex++]);\n", preTab, newDataName); 324 | } 325 | else 326 | { 327 | csStr += CreateObjrectReadExcel(GetTypeByName(subTypeName), preTab, newDataName); 328 | } 329 | csStr += Pop(ref preTab); 330 | } 331 | } 332 | else 333 | { 334 | string newDataName = string.Format("obj_{0}_{1}", propInfo.Name, preTab.Length); 335 | csStr += string.Format("{0}{1} {2} = new {1}();\n", preTab, GetTypeName(propInfo.PropertyType), newDataName); 336 | csStr += CreateObjrectReadExcel(propInfo.PropertyType, preTab, newDataName); 337 | csStr += string.Format("{0}{1}.{2} = {3};\n", preTab, dataName, propInfo.Name, newDataName); 338 | } 339 | } 340 | csStr += Pop(ref preTab); 341 | return csStr; 342 | } 343 | public static string CreateObjrectWriteBytes(Type type, string preTab, string dataName) 344 | { 345 | string csStr = Push(ref preTab); 346 | 347 | PropertyInfo[] propInfoList = type.GetProperties(); 348 | foreach (var propInfo in propInfoList) 349 | { 350 | if (propInfo.PropertyType.IsEnum) 351 | { 352 | csStr += string.Format("{0}writer.Write((int){1}.{2});\n", preTab, dataName, propInfo.Name); 353 | } 354 | else if (propInfo.PropertyType.IsPrimitive) 355 | { 356 | csStr += string.Format("{0}writer.Write({1}.{2});\n", preTab, dataName, propInfo.Name); 357 | } 358 | else if (propInfo.PropertyType == typeof(string)) 359 | { 360 | csStr += string.Format("{0}writer.Write({1}.{2});\n", preTab, dataName, propInfo.Name); 361 | } 362 | else if (propInfo.PropertyType.IsArray) 363 | { 364 | string newDataName = string.Format("obj_{0}_{1}", propInfo.Name, preTab.Length); 365 | csStr += string.Format("{0}writer.Write({1}.{2}.Length);\n", preTab, dataName, propInfo.Name); 366 | csStr += string.Format("{0}foreach (var {1} in {2}.{3})\n", preTab, newDataName, dataName, propInfo.Name); 367 | string subTypeName = propInfo.PropertyType.ToString(); 368 | subTypeName = subTypeName.Substring(0, subTypeName.Length - 2); 369 | Type subType = GetTypeByName(subTypeName); 370 | if (subType.IsEnum) 371 | { 372 | csStr += Push(ref preTab); 373 | csStr += string.Format("{0}writer.Write((int){1});\n", preTab, newDataName); 374 | csStr += Pop(ref preTab); 375 | } 376 | else if (subType.IsPrimitive) 377 | { 378 | csStr += Push(ref preTab); 379 | csStr += string.Format("{0}writer.Write({1});\n", preTab, newDataName); 380 | csStr += Pop(ref preTab); 381 | } 382 | else if (subType == typeof(string)) 383 | { 384 | csStr += Push(ref preTab); 385 | csStr += string.Format("{0}writer.Write({1});\n", preTab, newDataName); 386 | csStr += Pop(ref preTab); 387 | } 388 | else 389 | { 390 | csStr += CreateObjrectWriteBytes(subType, preTab, newDataName); 391 | } 392 | } 393 | else 394 | { 395 | string newDataName = string.Format("obj_{0}_{1}", propInfo.Name, preTab.Length); 396 | csStr += string.Format("{0}var {1} = tableData.{2};\n", preTab, newDataName, propInfo.Name); 397 | csStr += CreateObjrectWriteBytes(propInfo.PropertyType, preTab, newDataName); 398 | } 399 | } 400 | csStr += Pop(ref preTab); 401 | return csStr; 402 | } 403 | 404 | private static string GetTypeName(Type type) 405 | { 406 | if (typeof(bool) == type) 407 | { 408 | return "bool"; 409 | } 410 | if (typeof(int) == type) 411 | { 412 | return "int"; 413 | } 414 | if (typeof(float) == type) 415 | { 416 | return "float"; 417 | } 418 | if (typeof(double) == type) 419 | { 420 | return "double"; 421 | } 422 | if (typeof(string) == type) 423 | { 424 | return "string"; 425 | } 426 | 427 | if (typeof(bool[]) == type) 428 | { 429 | return "bool[]"; 430 | } 431 | if (typeof(int[]) == type) 432 | { 433 | return "int[]"; 434 | } 435 | if (typeof(float[]) == type) 436 | { 437 | return "float[]"; 438 | } 439 | if (typeof(double[]) == type) 440 | { 441 | return "double[]"; 442 | } 443 | if (typeof(string[]) == type) 444 | { 445 | return "string[]"; 446 | } 447 | return type.ToString(); 448 | } 449 | private static Type GetTypeByName(string typeName) 450 | { 451 | switch (typeName) 452 | { 453 | case "bool": 454 | return typeof(bool); 455 | case "int": 456 | return typeof(int); 457 | case "float": 458 | return typeof(float); 459 | case "double": 460 | return typeof(double); 461 | case "string": 462 | return typeof(string); 463 | case "bool[]": 464 | return typeof(bool[]); 465 | case "int[]": 466 | return typeof(int[]); 467 | case "float[]": 468 | return typeof(float[]); 469 | case "double[]": 470 | return typeof(double[]); 471 | case "string[]": 472 | return typeof(string[]); 473 | default: 474 | Type type = Type.GetType(typeName); 475 | if (type == null) 476 | { 477 | type = Type.GetType(typeName + ", UnityEngine"); 478 | } 479 | if (type == null) 480 | { 481 | type = Type.GetType(typeName + ", Assembly-CSharp-firstpass"); 482 | } 483 | if (type == null) 484 | { 485 | type = Type.GetType(typeName + ", Assembly-CSharp"); 486 | } 487 | return type; 488 | } 489 | } 490 | } 491 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelTools/ExcelTools.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e92b03ce1511de84b98cbe11cf67c82b 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelTools/TableExcelLoader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using OfficeOpenXml; 4 | using System.IO; 5 | 6 | public class TableExcelLoader 7 | { 8 | public delegate ExcelPackage TableLoaderDelegate(string tableName); 9 | public static TableLoaderDelegate Load 10 | { 11 | get { return null == m_loader ? DefaultLoader : m_loader; } 12 | set { m_loader = value; } 13 | } 14 | 15 | private static TableLoaderDelegate m_loader = null; 16 | private static ExcelPackage DefaultLoader(string tableName) 17 | { 18 | FileInfo newFile = new FileInfo("Tables/" + tableName + ".xlsx"); 19 | if (newFile.Exists) 20 | { 21 | return new ExcelPackage(newFile); 22 | } 23 | else 24 | { 25 | return null; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assets/Editor/ExcelTools/TableExcelLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab6d6f3e0755de348a9713af9150077f 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 93bec50a59f268b439146000b0aa5335 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7533ee14f02b16d45aea96ab7bd30d61 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bc8256f1bc7b84b4488c7790a51257a3 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus/EPPlus.XML.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b9452e9096c2fc4ea797d7d3481b41f 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus/EPPlus.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunny352/UnityExcel/47d11a91f1ae7cdce5b7912a9016fff8054ad83b/Assets/Plugins/Editor/EPPlus/EPPlus.dll -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus/EPPlus.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a0d7584bf08e0244797147e4b4bc3802 3 | MonoAssemblyImporter: 4 | serializedVersion: 1 5 | iconMap: {} 6 | executionOrder: {} 7 | userData: 8 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus/readme.txt: -------------------------------------------------------------------------------- 1 | EPPlus 4.0.4 2 | 3 | Visit epplus.codeplex.com for the latest information 4 | 5 | EPPlus-Create Advanced Excel spreadsheet. 6 | 7 | New features 8 | 9 | Replaced Packaging API with DotNetZip 10 | * This will remove any problems with Isolated Storage and enable multi threading 11 | 12 | 13 | New Cell store 14 | * Less memory consumtion 15 | * Insert columns (not on the range level) 16 | * Faster row inserts, 17 | 18 | Formula Parser 19 | * Calculates all formulas in a workbook, a worksheet or in a specified range 20 | * 100+ functions implemented 21 | * Access via Calculate methods on Workbook, Worksheet and Range objects. 22 | * Add custom/missing Excel functions via Workbook.FormulaParserManager. 23 | * Samples added to the EPPlusSamples project. 24 | 25 | The formula parser does not support Array Formulas 26 | * Intersect operator (Space) 27 | * References to external workbooks 28 | * And probably a whole lot of other stuff as well :) 29 | 30 | Perfomance 31 | *Of course the performance of the formula parser is nowhere near Excels.Our focus has been functionality. 32 | 33 | Agile Encryption (Office 2012-) 34 | * Support for newer type of encryption. 35 | 36 | Minor new features 37 | * Chart worksheets 38 | * New Chart Types Bubblecharts 39 | * Radar Charts 40 | * Area Charts 41 | * And lots of bugfixes... 42 | 43 | Beta 2 Changes 44 | * Fixed bug when using RepeatColumns & RepeatRows at the same time. 45 | * VBA project will be left untouched if its not accessed. 46 | * Fixed problem with strings on save. 47 | * Added locks to the cellstore for access by mulitple threads. 48 | * Implemented Indirect function 49 | * Used DisplayNameAttribute to generate column headers from LoadFromCollection 50 | * Rewrote ExcelRangeBase.Copy function. 51 | * Added caching to Save ZipStream for Cells and shared strings to speed up the Save method. 52 | * Added Missing InsertColumn and DeleteColumn 53 | * Added pull request to support Date1904 54 | * Added pull request ExcelWorksheet.LoadFromDataReader 55 | 56 | Release Candidare changes 57 | * Fixed some problems with Range.Copy Function 58 | * InsertColumn and Delete column didn't work in some cases 59 | * Chart.DisplayBlankAs had the wrong default type in Excel 2010+ 60 | * Datavalidation list overflow cauesed corruption of the package 61 | * Fixed a few Calculation when refering ranges (for example If) function and some 62 | * Added ChartAxis.DisplayUnit 63 | * Fixed a bug related to shared formulas 64 | * Named styles faild in some cases. 65 | * Style.Indent got an invalid value in some cases. 66 | * Fixed a problem with AutofitColumns method. 67 | * Performance fix. 68 | * An a whole lot of other small fixes. 69 | 70 | 4.0.1 Fixes 71 | * VBA unreadable content 72 | * Fixed a few issues with InsertRow and DeleteRow 73 | * Fixed bug in Average and AverageA 74 | * Handling of Div/0 in functions 75 | * Fixed VBA CodeModule error when copying a worksheet. 76 | * Value decoding when reading str element for cell value. 77 | * Better exception when accessing a worksheet out of range in the Excelworksheets indexer. 78 | * Added Small and Large function to formula parser. Performance fix when encountering an unknown function. 79 | * Fixed handling strings in formulas 80 | * Calculate hanges if formula start with a parenthes. 81 | * Worksheet.Dimension returned an invalid range in some cases. 82 | * Rowheight was wrong in some cases. 83 | * ExcelSeries.Header had an incorrect validation check. 84 | 85 | 4.0.2 Fixes 86 | * Fixes a whole bunch of bugs related to the cell store (Worksheet.InsertColumn, Worksheet.InsertRow, Worksheet.DeleteColumn, Worksheet.DeleteRow, Range.Copy, Range.Clear) 87 | * Added functions Acos, Acosh, Asinh, Atanh, Atan, CountBlank, CountIfs, Mina, Offset, Median, Hyperlink, Rept 88 | * Fix for reading Excel comment content from the t-element. 89 | * Fix to make Range.LoadFromCollection work better with inheritence 90 | * And alot of other smal fixes 91 | 92 | 4.0.3 Fixes 93 | * Added compilation directive for MONO (Thanks Danny) 94 | * Added functions IfError, Char, Error.Type, Degrees, Fixed, IsNonText, IfNa and SumIfs 95 | * And fixed a lot of issues. See http://epplus.codeplex.com/SourceControl/list/changesets for more details 96 | 97 | 4.0.4 Fixes 98 | * Added functions Daverage, Dvar Dvarp, DMax, DMin DSum, DGet, DCount and DCountA 99 | * Exposed the formula parser logging functionality via FormulaParserManager. 100 | * And fixed a lot of issues. See http://epplus.codeplex.com/SourceControl/list/changesets for more details 101 | -------------------------------------------------------------------------------- /Assets/Plugins/Editor/EPPlus/readme.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1e04d78c5a51af1498a5cf28da62194e 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9f7aa026eae4f5649aa090f1880a5d74 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/Example.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public enum TestEnum 5 | { 6 | enNone, 7 | enFirst, 8 | enSecond, 9 | } 10 | 11 | public class ExampleInnerInnerData 12 | { 13 | public int ID { get; set; } 14 | public TestEnum EnumValue { get; set; } 15 | } 16 | 17 | public class ExampleInnerData 18 | { 19 | public int ID { get; set; } 20 | [ArrayLengthAttributes(5)] 21 | public ExampleInnerInnerData[] AutoList { get; set; } 22 | } 23 | 24 | 25 | [PreLoadAttributes] 26 | public class ExampleData 27 | { 28 | [KeyPropAttributes] 29 | public int ID { get; set; } 30 | public string Name { get; set; } 31 | public float FloatValue { get; set; } 32 | public TestEnum EnumValue { get; set; } 33 | [ArrayLengthAttributes(5)] 34 | public int[] FixedList { get; set; } 35 | [ArrayLengthAttributes(5)] 36 | public int[] AutoList { get; set; } 37 | public ExampleInnerData InnerData { get; set; } 38 | [ArrayLengthAttributes(5)] 39 | public ExampleInnerData[] InnerDataList { get; set; } 40 | } 41 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/Example.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ac9d3ea2fd44784c8761ee2ccc0b273 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/TableAttributes.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System; 4 | 5 | //这个特性用于修饰类,表示需要预先加载 6 | public sealed class PreLoadAttributes : Attribute 7 | { 8 | public PreLoadAttributes() 9 | { 10 | 11 | } 12 | } 13 | 14 | //修饰属性,表示被修饰的属性是索引,一个类中只能有一个索引 15 | public sealed class KeyPropAttributes : Attribute 16 | { 17 | public KeyPropAttributes() 18 | { 19 | 20 | } 21 | } 22 | 23 | //专用于修饰数组属性,描述数组固定长度 24 | public sealed class ArrayLengthAttributes : Attribute 25 | { 26 | public int Length { get; private set; } 27 | public ArrayLengthAttributes(int length) 28 | { 29 | Length = length; 30 | } 31 | } -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/TableAttributes.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef3e02f07b62ffa488e95322bd2e511a 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/TableBytesLoader.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System; 4 | 5 | public class TableBytesLoader 6 | { 7 | public delegate byte[] TableLoaderDelegate(string tableName); 8 | public static TableLoaderDelegate Load 9 | { 10 | get { return null == m_loader ? DefaultLoader : m_loader; } 11 | set { m_loader = value; } 12 | } 13 | 14 | private static TableLoaderDelegate m_loader = null; 15 | private static byte[] DefaultLoader(string tableName) 16 | { 17 | TextAsset tableAssets = Resources.Load(string.Format("Tables/{0}", tableName)); 18 | if (null == tableAssets) 19 | { 20 | return null; 21 | } 22 | else 23 | { 24 | return tableAssets.bytes; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /Assets/Plugins/ExcelConvertor/TableBytesLoader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5952fb55f3b1e94449ced7a79e16e72d 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dc23f400cdba3634ea64db01f5b4ed8f 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Tables.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1610c4ed27657e24c939bc7bc49b86e4 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Resources/Tables/ExampleData.bytes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunny352/UnityExcel/47d11a91f1ae7cdce5b7912a9016fff8054ad83b/Assets/Resources/Tables/ExampleData.bytes -------------------------------------------------------------------------------- /Assets/Resources/Tables/ExampleData.bytes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98627647e24c5504e82698bca7640a67 3 | TextScriptImporter: 4 | userData: 5 | -------------------------------------------------------------------------------- /Assets/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 458c3528d491102439212c3a6fd41f7b 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/TableReader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 924a9c6e7c7326b4e83e4a3d6acfdcf2 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Scripts/TableReader/ExampleDataReader.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.IO; 3 | 4 | public class ExampleDataReader 5 | { 6 | public static ExampleData Lookup(int key) 7 | { 8 | if (null == m_data && !Load()) 9 | { 10 | return null; 11 | } 12 | ExampleData data = null; 13 | m_data.TryGetValue(key, out data); 14 | return data; 15 | } 16 | public static bool Load() 17 | { 18 | byte[] bytes = TableBytesLoader.Load("ExampleData"); 19 | if (null == bytes) 20 | { 21 | return false; 22 | } 23 | using (MemoryStream stream = new MemoryStream(bytes)) 24 | { 25 | using (BinaryReader reader = new BinaryReader(stream)) 26 | { 27 | m_data = new Dictionary(); 28 | int dataCount = reader.ReadInt32(); 29 | for (int index = 0; index < dataCount; ++index) 30 | { 31 | ExampleData tableData = new ExampleData(); 32 | { 33 | tableData.ID = reader.ReadInt32(); 34 | tableData.Name = reader.ReadString(); 35 | tableData.FloatValue = reader.ReadSingle(); 36 | tableData.EnumValue = (TestEnum)reader.ReadInt32(); 37 | int count_FixedList_6 = reader.ReadInt32(); 38 | tableData.FixedList = new int[count_FixedList_6]; 39 | for (int index_FixedList_6 = 0; index_FixedList_6 < count_FixedList_6; ++index_FixedList_6) 40 | { 41 | tableData.FixedList[index_FixedList_6] = reader.ReadInt32(); 42 | } 43 | int count_AutoList_6 = reader.ReadInt32(); 44 | tableData.AutoList = new int[count_AutoList_6]; 45 | for (int index_AutoList_6 = 0; index_AutoList_6 < count_AutoList_6; ++index_AutoList_6) 46 | { 47 | tableData.AutoList[index_AutoList_6] = reader.ReadInt32(); 48 | } 49 | ExampleInnerData obj_InnerData_6 = new ExampleInnerData(); 50 | { 51 | obj_InnerData_6.ID = reader.ReadInt32(); 52 | int count_AutoList_7 = reader.ReadInt32(); 53 | obj_InnerData_6.AutoList = new ExampleInnerInnerData[count_AutoList_7]; 54 | for (int index_AutoList_7 = 0; index_AutoList_7 < count_AutoList_7; ++index_AutoList_7) 55 | { 56 | obj_InnerData_6.AutoList[index_AutoList_7].ID = reader.ReadInt32(); 57 | obj_InnerData_6.AutoList[index_AutoList_7].EnumValue = (TestEnum)reader.ReadInt32(); 58 | } 59 | } 60 | tableData.InnerData = obj_InnerData_6; 61 | int count_InnerDataList_6 = reader.ReadInt32(); 62 | tableData.InnerDataList = new ExampleInnerData[count_InnerDataList_6]; 63 | for (int index_InnerDataList_6 = 0; index_InnerDataList_6 < count_InnerDataList_6; ++index_InnerDataList_6) 64 | { 65 | tableData.InnerDataList[index_InnerDataList_6].ID = reader.ReadInt32(); 66 | int count_AutoList_7 = reader.ReadInt32(); 67 | tableData.InnerDataList[index_InnerDataList_6].AutoList = new ExampleInnerInnerData[count_AutoList_7]; 68 | for (int index_AutoList_7 = 0; index_AutoList_7 < count_AutoList_7; ++index_AutoList_7) 69 | { 70 | tableData.InnerDataList[index_InnerDataList_6].AutoList[index_AutoList_7].ID = reader.ReadInt32(); 71 | tableData.InnerDataList[index_InnerDataList_6].AutoList[index_AutoList_7].EnumValue = (TestEnum)reader.ReadInt32(); 72 | } 73 | } 74 | } 75 | m_data.Add(tableData.ID, tableData); 76 | } 77 | } 78 | } 79 | return true; 80 | } 81 | private static Dictionary m_data = null; 82 | } 83 | -------------------------------------------------------------------------------- /Assets/Scripts/TableReader/ExampleDataReader.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 810be02ecfcf2c241a2996a3b5804d66 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Scripts/TableReader/TableManager.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class TableManager 5 | { 6 | public static void LoadTables() 7 | { 8 | ExampleDataReader.Load(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Scripts/TableReader/TableManager.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4af6c44def0d4bf49bc38ff4a90bf996 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 MingSailor 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | Doppler Factor: 1 9 | Default Speaker Mode: 2 10 | m_SampleRate: 0 11 | m_DSPBufferSize: 0 12 | m_VirtualVoiceCount: 512 13 | m_RealVoiceCount: 32 14 | m_SpatializerPlugin: 15 | m_DisableAudio: 0 16 | m_VirtualizeEffects: 1 17 | -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!236 &1 4 | ClusterInputManager: 5 | m_ObjectHideFlags: 0 6 | m_Inputs: [] 7 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81, z: 0} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_BounceThreshold: 2 10 | m_SleepThreshold: 0.005 11 | m_DefaultContactOffset: 0.01 12 | m_DefaultSolverIterations: 6 13 | m_DefaultSolverVelocityIterations: 1 14 | m_QueriesHitBackfaces: 0 15 | m_QueriesHitTriggers: 1 16 | m_EnableAdaptiveForce: 0 17 | m_EnablePCM: 1 18 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 19 | m_AutoSimulation: 1 20 | m_AutoSyncTransforms: 1 21 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_ExternalVersionControlSupport: Visible Meta Files 8 | m_SerializationMode: 2 9 | m_DefaultBehaviorMode: 0 10 | m_SpritePackerMode: 2 11 | m_SpritePackerPaddingPower: 1 12 | m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd 13 | m_ProjectGenerationRootNamespace: 14 | m_UserGeneratedProjectSuffix: 15 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 9 7 | m_Deferred: 8 | m_Mode: 1 9 | m_Shader: {fileID: 69, guid: 0000000000000000f000000000000000, type: 0} 10 | m_DeferredReflections: 11 | m_Mode: 1 12 | m_Shader: {fileID: 74, guid: 0000000000000000f000000000000000, type: 0} 13 | m_ScreenSpaceShadows: 14 | m_Mode: 1 15 | m_Shader: {fileID: 64, guid: 0000000000000000f000000000000000, type: 0} 16 | m_LegacyDeferred: 17 | m_Mode: 1 18 | m_Shader: {fileID: 63, guid: 0000000000000000f000000000000000, type: 0} 19 | m_DepthNormals: 20 | m_Mode: 1 21 | m_Shader: {fileID: 62, guid: 0000000000000000f000000000000000, type: 0} 22 | m_MotionVectors: 23 | m_Mode: 1 24 | m_Shader: {fileID: 75, guid: 0000000000000000f000000000000000, type: 0} 25 | m_LightHalo: 26 | m_Mode: 1 27 | m_Shader: {fileID: 105, guid: 0000000000000000f000000000000000, type: 0} 28 | m_LensFlare: 29 | m_Mode: 1 30 | m_Shader: {fileID: 102, guid: 0000000000000000f000000000000000, type: 0} 31 | m_AlwaysIncludedShaders: 32 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 33 | - {fileID: 15104, guid: 0000000000000000f000000000000000, type: 0} 34 | - {fileID: 15105, guid: 0000000000000000f000000000000000, type: 0} 35 | - {fileID: 15106, guid: 0000000000000000f000000000000000, type: 0} 36 | - {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0} 37 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 38 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 39 | m_PreloadedShaders: [] 40 | m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000, 41 | type: 0} 42 | m_TierSettings_Tier1: 43 | renderingPath: 1 44 | useCascadedShadowMaps: 1 45 | m_TierSettings_Tier2: 46 | renderingPath: 1 47 | useCascadedShadowMaps: 1 48 | m_TierSettings_Tier3: 49 | renderingPath: 1 50 | useCascadedShadowMaps: 1 51 | m_DefaultRenderingPath: 1 52 | m_DefaultMobileRenderingPath: 1 53 | m_TierSettings: [] 54 | m_LightmapStripping: 0 55 | m_FogStripping: 0 56 | m_LightmapKeepPlain: 1 57 | m_LightmapKeepDirCombined: 1 58 | m_LightmapKeepDirSeparate: 1 59 | m_LightmapKeepDynamicPlain: 1 60 | m_LightmapKeepDynamicDirCombined: 1 61 | m_LightmapKeepDynamicDirSeparate: 1 62 | m_FogKeepLinear: 1 63 | m_FogKeepExp: 1 64 | m_FogKeepExp2: 1 65 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Axes: 8 | - serializedVersion: 3 9 | m_Name: Horizontal 10 | descriptiveName: 11 | descriptiveNegativeName: 12 | negativeButton: left 13 | positiveButton: right 14 | altNegativeButton: a 15 | altPositiveButton: d 16 | gravity: 3 17 | dead: 0.001 18 | sensitivity: 3 19 | snap: 1 20 | invert: 0 21 | type: 0 22 | axis: 0 23 | joyNum: 0 24 | - serializedVersion: 3 25 | m_Name: Vertical 26 | descriptiveName: 27 | descriptiveNegativeName: 28 | negativeButton: down 29 | positiveButton: up 30 | altNegativeButton: s 31 | altPositiveButton: w 32 | gravity: 3 33 | dead: 0.001 34 | sensitivity: 3 35 | snap: 1 36 | invert: 0 37 | type: 0 38 | axis: 0 39 | joyNum: 0 40 | - serializedVersion: 3 41 | m_Name: Fire1 42 | descriptiveName: 43 | descriptiveNegativeName: 44 | negativeButton: 45 | positiveButton: left ctrl 46 | altNegativeButton: 47 | altPositiveButton: mouse 0 48 | gravity: 1000 49 | dead: 0.001 50 | sensitivity: 1000 51 | snap: 0 52 | invert: 0 53 | type: 0 54 | axis: 0 55 | joyNum: 0 56 | - serializedVersion: 3 57 | m_Name: Fire2 58 | descriptiveName: 59 | descriptiveNegativeName: 60 | negativeButton: 61 | positiveButton: left alt 62 | altNegativeButton: 63 | altPositiveButton: mouse 1 64 | gravity: 1000 65 | dead: 0.001 66 | sensitivity: 1000 67 | snap: 0 68 | invert: 0 69 | type: 0 70 | axis: 0 71 | joyNum: 0 72 | - serializedVersion: 3 73 | m_Name: Fire3 74 | descriptiveName: 75 | descriptiveNegativeName: 76 | negativeButton: 77 | positiveButton: left cmd 78 | altNegativeButton: 79 | altPositiveButton: mouse 2 80 | gravity: 1000 81 | dead: 0.001 82 | sensitivity: 1000 83 | snap: 0 84 | invert: 0 85 | type: 0 86 | axis: 0 87 | joyNum: 0 88 | - serializedVersion: 3 89 | m_Name: Jump 90 | descriptiveName: 91 | descriptiveNegativeName: 92 | negativeButton: 93 | positiveButton: space 94 | altNegativeButton: 95 | altPositiveButton: 96 | gravity: 1000 97 | dead: 0.001 98 | sensitivity: 1000 99 | snap: 0 100 | invert: 0 101 | type: 0 102 | axis: 0 103 | joyNum: 0 104 | - serializedVersion: 3 105 | m_Name: Mouse X 106 | descriptiveName: 107 | descriptiveNegativeName: 108 | negativeButton: 109 | positiveButton: 110 | altNegativeButton: 111 | altPositiveButton: 112 | gravity: 0 113 | dead: 0 114 | sensitivity: 0.1 115 | snap: 0 116 | invert: 0 117 | type: 1 118 | axis: 0 119 | joyNum: 0 120 | - serializedVersion: 3 121 | m_Name: Mouse Y 122 | descriptiveName: 123 | descriptiveNegativeName: 124 | negativeButton: 125 | positiveButton: 126 | altNegativeButton: 127 | altPositiveButton: 128 | gravity: 0 129 | dead: 0 130 | sensitivity: 0.1 131 | snap: 0 132 | invert: 0 133 | type: 1 134 | axis: 1 135 | joyNum: 0 136 | - serializedVersion: 3 137 | m_Name: Mouse ScrollWheel 138 | descriptiveName: 139 | descriptiveNegativeName: 140 | negativeButton: 141 | positiveButton: 142 | altNegativeButton: 143 | altPositiveButton: 144 | gravity: 0 145 | dead: 0 146 | sensitivity: 0.1 147 | snap: 0 148 | invert: 0 149 | type: 1 150 | axis: 2 151 | joyNum: 0 152 | - serializedVersion: 3 153 | m_Name: Horizontal 154 | descriptiveName: 155 | descriptiveNegativeName: 156 | negativeButton: 157 | positiveButton: 158 | altNegativeButton: 159 | altPositiveButton: 160 | gravity: 0 161 | dead: 0.19 162 | sensitivity: 1 163 | snap: 0 164 | invert: 0 165 | type: 2 166 | axis: 0 167 | joyNum: 0 168 | - serializedVersion: 3 169 | m_Name: Vertical 170 | descriptiveName: 171 | descriptiveNegativeName: 172 | negativeButton: 173 | positiveButton: 174 | altNegativeButton: 175 | altPositiveButton: 176 | gravity: 0 177 | dead: 0.19 178 | sensitivity: 1 179 | snap: 0 180 | invert: 1 181 | type: 2 182 | axis: 1 183 | joyNum: 0 184 | - serializedVersion: 3 185 | m_Name: Fire1 186 | descriptiveName: 187 | descriptiveNegativeName: 188 | negativeButton: 189 | positiveButton: joystick button 0 190 | altNegativeButton: 191 | altPositiveButton: 192 | gravity: 1000 193 | dead: 0.001 194 | sensitivity: 1000 195 | snap: 0 196 | invert: 0 197 | type: 0 198 | axis: 0 199 | joyNum: 0 200 | - serializedVersion: 3 201 | m_Name: Fire2 202 | descriptiveName: 203 | descriptiveNegativeName: 204 | negativeButton: 205 | positiveButton: joystick button 1 206 | altNegativeButton: 207 | altPositiveButton: 208 | gravity: 1000 209 | dead: 0.001 210 | sensitivity: 1000 211 | snap: 0 212 | invert: 0 213 | type: 0 214 | axis: 0 215 | joyNum: 0 216 | - serializedVersion: 3 217 | m_Name: Fire3 218 | descriptiveName: 219 | descriptiveNegativeName: 220 | negativeButton: 221 | positiveButton: joystick button 2 222 | altNegativeButton: 223 | altPositiveButton: 224 | gravity: 1000 225 | dead: 0.001 226 | sensitivity: 1000 227 | snap: 0 228 | invert: 0 229 | type: 0 230 | axis: 0 231 | joyNum: 0 232 | - serializedVersion: 3 233 | m_Name: Jump 234 | descriptiveName: 235 | descriptiveNegativeName: 236 | negativeButton: 237 | positiveButton: joystick button 3 238 | altNegativeButton: 239 | altPositiveButton: 240 | gravity: 1000 241 | dead: 0.001 242 | sensitivity: 1000 243 | snap: 0 244 | invert: 0 245 | type: 0 246 | axis: 0 247 | joyNum: 0 248 | - serializedVersion: 3 249 | m_Name: Submit 250 | descriptiveName: 251 | descriptiveNegativeName: 252 | negativeButton: 253 | positiveButton: return 254 | altNegativeButton: 255 | altPositiveButton: joystick button 0 256 | gravity: 1000 257 | dead: 0.001 258 | sensitivity: 1000 259 | snap: 0 260 | invert: 0 261 | type: 0 262 | axis: 0 263 | joyNum: 0 264 | - serializedVersion: 3 265 | m_Name: Submit 266 | descriptiveName: 267 | descriptiveNegativeName: 268 | negativeButton: 269 | positiveButton: enter 270 | altNegativeButton: 271 | altPositiveButton: space 272 | gravity: 1000 273 | dead: 0.001 274 | sensitivity: 1000 275 | snap: 0 276 | invert: 0 277 | type: 0 278 | axis: 0 279 | joyNum: 0 280 | - serializedVersion: 3 281 | m_Name: Cancel 282 | descriptiveName: 283 | descriptiveNegativeName: 284 | negativeButton: 285 | positiveButton: escape 286 | altNegativeButton: 287 | altPositiveButton: joystick button 1 288 | gravity: 1000 289 | dead: 0.001 290 | sensitivity: 1000 291 | snap: 0 292 | invert: 0 293 | type: 0 294 | axis: 0 295 | joyNum: 0 296 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshProjectSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | areas: 8 | - name: Walkable 9 | cost: 1 10 | - name: Not Walkable 11 | cost: 1 12 | - name: Jump 13 | cost: 2 14 | - name: 15 | cost: 1 16 | - name: 17 | cost: 1 18 | - name: 19 | cost: 1 20 | - name: 21 | cost: 1 22 | - name: 23 | cost: 1 24 | - name: 25 | cost: 1 26 | - name: 27 | cost: 1 28 | - name: 29 | cost: 1 30 | - name: 31 | cost: 1 32 | - name: 33 | cost: 1 34 | - name: 35 | cost: 1 36 | - name: 37 | cost: 1 38 | - name: 39 | cost: 1 40 | - name: 41 | cost: 1 42 | - name: 43 | cost: 1 44 | - name: 45 | cost: 1 46 | - name: 47 | cost: 1 48 | - name: 49 | cost: 1 50 | - name: 51 | cost: 1 52 | - name: 53 | cost: 1 54 | - name: 55 | cost: 1 56 | - name: 57 | cost: 1 58 | - name: 59 | cost: 1 60 | - name: 61 | cost: 1 62 | - name: 63 | cost: 1 64 | - name: 65 | cost: 1 66 | - name: 67 | cost: 1 68 | - name: 69 | cost: 1 70 | - name: 71 | cost: 1 72 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunny352/UnityExcel/47d11a91f1ae7cdce5b7912a9016fff8054ad83b/ProjectSettings/NavMeshLayers.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | m_Gravity: {x: 0, y: -9.81} 8 | m_DefaultMaterial: {fileID: 0} 9 | m_VelocityIterations: 8 10 | m_PositionIterations: 3 11 | m_VelocityThreshold: 1 12 | m_MaxLinearCorrection: 0.2 13 | m_MaxAngularCorrection: 8 14 | m_MaxTranslationSpeed: 100 15 | m_MaxRotationSpeed: 360 16 | m_BaumgarteScale: 0.2 17 | m_BaumgarteTimeOfImpactScale: 0.75 18 | m_TimeToSleep: 0.5 19 | m_LinearSleepTolerance: 0.01 20 | m_AngularSleepTolerance: 2 21 | m_DefaultContactOffset: 0.01 22 | m_AutoSimulation: 1 23 | m_QueriesHitTriggers: 1 24 | m_QueriesStartInColliders: 1 25 | m_ChangeStopsCallbacks: 0 26 | m_CallbacksOnDisable: 1 27 | m_AutoSyncTransforms: 1 28 | m_AlwaysShowColliders: 0 29 | m_ShowColliderSleep: 1 30 | m_ShowColliderContacts: 0 31 | m_ShowColliderAABB: 0 32 | m_ContactArrowScale: 0.2 33 | m_ColliderAwakeColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.7529412} 34 | m_ColliderAsleepColor: {r: 0.5686275, g: 0.95686275, b: 0.54509807, a: 0.36078432} 35 | m_ColliderContactColor: {r: 1, g: 0, b: 1, a: 0.6862745} 36 | m_ColliderAABBColor: {r: 1, g: 1, b: 0, a: 0.2509804} 37 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 38 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 13 7 | productGUID: ce4d512596b85d345aaa3eff49616f0e 8 | AndroidProfiler: 0 9 | AndroidFilterTouchesWhenObscured: 0 10 | defaultScreenOrientation: 4 11 | targetDevice: 2 12 | useOnDemandResources: 0 13 | accelerometerFrequency: 60 14 | companyName: DefaultCompany 15 | productName: UnityExcel 16 | defaultCursor: {fileID: 0} 17 | cursorHotspot: {x: 0, y: 0} 18 | m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1} 19 | m_ShowUnitySplashScreen: 1 20 | m_ShowUnitySplashLogo: 1 21 | m_SplashScreenOverlayOpacity: 1 22 | m_SplashScreenAnimation: 1 23 | m_SplashScreenLogoStyle: 1 24 | m_SplashScreenDrawMode: 0 25 | m_SplashScreenBackgroundAnimationZoom: 1 26 | m_SplashScreenLogoAnimationZoom: 1 27 | m_SplashScreenBackgroundLandscapeAspect: 1 28 | m_SplashScreenBackgroundPortraitAspect: 1 29 | m_SplashScreenBackgroundLandscapeUvs: 30 | serializedVersion: 2 31 | x: 0 32 | y: 0 33 | width: 1 34 | height: 1 35 | m_SplashScreenBackgroundPortraitUvs: 36 | serializedVersion: 2 37 | x: 0 38 | y: 0 39 | width: 1 40 | height: 1 41 | m_SplashScreenLogos: [] 42 | m_VirtualRealitySplashScreen: {fileID: 0} 43 | m_HolographicTrackingLossScreen: {fileID: 0} 44 | defaultScreenWidth: 1024 45 | defaultScreenHeight: 768 46 | defaultScreenWidthWeb: 960 47 | defaultScreenHeightWeb: 600 48 | m_StereoRenderingPath: 0 49 | m_ActiveColorSpace: 0 50 | m_MTRendering: 1 51 | m_StackTraceTypes: 010000000100000001000000010000000100000001000000 52 | iosShowActivityIndicatorOnLoading: -1 53 | androidShowActivityIndicatorOnLoading: -1 54 | tizenShowActivityIndicatorOnLoading: -1 55 | iosAppInBackgroundBehavior: 0 56 | displayResolutionDialog: 1 57 | iosAllowHTTPDownload: 1 58 | allowedAutorotateToPortrait: 1 59 | allowedAutorotateToPortraitUpsideDown: 1 60 | allowedAutorotateToLandscapeRight: 1 61 | allowedAutorotateToLandscapeLeft: 1 62 | useOSAutorotation: 1 63 | use32BitDisplayBuffer: 1 64 | disableDepthAndStencilBuffers: 0 65 | androidBlitType: 0 66 | defaultIsFullScreen: 1 67 | defaultIsNativeResolution: 1 68 | macRetinaSupport: 1 69 | runInBackground: 0 70 | captureSingleScreen: 0 71 | muteOtherAudioSources: 0 72 | Prepare IOS For Recording: 0 73 | Force IOS Speakers When Recording: 0 74 | submitAnalytics: 1 75 | usePlayerLog: 1 76 | bakeCollisionMeshes: 0 77 | forceSingleInstance: 0 78 | resizableWindow: 0 79 | useMacAppStoreValidation: 0 80 | macAppStoreCategory: public.app-category.games 81 | gpuSkinning: 0 82 | graphicsJobs: 0 83 | xboxPIXTextureCapture: 0 84 | xboxEnableAvatar: 0 85 | xboxEnableKinect: 0 86 | xboxEnableKinectAutoTracking: 0 87 | xboxEnableFitness: 0 88 | visibleInBackground: 0 89 | allowFullscreenSwitch: 1 90 | graphicsJobMode: 0 91 | macFullscreenMode: 2 92 | d3d9FullscreenMode: 1 93 | d3d11FullscreenMode: 1 94 | xboxSpeechDB: 0 95 | xboxEnableHeadOrientation: 0 96 | xboxEnableGuest: 0 97 | xboxEnablePIXSampling: 0 98 | metalFramebufferOnly: 0 99 | n3dsDisableStereoscopicView: 0 100 | n3dsEnableSharedListOpt: 1 101 | n3dsEnableVSync: 0 102 | ignoreAlphaClear: 0 103 | xboxOneResolution: 0 104 | xboxOneMonoLoggingLevel: 0 105 | xboxOneLoggingLevel: 1 106 | xboxOneDisableEsram: 0 107 | xboxOnePresentImmediateThreshold: 0 108 | videoMemoryForVertexBuffers: 0 109 | psp2PowerMode: 0 110 | psp2AcquireBGM: 1 111 | wiiUTVResolution: 0 112 | wiiUGamePadMSAA: 1 113 | wiiUSupportsNunchuk: 0 114 | wiiUSupportsClassicController: 0 115 | wiiUSupportsBalanceBoard: 0 116 | wiiUSupportsMotionPlus: 0 117 | wiiUSupportsProController: 0 118 | wiiUAllowScreenCapture: 1 119 | wiiUControllerCount: 0 120 | m_SupportedAspectRatios: 121 | 4:3: 1 122 | 5:4: 1 123 | 16:10: 1 124 | 16:9: 1 125 | Others: 1 126 | bundleVersion: 1.0 127 | preloadedAssets: [] 128 | metroInputSource: 0 129 | m_HolographicPauseOnTrackingLoss: 1 130 | xboxOneDisableKinectGpuReservation: 0 131 | xboxOneEnable7thCore: 0 132 | vrSettings: 133 | cardboard: 134 | depthFormat: 0 135 | enableTransitionView: 0 136 | daydream: 137 | depthFormat: 0 138 | useSustainedPerformanceMode: 0 139 | enableVideoLayer: 0 140 | useProtectedVideoMemory: 0 141 | hololens: 142 | depthFormat: 1 143 | protectGraphicsMemory: 0 144 | useHDRDisplay: 0 145 | m_ColorGamuts: 00000000 146 | targetPixelDensity: 0 147 | resolutionScalingMode: 0 148 | androidSupportedAspectRatio: 1 149 | androidMaxAspectRatio: 2.1 150 | applicationIdentifier: 151 | Android: com.Company.ProductName 152 | Standalone: unity.DefaultCompany.UnityExcel 153 | Tizen: com.Company.ProductName 154 | iOS: com.Company.ProductName 155 | tvOS: com.Company.ProductName 156 | buildNumber: 157 | iOS: 0 158 | AndroidBundleVersionCode: 1 159 | AndroidMinSdkVersion: 16 160 | AndroidTargetSdkVersion: 0 161 | AndroidPreferredInstallLocation: 1 162 | aotOptions: 163 | stripEngineCode: 1 164 | iPhoneStrippingLevel: 0 165 | iPhoneScriptCallOptimization: 0 166 | ForceInternetPermission: 0 167 | ForceSDCardPermission: 0 168 | CreateWallpaper: 0 169 | APKExpansionFiles: 0 170 | keepLoadedShadersAlive: 0 171 | StripUnusedMeshComponents: 0 172 | VertexChannelCompressionMask: 173 | serializedVersion: 2 174 | m_Bits: 238 175 | iPhoneSdkVersion: 988 176 | iOSTargetOSVersionString: 7.0 177 | tvOSSdkVersion: 0 178 | tvOSRequireExtendedGameController: 0 179 | tvOSTargetOSVersionString: 9.0 180 | uIPrerenderedIcon: 0 181 | uIRequiresPersistentWiFi: 0 182 | uIRequiresFullScreen: 1 183 | uIStatusBarHidden: 1 184 | uIExitOnSuspend: 0 185 | uIStatusBarStyle: 0 186 | iPhoneSplashScreen: {fileID: 0} 187 | iPhoneHighResSplashScreen: {fileID: 0} 188 | iPhoneTallHighResSplashScreen: {fileID: 0} 189 | iPhone47inSplashScreen: {fileID: 0} 190 | iPhone55inPortraitSplashScreen: {fileID: 0} 191 | iPhone55inLandscapeSplashScreen: {fileID: 0} 192 | iPadPortraitSplashScreen: {fileID: 0} 193 | iPadHighResPortraitSplashScreen: {fileID: 0} 194 | iPadLandscapeSplashScreen: {fileID: 0} 195 | iPadHighResLandscapeSplashScreen: {fileID: 0} 196 | appleTVSplashScreen: {fileID: 0} 197 | tvOSSmallIconLayers: [] 198 | tvOSLargeIconLayers: [] 199 | tvOSTopShelfImageLayers: [] 200 | tvOSTopShelfImageWideLayers: [] 201 | iOSLaunchScreenType: 0 202 | iOSLaunchScreenPortrait: {fileID: 0} 203 | iOSLaunchScreenLandscape: {fileID: 0} 204 | iOSLaunchScreenBackgroundColor: 205 | serializedVersion: 2 206 | rgba: 4285163857 207 | iOSLaunchScreenFillPct: 100 208 | iOSLaunchScreenSize: 100 209 | iOSLaunchScreenCustomXibPath: 210 | iOSLaunchScreeniPadType: 0 211 | iOSLaunchScreeniPadImage: {fileID: 0} 212 | iOSLaunchScreeniPadBackgroundColor: 213 | serializedVersion: 2 214 | rgba: 0 215 | iOSLaunchScreeniPadFillPct: 100 216 | iOSLaunchScreeniPadSize: 100 217 | iOSLaunchScreeniPadCustomXibPath: 218 | iOSDeviceRequirements: [] 219 | iOSURLSchemes: [] 220 | iOSBackgroundModes: 0 221 | iOSMetalForceHardShadows: 0 222 | metalEditorSupport: 0 223 | metalAPIValidation: 1 224 | iOSRenderExtraFrameOnPause: 1 225 | appleDeveloperTeamID: 226 | iOSManualSigningProvisioningProfileID: 227 | tvOSManualSigningProvisioningProfileID: 228 | appleEnableAutomaticSigning: 0 229 | AndroidTargetDevice: 0 230 | AndroidSplashScreenScale: 0 231 | androidSplashScreen: {fileID: 0} 232 | AndroidKeystoreName: 233 | AndroidKeyaliasName: 234 | AndroidTVCompatibility: 1 235 | AndroidIsGame: 1 236 | AndroidEnableTango: 0 237 | androidEnableBanner: 1 238 | androidUseLowAccuracyLocation: 0 239 | m_AndroidBanners: 240 | - width: 320 241 | height: 180 242 | banner: {fileID: 0} 243 | androidGamepadSupportLevel: 0 244 | resolutionDialogBanner: {fileID: 0} 245 | m_BuildTargetIcons: [] 246 | m_BuildTargetBatching: [] 247 | m_BuildTargetGraphicsAPIs: 248 | - m_BuildTarget: AndroidPlayer 249 | m_APIs: 08000000 250 | m_Automatic: 0 251 | m_BuildTargetVRSettings: [] 252 | m_BuildTargetEnableVuforiaSettings: [] 253 | openGLRequireES31: 0 254 | openGLRequireES31AEP: 0 255 | m_TemplateCustomTags: {} 256 | mobileMTRendering: 257 | iPhone: 1 258 | tvOS: 1 259 | wiiUTitleID: 0005000011000000 260 | wiiUGroupID: 00010000 261 | wiiUCommonSaveSize: 4096 262 | wiiUAccountSaveSize: 2048 263 | wiiUOlvAccessKey: 0 264 | wiiUTinCode: 0 265 | wiiUJoinGameId: 0 266 | wiiUJoinGameModeMask: 0000000000000000 267 | wiiUCommonBossSize: 0 268 | wiiUAccountBossSize: 0 269 | wiiUAddOnUniqueIDs: [] 270 | wiiUMainThreadStackSize: 3072 271 | wiiULoaderThreadStackSize: 1024 272 | wiiUSystemHeapSize: 128 273 | wiiUTVStartupScreen: {fileID: 0} 274 | wiiUGamePadStartupScreen: {fileID: 0} 275 | wiiUDrcBufferDisabled: 0 276 | wiiUProfilerLibPath: 277 | playModeTestRunnerEnabled: 0 278 | actionOnDotNetUnhandledException: 1 279 | enableInternalProfiler: 0 280 | logObjCUncaughtExceptions: 1 281 | enableCrashReportAPI: 0 282 | cameraUsageDescription: 283 | locationUsageDescription: 284 | microphoneUsageDescription: 285 | switchNetLibKey: 286 | switchSocketMemoryPoolSize: 6144 287 | switchSocketAllocatorPoolSize: 128 288 | switchSocketConcurrencyLimit: 14 289 | switchScreenResolutionBehavior: 2 290 | switchUseCPUProfiler: 0 291 | switchApplicationID: 0x01004b9000490000 292 | switchNSODependencies: 293 | switchTitleNames_0: 294 | switchTitleNames_1: 295 | switchTitleNames_2: 296 | switchTitleNames_3: 297 | switchTitleNames_4: 298 | switchTitleNames_5: 299 | switchTitleNames_6: 300 | switchTitleNames_7: 301 | switchTitleNames_8: 302 | switchTitleNames_9: 303 | switchTitleNames_10: 304 | switchTitleNames_11: 305 | switchPublisherNames_0: 306 | switchPublisherNames_1: 307 | switchPublisherNames_2: 308 | switchPublisherNames_3: 309 | switchPublisherNames_4: 310 | switchPublisherNames_5: 311 | switchPublisherNames_6: 312 | switchPublisherNames_7: 313 | switchPublisherNames_8: 314 | switchPublisherNames_9: 315 | switchPublisherNames_10: 316 | switchPublisherNames_11: 317 | switchIcons_0: {fileID: 0} 318 | switchIcons_1: {fileID: 0} 319 | switchIcons_2: {fileID: 0} 320 | switchIcons_3: {fileID: 0} 321 | switchIcons_4: {fileID: 0} 322 | switchIcons_5: {fileID: 0} 323 | switchIcons_6: {fileID: 0} 324 | switchIcons_7: {fileID: 0} 325 | switchIcons_8: {fileID: 0} 326 | switchIcons_9: {fileID: 0} 327 | switchIcons_10: {fileID: 0} 328 | switchIcons_11: {fileID: 0} 329 | switchSmallIcons_0: {fileID: 0} 330 | switchSmallIcons_1: {fileID: 0} 331 | switchSmallIcons_2: {fileID: 0} 332 | switchSmallIcons_3: {fileID: 0} 333 | switchSmallIcons_4: {fileID: 0} 334 | switchSmallIcons_5: {fileID: 0} 335 | switchSmallIcons_6: {fileID: 0} 336 | switchSmallIcons_7: {fileID: 0} 337 | switchSmallIcons_8: {fileID: 0} 338 | switchSmallIcons_9: {fileID: 0} 339 | switchSmallIcons_10: {fileID: 0} 340 | switchSmallIcons_11: {fileID: 0} 341 | switchManualHTML: 342 | switchAccessibleURLs: 343 | switchLegalInformation: 344 | switchMainThreadStackSize: 1048576 345 | switchPresenceGroupId: 346 | switchLogoHandling: 0 347 | switchReleaseVersion: 0 348 | switchDisplayVersion: 1.0.0 349 | switchStartupUserAccount: 0 350 | switchTouchScreenUsage: 0 351 | switchSupportedLanguagesMask: 0 352 | switchLogoType: 0 353 | switchApplicationErrorCodeCategory: 354 | switchUserAccountSaveDataSize: 0 355 | switchUserAccountSaveDataJournalSize: 0 356 | switchApplicationAttribute: 0 357 | switchCardSpecSize: -1 358 | switchCardSpecClock: -1 359 | switchRatingsMask: 0 360 | switchRatingsInt_0: 0 361 | switchRatingsInt_1: 0 362 | switchRatingsInt_2: 0 363 | switchRatingsInt_3: 0 364 | switchRatingsInt_4: 0 365 | switchRatingsInt_5: 0 366 | switchRatingsInt_6: 0 367 | switchRatingsInt_7: 0 368 | switchRatingsInt_8: 0 369 | switchRatingsInt_9: 0 370 | switchRatingsInt_10: 0 371 | switchRatingsInt_11: 0 372 | switchLocalCommunicationIds_0: 373 | switchLocalCommunicationIds_1: 374 | switchLocalCommunicationIds_2: 375 | switchLocalCommunicationIds_3: 376 | switchLocalCommunicationIds_4: 377 | switchLocalCommunicationIds_5: 378 | switchLocalCommunicationIds_6: 379 | switchLocalCommunicationIds_7: 380 | switchParentalControl: 0 381 | switchAllowsScreenshot: 1 382 | switchDataLossConfirmation: 0 383 | switchSupportedNpadStyles: 3 384 | switchSocketConfigEnabled: 0 385 | switchTcpInitialSendBufferSize: 32 386 | switchTcpInitialReceiveBufferSize: 64 387 | switchTcpAutoSendBufferSizeMax: 256 388 | switchTcpAutoReceiveBufferSizeMax: 256 389 | switchUdpSendBufferSize: 9 390 | switchUdpReceiveBufferSize: 42 391 | switchSocketBufferEfficiency: 4 392 | switchSocketInitializeEnabled: 1 393 | switchNetworkInterfaceManagerInitializeEnabled: 1 394 | switchPlayerConnectionEnabled: 1 395 | ps4NPAgeRating: 12 396 | ps4NPTitleSecret: 397 | ps4NPTrophyPackPath: 398 | ps4ParentalLevel: 1 399 | ps4ContentID: ED1633-NPXX51362_00-0000000000000000 400 | ps4Category: 0 401 | ps4MasterVersion: 01.00 402 | ps4AppVersion: 01.00 403 | ps4AppType: 0 404 | ps4ParamSfxPath: 405 | ps4VideoOutPixelFormat: 0 406 | ps4VideoOutInitialWidth: 1920 407 | ps4VideoOutBaseModeInitialWidth: 1920 408 | ps4VideoOutReprojectionRate: 120 409 | ps4PronunciationXMLPath: 410 | ps4PronunciationSIGPath: 411 | ps4BackgroundImagePath: 412 | ps4StartupImagePath: 413 | ps4SaveDataImagePath: 414 | ps4SdkOverride: 415 | ps4BGMPath: 416 | ps4ShareFilePath: 417 | ps4ShareOverlayImagePath: 418 | ps4PrivacyGuardImagePath: 419 | ps4NPtitleDatPath: 420 | ps4RemotePlayKeyAssignment: -1 421 | ps4RemotePlayKeyMappingDir: 422 | ps4PlayTogetherPlayerCount: 0 423 | ps4EnterButtonAssignment: 1 424 | ps4ApplicationParam1: 0 425 | ps4ApplicationParam2: 0 426 | ps4ApplicationParam3: 0 427 | ps4ApplicationParam4: 0 428 | ps4DownloadDataSize: 0 429 | ps4GarlicHeapSize: 2048 430 | ps4ProGarlicHeapSize: 2560 431 | ps4Passcode: eaoEiIgxIX4a2dREbbSqWy6yhKIDCdJO 432 | ps4pnSessions: 1 433 | ps4pnPresence: 1 434 | ps4pnFriends: 1 435 | ps4pnGameCustomData: 1 436 | playerPrefsSupport: 0 437 | restrictedAudioUsageRights: 0 438 | ps4UseResolutionFallback: 0 439 | ps4ReprojectionSupport: 0 440 | ps4UseAudio3dBackend: 0 441 | ps4SocialScreenEnabled: 0 442 | ps4ScriptOptimizationLevel: 3 443 | ps4Audio3dVirtualSpeakerCount: 14 444 | ps4attribCpuUsage: 0 445 | ps4PatchPkgPath: 446 | ps4PatchLatestPkgPath: 447 | ps4PatchChangeinfoPath: 448 | ps4PatchDayOne: 0 449 | ps4attribUserManagement: 0 450 | ps4attribMoveSupport: 0 451 | ps4attrib3DSupport: 0 452 | ps4attribShareSupport: 0 453 | ps4attribExclusiveVR: 0 454 | ps4disableAutoHideSplash: 0 455 | ps4videoRecordingFeaturesUsed: 0 456 | ps4contentSearchFeaturesUsed: 0 457 | ps4attribEyeToEyeDistanceSettingVR: 0 458 | ps4IncludedModules: [] 459 | monoEnv: 460 | psp2Splashimage: {fileID: 0} 461 | psp2NPTrophyPackPath: 462 | psp2NPSupportGBMorGJP: 0 463 | psp2NPAgeRating: 12 464 | psp2NPTitleDatPath: 465 | psp2NPCommsID: 466 | psp2NPCommunicationsID: 467 | psp2NPCommsPassphrase: 468 | psp2NPCommsSig: 469 | psp2ParamSfxPath: 470 | psp2ManualPath: 471 | psp2LiveAreaGatePath: 472 | psp2LiveAreaBackroundPath: 473 | psp2LiveAreaPath: 474 | psp2LiveAreaTrialPath: 475 | psp2PatchChangeInfoPath: 476 | psp2PatchOriginalPackage: 477 | psp2PackagePassword: yapnxrpMCARCr4zdGc81tBDKsMlaZTXC 478 | psp2KeystoneFile: 479 | psp2MemoryExpansionMode: 0 480 | psp2DRMType: 0 481 | psp2StorageType: 0 482 | psp2MediaCapacity: 0 483 | psp2DLCConfigPath: 484 | psp2ThumbnailPath: 485 | psp2BackgroundPath: 486 | psp2SoundPath: 487 | psp2TrophyCommId: 488 | psp2TrophyPackagePath: 489 | psp2PackagedResourcesPath: 490 | psp2SaveDataQuota: 10240 491 | psp2ParentalLevel: 1 492 | psp2ShortTitle: Not Set 493 | psp2ContentID: IV0000-ABCD12345_00-0123456789ABCDEF 494 | psp2Category: 0 495 | psp2MasterVersion: 01.00 496 | psp2AppVersion: 01.00 497 | psp2TVBootMode: 0 498 | psp2EnterButtonAssignment: 2 499 | psp2TVDisableEmu: 0 500 | psp2AllowTwitterDialog: 1 501 | psp2Upgradable: 0 502 | psp2HealthWarning: 0 503 | psp2UseLibLocation: 0 504 | psp2InfoBarOnStartup: 0 505 | psp2InfoBarColor: 0 506 | psp2ScriptOptimizationLevel: 0 507 | psmSplashimage: {fileID: 0} 508 | splashScreenBackgroundSourceLandscape: {fileID: 0} 509 | splashScreenBackgroundSourcePortrait: {fileID: 0} 510 | spritePackerPolicy: 511 | webGLMemorySize: 256 512 | webGLExceptionSupport: 1 513 | webGLNameFilesAsHashes: 0 514 | webGLDataCaching: 0 515 | webGLDebugSymbols: 0 516 | webGLEmscriptenArgs: 517 | webGLModulesDirectory: 518 | webGLTemplate: APPLICATION:Default 519 | webGLAnalyzeBuildSize: 0 520 | webGLUseEmbeddedResources: 0 521 | webGLUseWasm: 0 522 | webGLCompressionFormat: 1 523 | scriptingDefineSymbols: {} 524 | platformArchitecture: {} 525 | scriptingBackend: {} 526 | incrementalIl2cppBuild: {} 527 | additionalIl2CppArgs: 528 | scriptingRuntimeVersion: 0 529 | apiCompatibilityLevelPerPlatform: {} 530 | m_RenderingPath: 1 531 | m_MobileRenderingPath: 1 532 | metroPackageName: UnityExcel 533 | metroPackageVersion: 534 | metroCertificatePath: 535 | metroCertificatePassword: 536 | metroCertificateSubject: 537 | metroCertificateIssuer: 538 | metroCertificateNotAfter: 0000000000000000 539 | metroApplicationDescription: UnityExcel 540 | wsaImages: {} 541 | metroTileShortName: 542 | metroCommandLineArgsFile: 543 | metroTileShowName: 0 544 | metroMediumTileShowName: 0 545 | metroLargeTileShowName: 0 546 | metroWideTileShowName: 0 547 | metroDefaultTileSize: 1 548 | metroTileForegroundText: 1 549 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 550 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 551 | metroSplashScreenUseBackgroundColor: 0 552 | platformCapabilities: {} 553 | metroFTAName: 554 | metroFTAFileTypes: [] 555 | metroProtocolName: 556 | metroCompilationOverrides: 1 557 | tizenProductDescription: 558 | tizenProductURL: 559 | tizenSigningProfileName: 560 | tizenGPSPermissions: 0 561 | tizenMicrophonePermissions: 0 562 | tizenDeploymentTarget: 563 | tizenDeploymentTargetType: -1 564 | tizenMinOSVersion: 1 565 | n3dsUseExtSaveData: 0 566 | n3dsCompressStaticMem: 1 567 | n3dsExtSaveDataNumber: 0x12345 568 | n3dsStackSize: 131072 569 | n3dsTargetPlatform: 2 570 | n3dsRegion: 7 571 | n3dsMediaSize: 0 572 | n3dsLogoStyle: 3 573 | n3dsTitle: GameName 574 | n3dsProductCode: 575 | n3dsApplicationId: 0xFF3FF 576 | stvDeviceAddress: 577 | stvProductDescription: 578 | stvProductAuthor: 579 | stvProductAuthorEmail: 580 | stvProductLink: 581 | stvProductCategory: 0 582 | XboxOneProductId: 583 | XboxOneUpdateKey: 584 | XboxOneSandboxId: 585 | XboxOneContentId: 586 | XboxOneTitleId: 587 | XboxOneSCId: 588 | XboxOneGameOsOverridePath: 589 | XboxOnePackagingOverridePath: 590 | XboxOneAppManifestOverridePath: 591 | XboxOnePackageEncryption: 0 592 | XboxOnePackageUpdateGranularity: 2 593 | XboxOneDescription: 594 | XboxOneLanguage: 595 | - enus 596 | XboxOneCapability: [] 597 | XboxOneGameRating: {} 598 | XboxOneIsContentPackage: 0 599 | XboxOneEnableGPUVariability: 0 600 | XboxOneSockets: {} 601 | XboxOneSplashScreen: {fileID: 0} 602 | XboxOneAllowedProductIds: [] 603 | XboxOnePersistentLocalStorageSize: 0 604 | xboxOneScriptCompiler: 0 605 | vrEditorSettings: 606 | daydream: 607 | daydreamIconForeground: {fileID: 0} 608 | daydreamIconBackground: {fileID: 0} 609 | cloudServicesEnabled: {} 610 | facebookSdkVersion: 7.9.4 611 | apiCompatibilityLevel: 2 612 | cloudProjectId: 613 | projectName: 614 | organizationId: 615 | cloudEnabled: 0 616 | enableNativePlatformBackendsForNewInputSystem: 0 617 | disableOldInputManagerSupport: 0 618 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.2.0f3 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | shadowNearPlaneOffset: 3 18 | shadowCascade2Split: 0.33333334 19 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 20 | blendWeights: 1 21 | textureQuality: 1 22 | anisotropicTextures: 0 23 | antiAliasing: 0 24 | softParticles: 0 25 | softVegetation: 0 26 | realtimeReflectionProbes: 0 27 | billboardsFaceCameraPosition: 0 28 | vSyncCount: 0 29 | lodBias: 0.3 30 | maximumLODLevel: 0 31 | particleRaycastBudget: 4 32 | asyncUploadTimeSlice: 2 33 | asyncUploadBufferSize: 4 34 | excludedTargetPlatforms: [] 35 | - serializedVersion: 2 36 | name: Fast 37 | pixelLightCount: 0 38 | shadows: 0 39 | shadowResolution: 0 40 | shadowProjection: 1 41 | shadowCascades: 1 42 | shadowDistance: 20 43 | shadowNearPlaneOffset: 3 44 | shadowCascade2Split: 0.33333334 45 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 46 | blendWeights: 2 47 | textureQuality: 0 48 | anisotropicTextures: 0 49 | antiAliasing: 0 50 | softParticles: 0 51 | softVegetation: 0 52 | realtimeReflectionProbes: 0 53 | billboardsFaceCameraPosition: 0 54 | vSyncCount: 0 55 | lodBias: 0.4 56 | maximumLODLevel: 0 57 | particleRaycastBudget: 16 58 | asyncUploadTimeSlice: 2 59 | asyncUploadBufferSize: 4 60 | excludedTargetPlatforms: [] 61 | - serializedVersion: 2 62 | name: Simple 63 | pixelLightCount: 1 64 | shadows: 1 65 | shadowResolution: 0 66 | shadowProjection: 1 67 | shadowCascades: 1 68 | shadowDistance: 20 69 | shadowNearPlaneOffset: 3 70 | shadowCascade2Split: 0.33333334 71 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 72 | blendWeights: 2 73 | textureQuality: 0 74 | anisotropicTextures: 1 75 | antiAliasing: 0 76 | softParticles: 0 77 | softVegetation: 0 78 | realtimeReflectionProbes: 0 79 | billboardsFaceCameraPosition: 0 80 | vSyncCount: 0 81 | lodBias: 0.7 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 64 84 | asyncUploadTimeSlice: 2 85 | asyncUploadBufferSize: 4 86 | excludedTargetPlatforms: [] 87 | - serializedVersion: 2 88 | name: Good 89 | pixelLightCount: 2 90 | shadows: 2 91 | shadowResolution: 1 92 | shadowProjection: 1 93 | shadowCascades: 2 94 | shadowDistance: 40 95 | shadowNearPlaneOffset: 3 96 | shadowCascade2Split: 0.33333334 97 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 98 | blendWeights: 2 99 | textureQuality: 0 100 | anisotropicTextures: 1 101 | antiAliasing: 0 102 | softParticles: 0 103 | softVegetation: 1 104 | realtimeReflectionProbes: 1 105 | billboardsFaceCameraPosition: 1 106 | vSyncCount: 1 107 | lodBias: 1 108 | maximumLODLevel: 0 109 | particleRaycastBudget: 256 110 | asyncUploadTimeSlice: 2 111 | asyncUploadBufferSize: 4 112 | excludedTargetPlatforms: [] 113 | - serializedVersion: 2 114 | name: Beautiful 115 | pixelLightCount: 3 116 | shadows: 2 117 | shadowResolution: 2 118 | shadowProjection: 1 119 | shadowCascades: 2 120 | shadowDistance: 70 121 | shadowNearPlaneOffset: 3 122 | shadowCascade2Split: 0.33333334 123 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 124 | blendWeights: 4 125 | textureQuality: 0 126 | anisotropicTextures: 2 127 | antiAliasing: 2 128 | softParticles: 1 129 | softVegetation: 1 130 | realtimeReflectionProbes: 1 131 | billboardsFaceCameraPosition: 1 132 | vSyncCount: 1 133 | lodBias: 1.5 134 | maximumLODLevel: 0 135 | particleRaycastBudget: 1024 136 | asyncUploadTimeSlice: 2 137 | asyncUploadBufferSize: 4 138 | excludedTargetPlatforms: [] 139 | - serializedVersion: 2 140 | name: Fantastic 141 | pixelLightCount: 4 142 | shadows: 2 143 | shadowResolution: 2 144 | shadowProjection: 1 145 | shadowCascades: 4 146 | shadowDistance: 150 147 | shadowNearPlaneOffset: 3 148 | shadowCascade2Split: 0.33333334 149 | shadowCascade4Split: {x: 0.06666667, y: 0.2, z: 0.46666667} 150 | blendWeights: 4 151 | textureQuality: 0 152 | anisotropicTextures: 2 153 | antiAliasing: 2 154 | softParticles: 1 155 | softVegetation: 1 156 | realtimeReflectionProbes: 1 157 | billboardsFaceCameraPosition: 1 158 | vSyncCount: 1 159 | lodBias: 2 160 | maximumLODLevel: 0 161 | particleRaycastBudget: 4096 162 | asyncUploadTimeSlice: 2 163 | asyncUploadBufferSize: 4 164 | excludedTargetPlatforms: [] 165 | m_PerPlatformDefaultQuality: 166 | Android: 2 167 | BlackBerry: 2 168 | FlashPlayer: 3 169 | GLES Emulation: 3 170 | PS3: 3 171 | PS4: 3 172 | PSM: 3 173 | PSP2: 3 174 | Samsung TV: 2 175 | Standalone: 3 176 | Tizen: 2 177 | WP8: 3 178 | Web: 3 179 | Windows Store Apps: 3 180 | XBOX360: 3 181 | XboxOne: 3 182 | iPhone: 2 183 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | serializedVersion: 2 6 | tags: [] 7 | layers: 8 | - Default 9 | - TransparentFX 10 | - Ignore Raycast 11 | - 12 | - Water 13 | - UI 14 | - 15 | - 16 | - 17 | - 18 | - 19 | - 20 | - 21 | - 22 | - 23 | - 24 | - 25 | - 26 | - 27 | - 28 | - 29 | - 30 | - 31 | - 32 | - 33 | - 34 | - 35 | - 36 | - 37 | - 38 | - 39 | - 40 | m_SortingLayers: 41 | - name: Default 42 | uniqueID: 0 43 | locked: 0 44 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: 0.02 7 | Maximum Allowed Timestep: 0.33333334 8 | m_TimeScale: 1 9 | Maximum Particle Timestep: 0.03 10 | -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!310 &1 4 | UnityConnectSettings: 5 | m_ObjectHideFlags: 0 6 | m_Enabled: 0 7 | m_TestMode: 0 8 | m_TestEventUrl: 9 | m_TestConfigUrl: 10 | CrashReportingSettings: 11 | m_EventUrl: https://perf-events.cloud.unity3d.com/api/events/crashes 12 | m_Enabled: 0 13 | m_CaptureEditorExceptions: 1 14 | UnityPurchasingSettings: 15 | m_Enabled: 0 16 | m_TestMode: 0 17 | UnityAnalyticsSettings: 18 | m_Enabled: 0 19 | m_InitializeOnStartup: 1 20 | m_TestMode: 0 21 | m_TestEventUrl: 22 | m_TestConfigUrl: 23 | UnityAdsSettings: 24 | m_Enabled: 0 25 | m_InitializeOnStartup: 1 26 | m_TestMode: 0 27 | m_EnabledPlatforms: 4294967295 28 | m_IosGameId: 29 | m_AndroidGameId: 30 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # UnityExcel 2 | 3 | 一个Unity内用的Excel转换工具,用于将xlsx内容转换为游戏内可用的bytes 4 | -------------------------------------------------------------------------------- /Tables/ExampleData.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunny352/UnityExcel/47d11a91f1ae7cdce5b7912a9016fff8054ad83b/Tables/ExampleData.xlsx -------------------------------------------------------------------------------- /UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | --------------------------------------------------------------------------------