Search Unity

Addressables causes corrupted textures when using Packed Play Mode

Discussion in 'Addressables' started by RakNet, Aug 25, 2019.

  1. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    I'm getting corrupted textures on some of my units when using Packed Play Mode. This appears to be a problem specifically caused by addressables. I'd file a bug report, but my game is like 100 GB so I wouldn't be able to upload it.

    Using version 1.1.7, with dependency scriptable build pipeline 1.5.2

    This is similar to the issue I had when using resources
    https://forum.unity.com/threads/bug-4gb-limit-to-textures-in-standalone-build.441116/

    Notes:
    Using addressables in fast mode: Problem does not occur
    Not only the zombie is corrupted, also the magic missile the player shoots (see screenshot) and the loot drops are corrupted. In the screenshot the skeleton is corrupted too.
    If I simplify the scene, the first wave of zombies is not corrupted, but the second wave that spawns is
    Problem occurs the same way in the editor and in builds, so long as I use packed play mode
    The same zombie in two other, simpler scenes works fine. The other two scenes are loaded the same way. It is only in this scene that has many other assets
    Tried build/clean already

    Editor log attached

    upload_2019-8-25_15-57-57.png

    upload_2019-8-25_15-58-41.png
     

    Attached Files:

  2. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
  3. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    how big are the bundles you end up with? Are your groups set to "pack together" or "pack separately"? And, have you run the analyze duplicate check?
     
  4. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    @unity_bill

    "how big are the bundles"

    Not sure how to check that, is it this?

    upload_2019-8-26_18-32-17.png

    "And, have you run the analyze duplicate check?"
    Yes, I just ran it, then tested again and the issue still happens


    "Are your groups set to "pack together" or "pack separately"?"
    Can't find that option, so I guess it's the default.

    upload_2019-8-26_18-33-35.png

    Here's the log after I ran duplicate check, then clean, then build, then tested the game and saw the issue still happened
    www.poleaxe-games.com/AddressableIssue/Editor2.log.txt
     
  5. danilonishimura

    danilonishimura

    Joined:
    Jul 13, 2010
    Posts:
    70
    Last edited: Aug 27, 2019
  6. aurelien-morel-ubiant

    aurelien-morel-ubiant

    Joined:
    Sep 27, 2017
    Posts:
    275
    @RakNet by default it's pack together. This option is present in the asset group. Click on the default group and check the inspector. You must this in the last scriptable object field.
     
    RakNet likes this.
  7. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    315
    aurelien-morel-ubiant likes this.
  8. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    yes, like that, though this shows the size after compression.

    The system should support bundles up to 4GB at this point, but I'm not sure if there are some potential complications if your uncompressed size pushes 4GB. I don't think our compression will cut things down in half, but I don't know.


    So I'm mostly sure it's one of two things. In either case, the fix is either "pack separately" as you've done, or spit up your assets into a handful of groups (each can be pack together).

    1. the bundle is somehow too big. Seems odd, but it's possible.
    2. some sort of issue with how much RAM you need to allot for that one big file. Keep in mind (as noted here https://docs.unity3d.com/Packages/com.unity.addressables@1.1/manual/MemoryManagement.html) that while you can load things individually from a bundle, they will only unload once everything in that bundle is done being used. Which means there could be times when you have all of that large file in memory, even if you don't think you're using it all together. Depending on the system, this has potential to cause issues.

    Those are both guesses though. All in all, I'm happy splitting up your files solves the problem.