예제 #1
0
        private static bool CookXlsImpl(RName rn, string targetPath, bool copyRInfo, bool isandroid)
        {
            var dataSet = new EngineNS.Bricks.DataProvider.GDataSet();

            var resInfo = CMDEngine.CMDEngineInstance.mInfoManager.CreateResourceInfo("Xls") as ExcelViewEditor.ExcelResourceInfo;

            if (resInfo == null)
            {
                return(false);
            }
            resInfo.Load(rn.Address + ".rinfo");
            if (resInfo.MacrossName == null)
            {
                return(false);
            }
            Type objType = EngineNS.Macross.MacrossFactory.Instance.GetMacrossType(resInfo.MacrossName);
            bool result  = dataSet.LoadExcel(objType, rn);

            if (result)
            {
                dataSet.Save2Xnd(targetPath + ".dateset");

                if (isandroid)
                {
                    CMDEngine.CMDEngineInstance.AddAssetInfos(targetPath + ".dateset");
                }
            }
            if (copyRInfo)
            {
                CEngine.Instance.FileManager.CopyFile(rn.Address, targetPath, true);
            }
            return(true);
        }
예제 #2
0
        public override async Task <bool> AssetsOption_LoadResourceOverride(EditorCommon.Assets.AssetsPakage.LoadResourceData data)
        {
            await EngineNS.Thread.AsyncDummyClass.DummyFunc();

            var dataSet = new EngineNS.Bricks.DataProvider.GDataSet();

            dataSet.LoadDataSet(data.ObjType, data.RNameMapper.Name, false);
            data.RNameMapper.ResObject = dataSet;
            return(true);
        }