bug
This commit is contained in:
parent
c3080c7e0f
commit
caf461888b
|
@ -1,7 +1,9 @@
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
#if UNITY_EDITOR
|
||||||
using Excel;
|
using Excel;
|
||||||
|
#endif
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class ExcelParser
|
public class ExcelParser
|
||||||
|
@ -59,6 +61,7 @@ public class ExcelParser
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
static DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum)
|
static DataRowCollection ReadExcelContext(string pFilePath, ref int pColNum, ref int pRowNum)
|
||||||
{
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
FileStream stream = File.Open(pFilePath, FileMode.Open, FileAccess.Read, FileShare.Read);
|
||||||
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
|
IExcelDataReader excelReader = ExcelReaderFactory.CreateBinaryReader(stream);
|
||||||
|
|
||||||
|
@ -67,5 +70,8 @@ public class ExcelParser
|
||||||
pColNum = result.Tables[0].Columns.Count;
|
pColNum = result.Tables[0].Columns.Count;
|
||||||
pRowNum = result.Tables[0].Rows.Count;
|
pRowNum = result.Tables[0].Rows.Count;
|
||||||
return result.Tables[0].Rows;
|
return result.Tables[0].Rows;
|
||||||
|
#else
|
||||||
|
return null;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -70,7 +70,11 @@ public static class AdsUtils
|
||||||
{
|
{
|
||||||
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
|
TKGSDKManager.Instance.ShowRewardAd(pAdPos, (pResult) =>
|
||||||
{
|
{
|
||||||
pSuccessCallback?.Invoke();
|
if (pResult)
|
||||||
|
{
|
||||||
|
pSuccessCallback?.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
}, noUnityTips, true);
|
}, noUnityTips, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue