static void InitForAndroidBuild() { // 清空下载目录 DownloadList _instance = DownloadList.GetInstance(); if (_instance != null) { _instance.Clear(true); } BuildSettings.GetInstance(BuildSettings.AssetFileDir); // 清空Plugins/Android目录 ClearPluginsAndroid(); // 重置Plugins/Android ResetPluginsAndroid(); // 设置相关AndroidSDK相关设定 IAndroidSDKSettings androidSDK = GetCurAndroidSDKSetting(); if (androidSDK != null) { string gameName = BuildInfo.GetInstance().BuildName; string packageName = BuildInfo.GetInstance().BuildID; // 打包Android(apk文件)之前,提前应用设定 androidSDK.PreApplyAndroidBuild(gameName, packageName); } else { BuildLogger.LogWarning("Android SDK invalid!!"); } // 刷新 UtilsAsset.AssetsRefresh(); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(HuaweiSdkSettingsData iData, bool iForceClear = true) { if (null == iData) { return; } // 清空 if (iForceClear) { Clear(); } data.MinSdkVersion = iData.MinSdkVersion; data.MaxSdkVersion = iData.MaxSdkVersion; data.TargetSdkVersion = iData.TargetSdkVersion; data.appId = iData.appId; data.buoySecret = iData.buoySecret; data.payId = iData.payId; data.payPrivateRsa = iData.payPrivateRsa; data.payPublicRsa = iData.payPublicRsa; data.cpid = iData.cpid; data.loginPublicRsa = iData.loginPublicRsa; data.Orientation = iData.Orientation; data.Local = iData.Local; data.AutoSdkInit = iData.AutoSdkInit; data.AutoLogin = iData.AutoLogin; UtilsAsset.SetAssetDirty(this); }
public static void BuildForAndroid() { const string funcBlock = "AssetBundlesBuild:BuildForAndroid()"; Loger.BuildStart(funcBlock); // 开始打包Bundles UtilsAsset.StartBuildBundles(); BuildAssetBundle(BuildTarget.Android, true); // 生成刷新CND服务器用的Shell CreateShellOfRefreshCdn(); // 生成上传用的Shell if (UploadWay.Ftp == BundlesResult.GetInstance().UploadWay) { CreateUploadShellByFtp(); } else if (UploadWay.Curl == BundlesResult.GetInstance().UploadWay) { CreateUploadShellByCurl(); } // 导出打包结果文件 var exportDir = BuildParameters.OutputDir; BundlesResult.GetInstance().ExportToJsonFile(exportDir); // 开始打包Bundles UtilsAsset.EndBuildBundles(); Loger.BuildEnd(); }
/// <summary> /// 用用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空标志位.</param> protected override void ApplyData(GameStateConfData iData, bool iForceClear) { if (null == iData) { return; } // 清空 if (true == iForceClear) { this.Clear(); } this.Data.SleepTimeout = iData.SleepTimeout; this.Data.FPS = iData.FPS; this.Data.TimerInterval = iData.TimerInterval; this.Data.FirstGameState = iData.FirstGameState; this.Data.ExceptionGameState = iData.ExceptionGameState; this.Data.uiRootName = iData.uiRootName; this.Data.uiRootPath = iData.uiRootPath; this.Data.uiCameraName = iData.uiCameraName; this.Data.LuaFilePrefixs = iData.LuaFilePrefixs; this.Data.LuaFileSuffixs = iData.LuaFileSuffixs; this.Data.Managers.AddRange(iData.Managers); this.Data.States.AddRange(iData.States); UtilsAsset.SetAssetDirty(this); }
private static void BuildConfigAssets() { UtilsAsset.CreateAsset <BundlesConfig> (); UtilsAsset.CreateAsset <BundlesMap> (); UtilsAsset.CreateAsset <BundlesResult> (); AssetDatabase.Refresh(); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(UploadListData iData, bool iForceClear) { if (null == iData) { return; } // 清空 if (true == iForceClear) { this.Clear(); } this.Data.FileSuffix = iData.FileSuffix; this.Data.CheckMode = iData.CheckMode; this.Data.AppVersion = iData.AppVersion; this.Data.CenterVersion = iData.CenterVersion; this.Data.BuildTarget = iData.BuildTarget; this.Data.ManifestUpload = iData.ManifestUpload; this.Data.CompressFormat = iData.CompressFormat; // 添加资源信息 foreach (UploadItem loop in iData.Targets) { this.AddTarget(loop); } UtilsAsset.SetAssetDirty(this); }
static void TotalClear() { var bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.Clear(); } var map = BundlesMap.GetInstance(); if (map != null) { map.Clear(); } var info = BundlesResult.GetInstance(); if (info != null) { info.Clear(); } UtilsAsset.AssetsRefresh(); }
/// <summary> /// 应用导入数据数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空标志位.</param> protected override void ApplyImportData(TerrainEditorData iData, bool iForceClear) { if (null == iData) { return; } // 清空 if (iForceClear) { Clear(); } // 设定导入信息 ConfData.tileData.Preview.edgeColor = iData.tileData.Preview.edgeColor; ConfData.tileData.Preview.vertexColor = iData.tileData.Preview.vertexColor; ConfData.tileData.Preview.Scale = iData.tileData.Preview.Scale; // Chunk信息 ConfData.chunkData.SlicingCount = iData.chunkData.SlicingCount; ConfData.chunkData.Preview.edgeColor = iData.chunkData.Preview.edgeColor; ConfData.chunkData.Preview.vertexColor = iData.chunkData.Preview.vertexColor; ConfData.chunkData.Preview.Scale = iData.chunkData.Preview.Scale; ConfData.chunkData.StaticOnly = iData.chunkData.StaticOnly; UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(TiangeSDKData iData, bool iForceClear) { if (null == iData) { return; } // 清空 if (true == iForceClear) { this.Clear(); } this.Data.Default.MinSdkVersion = iData.Default.MinSdkVersion; this.Data.Default.MaxSdkVersion = iData.Default.MaxSdkVersion; this.Data.Default.TargetSdkVersion = iData.Default.TargetSdkVersion; this.Data.Default.Orientation = iData.Default.Orientation; this.Data.Default.Local = iData.Default.Local; this.Data.Default.AutoSDKInit = iData.Default.AutoSDKInit; this.Data.Default.AutoLogin = iData.Default.AutoLogin; this.Data.Options.OptionsSettings = iData.Options.OptionsSettings; this.Data.Options.OneSDK.ZyClassName = iData.Options.OneSDK.ZyClassName; this.Data.Options.OneSDK.MetaDatas.AddRange(iData.Options.OneSDK.MetaDatas); UtilsAsset.SetAssetDirty(this); }
public static void BuildForIos() { const string funcBlock = "AssetBundlesBuild:BuildForIos()"; Loger.BuildStart(funcBlock); // 开始打包Bundles UtilsAsset.StartBuildBundles(); BuildAssetBundle(BuildTarget.iOS, true); // 生成刷新CND服务器用的Shell CreateShellOfRefreshCdn(); // 生成上传用的Shell if (UploadWay.Ftp == BundlesResult.GetInstance().UploadWay) { CreateUploadShellByFtp(); } else if (UploadWay.Curl == BundlesResult.GetInstance().UploadWay) { CreateUploadShellByCurl(); } // 开始打包Bundles UtilsAsset.EndBuildBundles(); Loger.BuildEnd(); }
static void TotalClear() { BundlesConfig bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.Clear(); } BundlesMap map = BundlesMap.GetInstance(); if (map != null) { map.Clear(); } UploadList info = UploadList.GetInstance(); if (info != null) { info.Clear(); } UtilsAsset.AssetsRefresh(); }
/// <summary> /// 设定宏. /// </summary> /// <param name="iDefines">宏.</param> /// <param name="iTargetGroup">目标组.</param> private static void SetDefines(string[] iDefines, BuildTargetGroup iTargetGroup) { if ((null == iDefines) || (0 >= iDefines.Length)) { return; } bool fileExistFlg = false; DefinesData _definesData = UtilsAsset.ImportDataByDir <DefinesData> ( out fileExistFlg, DefinesWindow._jsonFileDir); if (null == _definesData) { return; } // 追加 _definesData.AddDefines(iDefines, (BuildTargetGroup.Android == iTargetGroup), (BuildTargetGroup.iOS == iTargetGroup)); // 重新导出 UtilsAsset.ExportData <DefinesData>(_definesData, DefinesWindow._jsonFileDir); // 应用设定信息 _definesData.Apply(); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(TiangeSdkData iData, bool iForceClear = true) { if (null == iData) { return; } // 清空 if (iForceClear) { Clear(); } data.General.MinSdkVersion = iData.General.MinSdkVersion; data.General.MaxSdkVersion = iData.General.MaxSdkVersion; data.General.TargetSdkVersion = iData.General.TargetSdkVersion; data.General.Orientation = iData.General.Orientation; data.General.Local = iData.General.Local; data.General.AutoSdkInit = iData.General.AutoSdkInit; data.General.AutoLogin = iData.General.AutoLogin; data.Options.data = iData.Options.data; data.Options.OneSDK.zyClassName = iData.Options.OneSDK.zyClassName; data.Options.OneSDK.metaDatas.AddRange(iData.Options.OneSDK.metaDatas); UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 清空. /// </summary> /// <param name="iIsFileDelete">删除数据文件标志位.</param> /// <param name="iDirPath">Asset存放目录文件(不指定:当前选定对象所在目录).</param> public override void Clear(bool iIsFileDelete = false, string iDirPath = null) { base.Clear(iIsFileDelete, iDirPath); // 清空列表 UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(BundlesResultData iData, bool iForceClear = true) { if (null == iData) { return; } // 清空 if (iForceClear) { Clear(); } data.buildName = iData.buildName; data.fileSuffix = iData.fileSuffix; data.checkMode = iData.checkMode; data.appVersion = iData.appVersion; data.buildTarget = iData.buildTarget; data.manifestUpload = iData.manifestUpload; data.compressFormat = iData.compressFormat; // 添加资源信息 foreach (var loop in iData.targets) { AddTarget(loop); } UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 应用数据. /// </summary> /// <param name="iData">数据.</param> /// <param name="iForceClear">强制清空.</param> protected override void ApplyData(HuaweiSDKSettingsData iData, bool iForceClear) { if (null == iData) { return; } // 清空 if (true == iForceClear) { this.Clear(); } this.Data.MinSdkVersion = iData.MinSdkVersion; this.Data.MaxSdkVersion = iData.MaxSdkVersion; this.Data.TargetSdkVersion = iData.TargetSdkVersion; this.Data.AppID = iData.AppID; this.Data.BuoySecret = iData.BuoySecret; this.Data.PayID = iData.PayID; this.Data.PayPrivateRsa = iData.PayPrivateRsa; this.Data.PayPublicRsa = iData.PayPublicRsa; this.Data.CPID = iData.CPID; this.Data.LoginPublicRsa = iData.LoginPublicRsa; this.Data.Orientation = iData.Orientation; this.Data.Local = iData.Local; this.Data.AutoSDKInit = iData.AutoSDKInit; this.Data.AutoLogin = iData.AutoLogin; UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 清空非资源列表. /// </summary> public void ClearUnResources() { if (UnResources == null) { return; } UnResources.Clear(); UtilsAsset.SetAssetDirty(this); }
/// <summary> /// 重置(XCode). /// </summary> public void XCodeReset() { foreach (XCodeSettings loop in XCodeSeetings) { loop.Reset(); } // 清空列表 UtilsAsset.SetAssetDirty(this); }
static void Clear() { GameStateConf _info = GameStateConf.GetInstance(); if (null != _info) { _info.Clear(); } UtilsAsset.AssetsRefresh(); }
static void MClear() { var info = TerrainsSettings.GetInstance(); if (null != info) { info.Clear(); } UtilsAsset.AssetsRefresh(); }
static void ClearAllUnResources() { BundlesConfig bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.ClearUnResources(); } UtilsAsset.AssetsRefresh(); }
static void Clear() { ServersConf conf = ServersConf.GetInstance(); if (conf != null) { conf.Clear(); } UtilsAsset.AssetsRefresh(); }
static void Export() { BundlesConfig bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.ExportToJsonFile(); } UtilsAsset.AssetsRefresh(); }
static void ClearBundlesMap() { var map = BundlesMap.GetInstance(); if (map != null) { map.Clear(); } UtilsAsset.AssetsRefresh(); }
static void ExportToMapJsonFile() { var map = BundlesMap.GetInstance(); if (map != null) { map.ExportToJsonFile(); } UtilsAsset.AssetsRefresh(); }
static void Export() { ServersConf conf = ServersConf.GetInstance(); if (conf != null) { conf.ExportToJsonFile(); } UtilsAsset.AssetsRefresh(); }
static void Import() { var bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.ImportFromJsonFile(); } UtilsAsset.AssetsRefresh(); }
static void Clear() { var bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.Clear(); } UtilsAsset.AssetsRefresh(); }
/// <summary> /// 取得上传列表文件的下载URL. /// </summary> /// <returns>BundlesInfo的下载URL.</returns> public string GetDownloadUrlOfUploadList() { DownloadServerInfo serverInfo = ServersConf.GetInstance().GetDownloadServerInfo(); string downloadBaseUrl = ServersConf.GetDownloadBaseURL(serverInfo); string JsonFileFullPath = UtilsAsset.GetJsonFilePath <UploadListData>(); int lastIndex = JsonFileFullPath.LastIndexOf("/"); string JsonFileName = JsonFileFullPath.Substring(lastIndex + 1); return(string.Format("{0}/{1}", downloadBaseUrl, JsonFileName)); }
static void RemoveSource() { var curPath = GetCurDir(); var bcConfig = BundlesConfig.GetInstance(); if (bcConfig != null) { bcConfig.RemoveResource(curPath); } UtilsAsset.AssetsRefresh(); }