TippingGame / F8ExcelTool

Unity读取Excel工具,点击F8自动生成C#索引字段,能读取Excel导出的二进制文件,运行时读取Excel文件,支持Win/Android/iOS/Mac/Linux
MIT License
5 stars 1 forks source link

NullReferenceException error from F8Framework.F8ExcelTool.Editor.ExcelDataTool.GetExcelData #3

Open uiosun opened 10 months ago

uiosun commented 10 months ago

发生了什么:当我使用这样的异常 Excel 进行导入时,出现了报错并且 Unity Editor 的导入窗口,进入 Hold on 持续挂起状态。

期望:挂起状态应当结束。

NullReferenceException: Object reference not set to an instance of an object
F8Framework.F8ExcelTool.Editor.ExcelDataTool.GetExcelData (System.String inputPath) (at ./Library/PackageCache/com.tippinggame.f8exceltool@d4a8f7e597/Editor/ExcelConfig/ExcelDataTool.cs:219)
F8Framework.F8ExcelTool.Editor.ExcelDataTool.LoadAllExcelData () (at ./Library/PackageCache/com.tippinggame.f8exceltool@d4a8f7e597/Editor/ExcelConfig/ExcelDataTool.cs:84)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler()

config_error_idle.xlsx

image

TippingGame commented 10 months ago

增加了错误判断,报错定位到表格->行数> if (types == null || names == null || datas == null){ ProgressBar.HideBarWithFailInfo("\n数据错误!["+ className +"]配置表!第" + index + "行\n" + inputPath); throw new Exception("数据错误!["+ className +"]配置表!第" + index + "行" + inputPath); }