/// <summary> /// 根据根文件夹生成的AssetBunlde的获取目录 /// </summary> /// <returns></returns> public static string FolderAssetBundleFetchPath() { string path = ""; ABWindow abWindow = EditorWindow.GetWindow(typeof(ABWindow)) as ABWindow; switch (abWindow.BuildPlatform) { case ABBuildPlatform.Win64: path = Application.dataPath + "/" + ABGlobal.abDir + "/Win64/Win64"; break; case ABBuildPlatform.Android: path = Application.dataPath + "/" + ABGlobal.abDir + "/Android/Android"; break; case ABBuildPlatform.IOS: path = Application.dataPath + "/" + ABGlobal.abDir + "/IOS/IOS"; break; default: break; } return(path); }
/// <summary> /// 获取AB打包平台 /// </summary> /// <returns></returns> public static BuildTarget GetBuildTarget() { ABWindow abWindow = EditorWindow.GetWindow(typeof(ABWindow)) as ABWindow; BuildTarget bt = BuildTarget.StandaloneWindows64; switch (abWindow.BuildPlatform) { case ABBuildPlatform.Win64: bt = BuildTarget.StandaloneWindows64; break; case ABBuildPlatform.Android: bt = BuildTarget.Android; break; case ABBuildPlatform.IOS: bt = BuildTarget.iOS; break; default: break; } return(bt); }