Search Unity

Subscene Entities Cache, Loadable at Runtime ?

Discussion in 'Entity Component System' started by Opeth001, Jul 3, 2019.

  1. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    i built my player including subscenes entities cache which increased my APK size by 180mo. it's a huge number and unacceptable for android users. so i Zipped all the cache to a single file.zip and the result was awesome! the cache size went down to 4mo. but i dont know if it's possible to specifiy entities cache path at runtime and make it recognizable by subscenes.

    any suggestion is much appreciated.
     
  2. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    maybe my question wasn't enought clear sorry! :p
    my Question is:
    is it possible to Change Subscenes Binary Cache Files loading path ?
    this way i can doawnload the compressed cache (4mo) and extract it (180mo) into it's the specified folder when the Game is first time opened.
    the problem is in Android devices everything under "StreamingAssets" folder is read only.
     
    lclemens likes this.
  3. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Did you ever figure that out?
     
  4. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    lclemens likes this.
  5. Opeth001

    Opeth001

    Joined:
    Jan 28, 2017
    Posts:
    1,117
    Thanks :)
    ill give it a try, this way ill be able to update the subscene without the need to update the full app.

    The o stands for Octet:
    The octet is a unit of digital information in computing and telecommunications that consists of eight bits.
    The term octad for eight bits is no longer common.
    Symbol: o
    In primary units of information: 1 o = 8 bits = 1 byte.
    Mind blowing stuff huh!? :eek:
     
  6. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Ugh.... I didn't know that subscenes store textures uncompressed. I was using addressables, but then I did that comparison of using subscenes-vs-addressables, and decided to switch to subscenes. I'll add the uncompressed textures as a disadvantage to the pro/con list. Now I'm starting to second guess that decision. That's just sucky.

    On a separate topic, when not building (just play mode) is used... what folder are the cache files stored in?
     
  7. topher_r

    topher_r

    Unity Technologies

    Joined:
    Jun 14, 2019
    Posts:
    36
    SubScenes never stored their Unity assets, such as Textures, in uncompressed formats. They use AssetBundles with compression turned on, and going forward they will use the new ContentArchive, which is also compressed.
     
    eizenhorn, Elapotp, Luxxuor and 3 others like this.
  8. lclemens

    lclemens

    Joined:
    Feb 15, 2020
    Posts:
    761
    Thanks @topher_r ! It appears that I misunderstood how it worked, and it's good to know that the current and future methods use compression.
     
  9. eizenhorn

    eizenhorn

    Joined:
    Oct 17, 2016
    Posts:
    2,685
    Can you shed some light on that? Is it related to
    DOTS Addressables
    or
    ContentLoadInterface
    ContentFile
     
    bb8_1, Enzi, lclemens and 1 other person like this.