Search Unity

Several questions about AssetBundles

Discussion in 'Asset Bundles' started by rickblacker, Aug 19, 2018.

  1. rickblacker

    rickblacker

    Joined:
    May 1, 2014
    Posts:
    266
    I have a project I'm working on. It's a Windows based 360 video app. We will have a HUGE amount of media in our app. At least a terabyte of media if not more than that. Each video will be quite large. Initially, I am planning on having all media and assets on the local machine.

    If I create an asset bundle "VideoAssetBundle" that contains all my videos, if I understand how this works, the "VideoAssetBundle" would be HUGE which initially may seem to be ok. However, if I understand how all this works. When I "Load" the asset bundle, is it just unpacking the bundle or is it actually loading all the contents into memory.... which, most likely would kill the machine and application.

    And if it is loading all the contents into memory, which won't work in my situation, is there a better solution to this?

    Thanks!
     
  2. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    My 2 cents. I would not use asset bundles for this. Not even download the terabytes of videos to the target device / computer.

    Instead, streaming the video as it plays would be better, downloading only what you need to play the next few seconds (and recycling the buffer).

    As far as your question if you use LZ4 chunked compression when makign the bundle, the bundle is not uncompressed / nor loaded into memory (other than the intiial metadata).. instead only the 'chunks' you access get decompressed / loaded.

    Then again, if you are downloading the bundles (rather than Unity's cache) you would need to make sure you don't store the download in memory, and instead write to disk as you get it.