Skip to content

Commit

Permalink
Manual revert
Browse files Browse the repository at this point in the history
  • Loading branch information
dalkia committed Jan 17, 2025
1 parent d0a6802 commit ee69f26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}
}

0 comments on commit ee69f26

Please sign in to comment.