【IOS】修改iOS包的AB包目录结构
parent
ab339f2b37
commit
683a13bf2a
|
@ -552,6 +552,9 @@ namespace GameEditor.AssetBundle
|
|||
|
||||
string assetBundleName = path.Replace(GameLogic.AppConst.GameResName + "/",string.Empty);
|
||||
assetBundleName = compressType.ToString() + "/" + assetBundleName;
|
||||
#if PLATFORM_IOS
|
||||
assetBundleName = assetBundleName.Replace("/", "_");
|
||||
#endif
|
||||
//Debug.LogError("path:" + path + " => abname:" + assetBundleName);
|
||||
return assetBundleName;
|
||||
}
|
||||
|
|
|
@ -125,8 +125,15 @@ namespace GameEditor.FrameTool {
|
|||
{
|
||||
string exportPath = AssetBundle.AssetBundleConfig.GetExportPath(EditorUserBuildSettings.activeBuildTarget);
|
||||
string targetPath = FrameTool.GetStreamingAssetPath(EditorUserBuildSettings.activeBuildTarget);
|
||||
|
||||
#if PLATFORM_IOS
|
||||
File.Copy(exportPath + "/lzma_luabytes.unity3d", targetPath + "/lzma_luabytes.unity3d", true);
|
||||
File.Copy(exportPath + "/lzma_resconfigs.unity3d", targetPath + "/lzma_resconfigs.unity3d", true);
|
||||
#else
|
||||
File.Copy(exportPath + "/lzma/luabytes.unity3d", targetPath + "/lzma/luabytes.unity3d", true);
|
||||
File.Copy(exportPath + "/lzma/resconfigs.unity3d", targetPath + "/lzma/resconfigs.unity3d", true);
|
||||
#endif
|
||||
|
||||
File.Copy(exportPath + "/files.unity3d", targetPath + "/files.unity3d", true);
|
||||
//SaveVersionFile();
|
||||
}
|
||||
|
|
|
@ -52,10 +52,16 @@ public class GameStart : MonoBehaviour
|
|||
bool isShowSplash = true;
|
||||
if (isShowSplash)
|
||||
{
|
||||
string path = AppConst.PersistentDataPath + "lz4/splashpanel.unity3d";
|
||||
#if PLATFORM_IOS
|
||||
string splashFilePath = "lz4_splashpanel.unity3d";
|
||||
#else
|
||||
string splashFilePath = "lz4/splashpanel.unity3d";
|
||||
#endif
|
||||
|
||||
string path = AppConst.PersistentDataPath + splashFilePath;
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
path = AppConst.StreamPath + "lz4/splashpanel.unity3d";
|
||||
path = AppConst.StreamPath + splashFilePath;
|
||||
}
|
||||
bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength);
|
||||
GameObject gameObj = bundle.LoadAsset<GameObject>("SplashPanel");
|
||||
|
|
|
@ -114,10 +114,16 @@ namespace GameLogic {
|
|||
void CreateUpdatePanel() {
|
||||
if (AppConst.bundleMode)
|
||||
{
|
||||
string path = AppConst.PersistentDataPath + "lz4/updatepanel.unity3d";
|
||||
#if PLATFORM_IOS
|
||||
string updateFilePath = "lz4_updatepanel.unity3d";
|
||||
#else
|
||||
string updateFilePath = "lz4/updatepanel.unity3d";
|
||||
#endif
|
||||
|
||||
string path = AppConst.PersistentDataPath + updateFilePath;
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
path = AppConst.StreamPath + "lz4/updatepanel.unity3d";
|
||||
path = AppConst.StreamPath + updateFilePath;
|
||||
}
|
||||
bundle = AssetBundle.LoadFromFile(path, 0, GameLogic.AppConst.EncyptBytesLength);
|
||||
if (bundle == null)
|
||||
|
|
Loading…
Reference in New Issue