提交 1c9e8b5e 编写于 作者: T tanghai

1.修复了mongo一个bug

2.修复ResourcesComponent组件同步资源加载路径错误
上级 1c6fe57f
......@@ -16,6 +16,7 @@
using System;
using System.IO;
using System.Text;
using UnityEngine;
namespace MongoDB.Bson.IO
{
......@@ -240,7 +241,12 @@ namespace MongoDB.Bson.IO
}
else if (_children != null)
{
var index = (uint)((int)keyByte - _minChildKeyByte);
// 这里做了修改,il2cpp uint跟int比较有bug
int index = keyByte - _minChildKeyByte;
if (index < 0)
{
return null;
}
if (index < _childrenIndexes.Length)
{
index = _childrenIndexes[index];
......
fileFormatVersion: 2
guid: 943f3c476130c4f4f8ae55ef3ccd38ba
timeCreated: 1510969659
timeCreated: 1510979420
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
......
......@@ -46,10 +46,9 @@ namespace Model
Log.Debug(versionUrl);
await request.DownloadAsync(versionUrl);
this.VersionConfig = MongoHelper.FromJson<VersionConfig>(request.Request.downloadHandler.text);
Log.Info(MongoHelper.ToJson(this.VersionConfig));
}
Log.Debug(MongoHelper.ToJson(this.VersionConfig));
Log.Debug("WebVersion:\n" + MongoHelper.ToJson(this.VersionConfig));
// 对比本地的Version.txt
string versionPath = Path.Combine(PathHelper.AppHotfixResPath, "Version.txt");
......@@ -69,6 +68,7 @@ namespace Model
{
VersionConfig localVersionConfig = MongoHelper.FromJson<VersionConfig>(File.ReadAllText(versionPath));
Log.Debug("LocalVersion:\n" + MongoHelper.ToJson(localVersionConfig));
// 先删除服务器端没有的ab
foreach (FileVersionInfo fileVersionInfo in localVersionConfig.FileVersionInfos)
{
......
......@@ -183,7 +183,7 @@ namespace Model
#endif
}
AssetBundle assetBundle = AssetBundle.LoadFromFile(Path.Combine(PathHelper.AppResPath, assetBundleName));
AssetBundle assetBundle = AssetBundle.LoadFromFile(Path.Combine(PathHelper.AppHotfixResPath, assetBundleName));
if (!assetBundle.isStreamedSceneAssetBundle)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册