diff --git a/Assets/TEngine/Runtime/Core/GameConfig.cs b/Assets/TEngine/Runtime/Core/GameConfig.cs index 45d527a1..e5c35582 100644 --- a/Assets/TEngine/Runtime/Core/GameConfig.cs +++ b/Assets/TEngine/Runtime/Core/GameConfig.cs @@ -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; //资源版本号 } diff --git a/Assets/TEngine/Runtime/Res/AssetConfig.cs b/Assets/TEngine/Runtime/Res/AssetConfig.cs index 48b5c54d..d6e02f24 100644 --- a/Assets/TEngine/Runtime/Res/AssetConfig.cs +++ b/Assets/TEngine/Runtime/Res/AssetConfig.cs @@ -30,7 +30,7 @@ namespace TEngine readonly Dictionary _assetPath2BundleDatas = new Dictionary(); /// - /// 加载资源依赖数据,产生AssetBundle依赖拓扑 + /// 加载资源依赖 /// 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 } - /// - /// 卸载AssetBundle数据 - /// 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 diff --git a/Packages/manifest.json b/Packages/manifest.json index 1f23626d..250a7be3 100644 --- a/Packages/manifest.json +++ b/Packages/manifest.json @@ -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", diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 4368d6cd..bf0a4951 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -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,