mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update
Update
This commit is contained in:
@@ -9,8 +9,8 @@ namespace TEngine
|
||||
[Serializable]
|
||||
public struct VersonConfig
|
||||
{
|
||||
public string AppVersion; //底包版本号
|
||||
public string BaseResVersion; //基于底包对应的资源版本号
|
||||
public string AppVersion; //APP版本号
|
||||
public string BaseResVersion; //APP对应的资源版本号
|
||||
public string ResVersion; //资源版本号
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ namespace TEngine
|
||||
readonly Dictionary<string, string> _assetPath2BundleDatas = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// 加载资源依赖数据,产生AssetBundle依赖拓扑
|
||||
/// 加载资源依赖
|
||||
/// </summary>
|
||||
public void Load()
|
||||
{
|
||||
@@ -52,10 +52,10 @@ namespace TEngine
|
||||
bundleName = reader.ReadString();
|
||||
assetCount = reader.ReadInt32();
|
||||
assetPaths = new string[assetCount];
|
||||
for (int ii = 0; ii < assetCount; ++ii)
|
||||
for (int j = 0; j < assetCount; ++j)
|
||||
{
|
||||
assetPaths[ii] = reader.ReadString();
|
||||
_assetPath2BundleDatas.Add(assetPaths[ii], bundleName);
|
||||
assetPaths[j] = reader.ReadString();
|
||||
_assetPath2BundleDatas.Add(assetPaths[j], bundleName);
|
||||
}
|
||||
depCount = reader.ReadInt32();
|
||||
if (!_bundleDatas.TryGetValue(bundleName, out assetBundleData))
|
||||
@@ -72,7 +72,7 @@ namespace TEngine
|
||||
|
||||
assetBundleData.InitAssets(assetPaths);
|
||||
|
||||
for (int ii = 0; ii < depCount; ++ii)
|
||||
for (int j = 0; j < depCount; ++j)
|
||||
{
|
||||
bundleName = reader.ReadString();
|
||||
if (!_bundleDatas.TryGetValue(bundleName, out depAssetBundleData))
|
||||
@@ -80,21 +80,20 @@ namespace TEngine
|
||||
depAssetBundleData = new AssetBundleData(bundleName);
|
||||
_bundleDatas.Add(bundleName, depAssetBundleData);
|
||||
}
|
||||
assetBundleData.Dependencies[ii] = depAssetBundleData;
|
||||
assetBundleData.Dependencies[j] = depAssetBundleData;
|
||||
}
|
||||
}
|
||||
stream.Close();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 卸载AssetBundle数据
|
||||
/// </summary>
|
||||
public void Unload()
|
||||
{
|
||||
#if ASSETBUNDLE_ENABLE
|
||||
foreach(var bundleData in _bundleDatas)
|
||||
{
|
||||
bundleData.Value.Unload(true);
|
||||
}
|
||||
_bundleDatas.Clear();
|
||||
_assetPath2BundleDatas.Clear();
|
||||
#endif
|
||||
@@ -104,7 +103,9 @@ namespace TEngine
|
||||
{
|
||||
#if ASSETBUNDLE_ENABLE
|
||||
foreach(var bundleData in _bundleDatas)
|
||||
{
|
||||
bundleData.Value.UnloadBundleFalse();
|
||||
}
|
||||
_bundleDatas.Clear();
|
||||
_assetPath2BundleDatas.Clear();
|
||||
#endif
|
||||
|
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.collab-proxy": "1.2.16",
|
||||
"com.unity.ide.rider": "1.1.4",
|
||||
"com.unity.ide.vscode": "1.2.1",
|
||||
|
@@ -1,5 +1,11 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.2d.sprite": {
|
||||
"version": "1.0.0",
|
||||
"depth": 0,
|
||||
"source": "builtin",
|
||||
"dependencies": {}
|
||||
},
|
||||
"com.unity.collab-proxy": {
|
||||
"version": "1.2.16",
|
||||
"depth": 0,
|
||||
|
Reference in New Issue
Block a user