/// <summary> /// 打包资源 /// </summary> public void BuildAsset() { RuntimePlatform platform = RuntimePlatform.Android; BuildTarget buildTarget = BuildTarget.Android; // if (isSelectWindows) // { // platform = RuntimePlatform.WindowsPlayer; // buildTarget = BuildTarget.StandaloneWindows; // } // else if (isSelectAndroid) { platform = RuntimePlatform.Android; buildTarget = BuildTarget.Android; } else if (isSelectIOS) { platform = RuntimePlatform.IPhonePlayer; buildTarget = BuildTarget.iOS; } AssetBundleEditorTools.GenAssetBundle(exportPath + "/" + BApplication.GetPlatformPath(platform), buildTarget, options); AssetDatabase.Refresh(); Debug.Log("资源打包完毕"); }
/// <summary> /// 打包资源 /// </summary> public void BuildAsset() { RuntimePlatform platform = RuntimePlatform.Android; BuildTarget buildTarget = BuildTarget.Android; if (isSelectAndroid) { platform = RuntimePlatform.Android; buildTarget = BuildTarget.Android; } else if (isSelectIOS) { platform = RuntimePlatform.IPhonePlayer; buildTarget = BuildTarget.iOS; } var outPath = exportPath + "/" + BApplication.GetPlatformPath(platform); var config = GameObject.Find("BDFrame").GetComponent <Config>(); //根据版本进入不同打包模式 if (config.Data.AssetBundleManagerVersion == AssetBundleManagerVersion.V1) { AssetBundleEditorTools.GenAssetBundle(outPath, buildTarget, options); } else if (config.Data.AssetBundleManagerVersion == AssetBundleManagerVersion.V2_experiment) { AssetBundleEditorToolsV2.GenAssetBundle(outPath, buildTarget, options, AES: AES); } AssetDatabase.Refresh(); Debug.Log("资源打包完毕"); }
/// <summary> /// 打包资源 /// </summary> public void BuildAsset() { if (isSelectAndroid) { AssetBundleEditorTools.GenAssetBundle(rootResourceDir, exportPath + "/" + BDUtils.GetPlatformPath(RuntimePlatform.Android), BuildTarget.Android, options); } if (isSelectIOS) { AssetBundleEditorTools.GenAssetBundle(rootResourceDir, exportPath + "/" + BDUtils.GetPlatformPath(RuntimePlatform.IPhonePlayer), BuildTarget.iOS, options); } AssetDatabase.Refresh(); Debug.Log("资源打包完毕"); }