Https和Wss支持;
Lua加载时间优化;
This commit is contained in:
parent
28d664bf6a
commit
bd4cff9a90
@ -17,31 +17,6 @@ MonoBehaviour:
|
||||
m_SerializedData: []
|
||||
m_GUID: e9d0de0b0bb21ef4b8a5aa0765a892fb
|
||||
m_SerializeEntries:
|
||||
- m_GUID: edcec141de73d3640aceea019f3ee618
|
||||
m_Address: Assets/Scenes/Scene_ailiude
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d71485704cc32304da9aa77b2a5b1ac2
|
||||
m_Address: Assets/Scenes/Scene_bujiezhiquan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c525167c8c88ddf419f8518d49acafe8
|
||||
m_Address: Assets/Scenes/Scene_challengehall
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d5725e83bd40e954b95058a0074ee6d9
|
||||
m_Address: Assets/Scenes/Scene_chenhuipendi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d68fde38e214e6b419fd96888c793e5c
|
||||
m_Address: Assets/Scenes/Scene_climbingTower
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 427886b1fa7e7e348b8ef5c845affe43
|
||||
m_Address: Assets/Scenes/Scene_common
|
||||
m_ReadOnly: 0
|
||||
@ -52,271 +27,16 @@ MonoBehaviour:
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: aef9ddd8d0f85a04fa9ed50a0356bdcf
|
||||
m_Address: Assets/Scenes/Scene_deleikehaixia
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8c7c141d494ded94db4938410bc5de5d
|
||||
m_Address: Assets/Scenes/Scene_dixiakuangdao
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0700fb874fa0f8545922cdf1c4098365
|
||||
m_Address: Assets/Scenes/Scene_duate
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ee7807f6732bd8e489635b6082fc1a5d
|
||||
m_Address: Assets/Scenes/Scene_feiyangmigong
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 3f7a8e5a6d74a1c41bc6af4713fe8e55
|
||||
m_Address: Assets/Scenes/Scene_feiyangshulin
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 964491dbd73dc8745accc3d8677d3d53
|
||||
m_Address: Assets/Scenes/Scene_fengxiangshangu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ef583a02774e1484eb2cea763f6ae8a8
|
||||
m_Address: Assets/Scenes/Scene_fuguangta
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ca61235528942ed429c87bccb6eac191
|
||||
m_Address: Assets/Scenes/Scene_genipa
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ed51961ae0c61f943bff4385285df3b7
|
||||
m_Address: Assets/Scenes/Scene_genitahaide
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f0721613e00d5e443be16ff2c6643cc0
|
||||
m_Address: Assets/Scenes/Scene_guchengqishituan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b901ca8ba8d0f154d863e960de4943f3
|
||||
m_Address: Assets/Scenes/Scene_GuildBoss
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f2e517fbcd32e7247b89910d25aeb5cb
|
||||
m_Address: Assets/Scenes/Scene_gushan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c0637584f6b000542a9f184fea5c8c3f
|
||||
m_Address: Assets/Scenes/Scene_hailazhimen
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2d4c4cb8e31211a409ea57f87f670edc
|
||||
m_Address: Assets/Scenes/Scene_huayingchaoxue
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f4a617f35ec744c44bf403f83b33090d
|
||||
m_Address: Assets/Scenes/Scene_huihunzao
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 27e1099f876acca4cb6506416248c640
|
||||
m_Address: Assets/Scenes/Scene_huoshengdong
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 4553bc011af85194ea081f34651f1671
|
||||
m_Address: Assets/Scenes/Scene_huoyanzhaoze
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 9e126a491536f9e419195b25f9b28762
|
||||
m_Address: Assets/Scenes/Scene_jiandao
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d444b47936f1f3547bf7f06c8f9ec648
|
||||
m_Address: Assets/Scenes/Scene_jianshilindi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 2984372d446ee0946ae401a246980d9a
|
||||
m_Address: Assets/Scenes/Scene_jiaotupingyuan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: f12a2c10aabbdf849803567a13ad5873
|
||||
m_Address: Assets/Scenes/Scene_jifendixia
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 36796377883680e45b9c52d956f0f355
|
||||
m_Address: Assets/Scenes/Scene_jinzita
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: ed0b275887ee8e04ab0fd61fb57c0bfb
|
||||
m_Address: Assets/Scenes/Scene_jujinkuangdong
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 84bedb1f5d0d1e0449258b42beeeddaa
|
||||
m_Address: Assets/Scenes/Scene_kaisadumu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 58983cec284c84c42877796dbca803e9
|
||||
m_Address: Assets/Scenes/Scene_laidisiqiuling
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a7175910fd3ca0a47b5644301090b023
|
||||
m_Address: Assets/Scenes/Scene_leimingxiawan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 0b9a08ce927407b45b180699484ba25c
|
||||
m_Address: Assets/Scenes/Scene_lueyinggu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c86b7f0e1d8d2ba4994136e6481d76b8
|
||||
m_Address: Assets/Scenes/Scene_maze
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: c72e52ae3f851eb4992af36fc309228e
|
||||
m_Address: Assets/Scenes/Scene_miwushanmai
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: db42b1f62f55a3448b746324d39b2c7b
|
||||
m_Address: Assets/Scenes/Scene_miwushenlin
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: adbd3f3043cbeed4e9c088d1e05d41c4
|
||||
m_Address: Assets/Scenes/Scene_miyinhegu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: fdd6289915b90bc43bf481a09a65b52e
|
||||
m_Address: Assets/Scenes/Scene_Newbie
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 9e7a2eb0d13feb94687b26ff93da3536
|
||||
m_Address: Assets/Scenes/Scene_nibolonggen
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 79c1c298720a578409a908e0e80fe837
|
||||
m_Address: Assets/Scenes/Scene_prontera_sd
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 455cd09c0346221419dff19b8d8085cc
|
||||
m_Address: Assets/Scenes/Scene_shamozhidu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 73de653a1e0ea3e4d9e045d2b8f41940
|
||||
m_Address: Assets/Scenes/Scene_shendian
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b315093b4230594438c30556b4742efc
|
||||
m_Address: Assets/Scenes/Scene_shourencunluo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 914c4e54072f0b34a8dd685cc69ede83
|
||||
m_Address: Assets/Scenes/Scene_shuanghuoweimu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8d84fd45244b32043baf394aac45cbbf
|
||||
m_Address: Assets/Scenes/Scene_siludemodan
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 5192221ea1fcb174b933a7fb6b19c696
|
||||
m_Address: Assets/Scenes/Scene_sukelateshamo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 25ca60bbe374ba34ea3c72a3a7ab1d0d
|
||||
m_Address: Assets/Scenes/Scene_testpvp
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: a933c8d695d0001469c2ffba73826f12
|
||||
m_Address: Assets/Scenes/Scene_wamugaodi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: befabdef79acca046ad6af1ddc27c4dd
|
||||
m_Address: Assets/Scenes/Scene_wenbala
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 19a462a74a1e3cb41b1b32c77d7987f5
|
||||
m_Address: Assets/Scenes/Scene_WorldBoss
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: da85f85fb2f56f34fbd6c964eed6a103
|
||||
m_Address: Assets/Scenes/Scene_xiendaer
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: d5233fb45711d2440adab1cd60fb09ec
|
||||
m_Address: Assets/Scenes/Scene_xinghuoyingdi
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 6f7fb4f1d421898458103965a2a2db23
|
||||
m_Address: Assets/Scenes/Scene_xuyingxiagu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 14bf5fa140de82c4d8de250ad50caa0a
|
||||
m_Address: Assets/Scenes/Scene_yanjiusuo
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: b9aee03268cbfa246b196de6907dd92b
|
||||
m_Address: Assets/Scenes/Scene_yanxironglu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 8170ade80dcfc3a47bb162439431cd3b
|
||||
m_Address: Assets/Scenes/Scene_yongguang
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 1f4776319c365a0469b300e4937be796
|
||||
m_Address: Assets/Scenes/Scene_zhanlinlu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 933120ff0ddfae247a5b5e630129b443
|
||||
m_Address: Assets/Scenes/Scene_zhuhai
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
- m_GUID: 123b05c1a62bb7d4cb39d45d309e36d3
|
||||
m_Address: Assets/Scenes/Scene_zuigu
|
||||
m_ReadOnly: 0
|
||||
m_SerializedLabels: []
|
||||
FlaggedDuringContentUpdateRestriction: 0
|
||||
m_ReadOnly: 0
|
||||
m_Settings: {fileID: 11400000, guid: 8b54c61ef06dca34e89fcf16d0b8c4b3, type: 2}
|
||||
m_SchemaSet:
|
||||
|
||||
Binary file not shown.
@ -1,9 +1,14 @@
|
||||
local PlatformPack = {
|
||||
URL_KEY = 'https://roh5.utogame.com/',
|
||||
-- URL_KEY = 'https://jianjia-cangcang.tech/',
|
||||
-- SERVERLIST_URL = 'https://jianjia-cangcang.tech/serverlist',
|
||||
-- NOTIFY_URL = 'https://jianjia-cangcang.tech/notice',
|
||||
-- SPECIAL_INFO_URL = 'https://jianjia-cangcang.tech/channel',
|
||||
-- CUSTOMER_SERVICE_INFO_URL = 'https://jianjia-cangcang.tech/vipService',
|
||||
URL_KEY = 'http://112.124.14.60/',
|
||||
SERVERLIST_URL = 'http://112.124.14.60:6410/serverlist',
|
||||
NOTIFY_URL = 'https://test-noticegmt-wt.wtgames.cn/v3/notice',
|
||||
SPECIAL_INFO_URL = 'https://test-noticegmt-wt.wtgames.cn/channel',
|
||||
CUSTOMER_SERVICE_INFO_URL = 'https://test-noticegmt-wt.wtgames.cn/vipService',
|
||||
NOTIFY_URL = 'https://jianjia-cangcang.tech/notice',
|
||||
SPECIAL_INFO_URL = 'https://jianjia-cangcang.tech/channel',
|
||||
CUSTOMER_SERVICE_INFO_URL = 'https://jianjia-cangcang.tech/vipService',
|
||||
}
|
||||
|
||||
return PlatformPack
|
||||
@ -456,6 +456,7 @@ function LoginMgr:StartCheckServer(isAgain)
|
||||
|
||||
self.preLoginStatus = self.loginStatus
|
||||
self.loginStatus = LoginStatus.CheckServer
|
||||
LogError("[StartCheckServer] request: "..url)
|
||||
self.checkWWW = UnityEngine.WWW(url)
|
||||
end
|
||||
|
||||
@ -503,7 +504,7 @@ function LoginMgr:CheckServerSuccess()
|
||||
self:CheckServerFail()
|
||||
return
|
||||
end
|
||||
|
||||
LogError("[StartCheckServer] response: "..self.checkWWW.text)
|
||||
local ok, result = RO_XPCALL(JSON.decode, debug.traceback, JSON, self.checkWWW.text)
|
||||
if ok then
|
||||
self:SetServerInfo(result)
|
||||
|
||||
@ -111,7 +111,8 @@ function LuaGameMgr:ClearServerData()
|
||||
end
|
||||
|
||||
function LuaGameMgr:ComposeCommonServerInfo(url)
|
||||
local openId = self.openId
|
||||
local openId = "ro-100000"
|
||||
--local openId = self.openId
|
||||
if openId and openId ~= '' then
|
||||
url = url .. '&openid=' .. tostring(openId)
|
||||
end
|
||||
|
||||
@ -150,7 +150,7 @@ public class SocketConn
|
||||
{
|
||||
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
m_address = string.Format("ws://{0}:{1}", host, port);
|
||||
m_address = string.Format("wss://{0}:{1}", host, 4430);
|
||||
Debug.LogWarning("Begin connect to Socket Address :" + m_address);
|
||||
m_iSocket = new WebSocket(m_address);
|
||||
m_iSocket.OnOpen += Socket_OnOpen;
|
||||
|
||||
@ -13,7 +13,7 @@ public class LuaMgr : SingletonMono<LuaMgr>
|
||||
private Dictionary<string, byte[]> LuaDic = new Dictionary<string, byte[]>();
|
||||
private Dictionary<string, byte[]> luaPbDic = new Dictionary<string, byte[]>();
|
||||
private int LoadCount = 0;
|
||||
private int LuaDirCount = 3;
|
||||
private int LuaDirCount = 2;
|
||||
public LuaState luaState = null;
|
||||
protected LuaLooper loop = null;
|
||||
protected LuaTable luaMainTable = null;
|
||||
@ -22,6 +22,7 @@ public class LuaMgr : SingletonMono<LuaMgr>
|
||||
string LuaMainPath = "Lua/Core";
|
||||
bool bDisposed = false;
|
||||
string luaRootPath = string.Empty;
|
||||
private ICSharpCode.SharpZipLib.Zip.ZipFile _luaLogicZip;
|
||||
|
||||
public override void InitMgr()
|
||||
{
|
||||
@ -54,7 +55,8 @@ public class LuaMgr : SingletonMono<LuaMgr>
|
||||
var tolua_zip_data = await AssetsMgr.Instance.LoadLocalFileData(Application.streamingAssetsPath + "/" + Constants.LuaDirMergeFile);
|
||||
UnzipLuaFiles(tolua_zip_data);
|
||||
var lua_zip_data = await AssetsMgr.Instance.LoadLocalFileData(Application.streamingAssetsPath + "/" + Constants.LuaLogicDirMergeFile);
|
||||
UnzipLuaFiles(lua_zip_data);
|
||||
//UnzipLuaFiles(lua_zip_data);
|
||||
_luaLogicZip = CommonUtil.GetZipFile(lua_zip_data);
|
||||
var pb_zip_data = await AssetsMgr.Instance.LoadLocalFileData(Application.streamingAssetsPath + "/" + Constants.LuaPbDirMergeFile);
|
||||
UnzipPbFiles(pb_zip_data);
|
||||
}
|
||||
@ -282,8 +284,11 @@ public class LuaMgr : SingletonMono<LuaMgr>
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugHelper.LogError("Not Found LuaTextAssetName: {0}", name);
|
||||
return null;
|
||||
Debug.Log($"[GetLuaTextAsset] {name}");
|
||||
var luaBytes = CommonUtil.GetFileFromeZip(_luaLogicZip, name);
|
||||
// LuaDic[name] = luaBytes;
|
||||
// DebugHelper.LogError("Not Found LuaTextAssetName: {0}", name);
|
||||
return luaBytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -792,8 +792,14 @@ namespace ICSharpCode.SharpZipLib.Zip
|
||||
throw new ObjectDisposedException("ZipFile");
|
||||
}
|
||||
|
||||
int index = FindEntry(name, true);
|
||||
return (index >= 0) ? (ZipEntry)entries_[index].Clone() : null;
|
||||
if (entryDict.ContainsKey(name))
|
||||
{
|
||||
return entryDict[name];
|
||||
}
|
||||
|
||||
return null;
|
||||
// int index = FindEntry(name, true);
|
||||
// return (index >= 0) ? (ZipEntry)entries_[index].Clone() : null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -3583,6 +3589,7 @@ namespace ICSharpCode.SharpZipLib.Zip
|
||||
}
|
||||
|
||||
entries_[i] = entry;
|
||||
entryDict[name] = entry;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3727,6 +3734,7 @@ namespace ICSharpCode.SharpZipLib.Zip
|
||||
private bool isStreamOwner;
|
||||
private long offsetOfFirstEntry;
|
||||
private ZipEntry[] entries_;
|
||||
private Dictionary<string, ZipEntry> entryDict = new Dictionary<string, ZipEntry>();
|
||||
private byte[] key;
|
||||
private bool isNewArchive_;
|
||||
|
||||
|
||||
@ -346,7 +346,47 @@ public static class CommonUtil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static byte[] GetFileFrameZipFile(byte[] zipBytes, string fileName, bool usePassword = false)
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream(zipBytes))
|
||||
{
|
||||
using (ICSharpCode.SharpZipLib.Zip.ZipFile zipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile(ms))
|
||||
{
|
||||
if (usePassword) zipFile.Password = Constants.ZipPW;
|
||||
var entry = zipFile.GetEntry(fileName);
|
||||
using (Stream zipStream = zipFile.GetInputStream(entry))
|
||||
{
|
||||
byte[] fileBytes = new byte[entry.Size];
|
||||
zipStream.Read(fileBytes, 0, fileBytes.Length);
|
||||
return fileBytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static ICSharpCode.SharpZipLib.Zip.ZipFile GetZipFile(byte[] zipBytes, bool usePassword = false)
|
||||
{
|
||||
MemoryStream ms = new MemoryStream(zipBytes);
|
||||
ICSharpCode.SharpZipLib.Zip.ZipFile zipFile = new ICSharpCode.SharpZipLib.Zip.ZipFile(ms);
|
||||
if (usePassword) zipFile.Password = Constants.ZipPW;
|
||||
return zipFile;
|
||||
}
|
||||
|
||||
public static byte[] GetFileFromeZip(ICSharpCode.SharpZipLib.Zip.ZipFile zipFile, string fileName)
|
||||
{
|
||||
var entry = zipFile.GetEntry(fileName);
|
||||
if (entry == null) return null;
|
||||
using (Stream zipStream = zipFile.GetInputStream(entry))
|
||||
{
|
||||
byte[] fileBytes = new byte[entry.Size];
|
||||
zipStream.Read(fileBytes, 0, fileBytes.Length);
|
||||
return fileBytes;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void UnzipFiles(byte[] zipBytes, Action<string,byte[]> onFileUnzipCallback, bool usePassword = false)
|
||||
{
|
||||
Debug.Log("Starting unzipping files ...");
|
||||
|
||||
@ -47,7 +47,7 @@ MonoBehaviour:
|
||||
PreloadWXFont: 0
|
||||
CompileOptions:
|
||||
DevelopBuild: 1
|
||||
AutoProfile: 0
|
||||
AutoProfile: 1
|
||||
ScriptOnly: 0
|
||||
Il2CppOptimizeSize: 1
|
||||
profilingFuncs: 0
|
||||
@ -59,7 +59,7 @@ MonoBehaviour:
|
||||
CustomNodePath:
|
||||
autoAdaptScreen: 0
|
||||
showMonitorSuggestModal: 1
|
||||
enableProfileStats: 0
|
||||
enableProfileStats: 1
|
||||
enableRenderAnalysis: 0
|
||||
enablePerfAnalysis: 0
|
||||
iOSAutoGCInterval: 10000
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user