Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Stutter when LoadAssetBundle async with PVRTC compressed sprites

Discussion in 'Asset Bundles' started by Stamblew, Jan 20, 2020.

  1. Stamblew

    Stamblew

    Joined:
    Sep 3, 2014
    Posts:
    22
    Hi, I have about 50 sprites, each 2048x2048. They are all compressed using PVRTC (for iOS), so each one is about 2MB. I created an asset bundle using BuildAssetBundleOptions.ChunkBasedCompression. However when I try to load the bundle asynchronously, my game stutters.

    Stutter.PNG

    When not compressing using PVRTC, each sprite size is about 8MB, however when I load the bundle async the game runs smoothly.

    Stutter_NoCompression.PNG

    The question is, when I call LoadAssetAsync after loading the bundle, will Unity decompress the file because it was PVRTC compressed before displaying the sprite?

    Thanks for the help, folks
     
    Last edited: Jan 20, 2020
  2. AlkisFortuneFish

    AlkisFortuneFish

    Joined:
    Apr 26, 2013
    Posts:
    975
    On those screenshots it looks like you're profiling in the editor. If you are using PVRTC in the editor, Unity will have to decompress the textures to actually display them. This can cause stutter. On a device, PVRTC textures are not decompressed, as the GPU supports displaying them directly. Try profiling on a device and see if the issue persists.
     
    Stamblew likes this.
  3. Stamblew

    Stamblew

    Joined:
    Sep 3, 2014
    Posts:
    22
    Thanks for the reply! Apparently, no stutter is found when running on iOS :) But the interesting thing is that I tested on my friend's computer and there the editor runs smoothly