|
If I make multiple AssetBundleRequests to the same asset will it only trigger one http request? If so (it's a stretch, I know), does it reference count to resource to know when to release it, or do I get multiple copies of the same prefab in memory?
(comments are locked)
|
|
An AssetBundleRequest never initiates a http request - only the WWW class does. The AssetBundleRequest just loads data from the already downloaded AssetBundle. It makes sense for repeated WWW GETs not to be reused - just because they're idempotent doesn't mean that they always return the same content. But the AssetBundleRequest might detect repeat decodes and reuse content, but actually throws an exception rather than returning a reference to the previous content (confirmed by cooked tests).
Jan 14 '10 at 05:32 PM
Max Kaufmann
(comments are locked)
|
|
i am curious does asset bundle needs to be download completly in order to use assetbundlerequest and LoadAsync? if it does, that isnt really something special yes, before assets can be loaded from an asset bundle, the asset bundle must first be fully downloaded and loaded into memory
Feb 15 '12 at 01:44 AM
mrai
(comments are locked)
|

Having blundered the previous question, I'll refrain from saying anything definitive. I know at one point multiple calls would in fact download the asset multiple times, and losing references would not necessarily clean them up automatically. Some of that may have changed, but I believe some manual tracking is still necessary on your part.
From my own testing, it not only doesn't reuse GET requests to the same URL, but you'll actually get a runtime exception if you try to decode the same assetBundle from the same URL twice. Manual tracking is definitely the answer.