Search Issue Tracker
By Design
Votes
0
Found in
5.4.0f3
Issue ID
831179
Regression
No
[AssetBundle] Sprite pivot setting change does not trigger bundle download cache rebuild
How to reproduce:
1. Download and open the project from OC
2. Notice that "amused" sprite's pivot is in the center
3. Build AssetBundle (Assets -> AssetBundles -> Build AssetBundles)
4. Open and play testScene scene
5. Both sprites stand in the same line. One in the left was in the scene, one in the right is loaded from asset bundles
6. Changes "amused" sprite's pivot (for example to Top Left)
7. Repeat 3-4 steps
8. Notice that both sprites look the same as in step 5
Reproducible: 5.3.6p5, 5.4.1p1, 5.5.0b3
By Design: The example case uses WWW.LoadFromCacheOrDownload( bundleURL, 0 ). That second parameter of '0' is the declared version of the bundle. Unity will cache that bundle on first download, and mark it as "version 0". Until someone calls LoadFromCacheOrDownload with a higher version, Unity will continue to use the cached version. This is independent of the underlying bundle changing.
Solution: The preferred method is to download the manifest which has the hash for all the bundles, then call UnityWebRequest.GetAssetBundle( bundleURL, bundleHash, 0) (this '0' is an unrelated CRC value).
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Crash on ShaderLab::ShaderState::ApplyShaderState when entering Play Mode and calling ShaderWarmup.WarmupShaderFromCollection with a shader that has dynamic_branch
- Crash on operator delete[] when a serializable structure in the System namespace is serialized by a MonoBehaviour
- [macOS] forward and backward mouse buttons are recognized as middle mouse button
- NavMeshModifier.OnEnable/OnDisable gets progressively slower when called repeatedly
- "System.Net.CookieContainer" throws an "ArgumentException" error when using a non-UTF-8 machine locale and hostname
Add comment