Search Unity

Question Crunch Compression import settings not applying to asset bundles?

Discussion in 'Asset Bundles' started by theonetruetroll, Feb 21, 2022.

  1. theonetruetroll

    theonetruetroll

    Joined:
    Mar 2, 2021
    Posts:
    1
    Hello everyone, I'm having a rather frustrating problem with how to handle assets for android. I'm working on a two man team making an adult visual novel where I do the program work and my partner does the writing and asset creation. The desktop versions of this game are operational and only require UI improvements and some other touch ups. The issue I'm running into however is with android file sizes.

    Because we are an adult game and our budget is extremely small, we cannot reasonably access online services for asset distribution. Even if we could, I could easily forsee our finished product being far too much for a typical user to expect to transfer over a wireless data connection that might have data caps. Our goal is to separate the android version of the game into volumes so reduce the per-apk size and simply have the save files stored in public storage so as to be usable through the whole experience. That is however where I have run into an issue.

    What amounts to aproximately 900~MB of jpgs translates to just over 4GB in dxt as a standard asset bundle with chunk compression(I need this to be like 2GB or less). On desktop I am simply loading these as loose files and having the engine make textures out of them on the fly because a VN is not exactly starved for resources(200mb RAM usage at runtime and about 3% of my CPU except when videos run). I tried turning on crunch compression for all of these assets and rebuilding the bundles but it seems as though import settings are not used for asset bundles as I ended up with exactly the same problem. Probably worth noting here that I am using the asset bundle browser to streamline this process, and I have tried using no compression on the bundles as well so it doesn't alter the crunched files. I know it's doing the crunching because when I tell it to build it tells me it's crunching the images. So I'm curious as to why that doesn't seem to have any impact at all on the resultant size of the bundle. All I can guess is that it just ignores the import settings and does its own thing and that unity is just crunching them because it reimports assets way too often for my liking(part of the reason I have resorted to making bundles in separate projects to prevent myself from losing hours for the reimporting of assets that do not need to be looked at during build).

    Ok so with all of that information out of the way, here's my string of questions:

    1. Is there any way to get unity to actually use the crunched assets in the asset bundle? Is the browser causing this?

    2. Is there a way to replicate what I'm doing on desktop? There is CPU power to spare so I can absolutely load jpgs at runtime, but I don't know how to package loose files in an APK(I have zero android experience before this project), and I don't know if the same datapath or importing would work.

    3. We are sitting at just over 16k images so resizing them all just for android is probably out of the question unless I can make Unity do that for me. Can I? The images are currently in 720 as jpgs which we suspect might already end up looking bad, but we are willing to sacrifice some quality to get a product.

    4. Is there anything else I can do that doesn't involve using online services or requiring users to manually download a bunch of bundles separately and installing them to the persistent path themselves?

    Thanks in advance for any and all input.