diff --git a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs index 09d2bfda02..4964238153 100644 --- a/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs +++ b/Explorer/Assets/Scripts/ECS/StreamableLoading/AssetBundles/Tests/PrepareAssetBundleLoadingParametersSystemShould.cs @@ -122,7 +122,7 @@ public void FailIfAbsentInManifestNewHash() } [Test] - public void ReturnDifferentCacheValuesForDifferentVersions() + public void ReturnSameCacheValuesForDifferentVersions() { //First, we simulate creation of a scene and the resolving of one asset budnle string version = "v" + SceneAssetBundleManifest.ASSET_BUNDLE_VERSION_REQUIRES_HASH; @@ -146,7 +146,7 @@ public void ReturnDifferentCacheValuesForDifferentVersions() string secondCacheableHash = intent.CommonArguments.GetCacheableURL(); Assert.AreNotEqual(firstStandardURL, secondStandardURL); - Assert.AreNotEqual(firstCacheableHash, secondCacheableHash); + Assert.AreEqual(firstCacheableHash, secondCacheableHash); } [Test] diff --git a/Explorer/Assets/Scripts/SceneRunner/Scene/SceneAssetBundleManifest.cs b/Explorer/Assets/Scripts/SceneRunner/Scene/SceneAssetBundleManifest.cs index c416ad8f9f..fba8a10619 100644 --- a/Explorer/Assets/Scripts/SceneRunner/Scene/SceneAssetBundleManifest.cs +++ b/Explorer/Assets/Scripts/SceneRunner/Scene/SceneAssetBundleManifest.cs @@ -81,9 +81,11 @@ public string GetVersion() => public string GetSceneID() => sceneID; - //Used for the OngoingRequests cache. We need to avoid the sceneID in this URL to able to reuse assets. + //Used for the OngoingRequests cache. We need to avoid version and sceneID in this URL to able to reuse assets. //The first loaded hash will be the one used for all the other requests - public URLAddress GetCacheableURL(string hash) => - assetBundlesBaseUrl.Append(new URLPath($"{version}/{hash}")); + public URLAddress GetCacheableURL(string hash) + { + return assetBundlesBaseUrl.Append(new URLPath(hash)); + } } }