コード例 #1
0
        public static List <ExcelData.Param> LoadExcelData(
            string assetBunndlePath,
            string assetName,
            int cellS,
            int rowS)
        {
            if (!AssetBundleCheck.IsFile(assetBunndlePath, assetName))
            {
                OutputLog.Error(string.Format("ExcelData:{0}がない", (object)assetName), false, "Log");
                return((List <ExcelData.Param>)null);
            }
            AssetBundleLoadAssetOperation loadAssetOperation = AssetBundleManager.LoadAsset(assetBunndlePath, assetName, typeof(ExcelData), (string)null);

            AssetBundleManager.UnloadAssetBundle(assetBunndlePath, true, (string)null, false);
            if (loadAssetOperation.IsEmpty())
            {
                OutputLog.Error(string.Format("ExcelData:{0}がない?", (object)assetName), false, "Log");
                return((List <ExcelData.Param>)null);
            }
            ExcelData asset = loadAssetOperation.GetAsset <ExcelData>();
            int       cell  = asset.MaxCell - 1;
            int       row   = asset.list[cell].list.Count - 1;

            return(asset.Get(new ExcelData.Specify(cellS, rowS), new ExcelData.Specify(cell, row)));
        }
コード例 #2
0
        protected IEnumerable <ExcelData.Param> GetExcelEntries(ExcelData asset, string assetName)
        {
            if (!assetName.StartsWith("cus_"))
            {
                return(asset.list);
            }

            var maxCell = asset.MaxCell - 1;

            return(asset.Get(new ExcelData.Specify(0, 0),
                             new ExcelData.Specify(maxCell, asset.list[maxCell].list.Count - 1)));
        }