Search Unity

Bloat from unity ads

Discussion in 'Unity Ads & User Acquisition' started by goldbug, May 8, 2018.

  1. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    768
    I build my android app, and I see this in the editor log

    1.3 mb 2.0% Packages/com.unity.ads/Editor/Resources/Editor/landscape.jpg
    1.3 mb 2.0% Packages/com.unity.ads/Editor/Resources/Editor/portrait.jpg

    My application is not using unity ads, so why do I have 2.6 MB of bloat from unity ads? How to remove these?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You can remove it via the Package Manager
     
    Deleted User likes this.
  3. rasmus-unity

    rasmus-unity

    Moderator

    Joined:
    Aug 15, 2014
    Posts:
    1,312
    Which Unity version and for which platform are you building for?

    /Rasmus
     
  4. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    768
    @hippocoder @rasmus-unity

    I am using 2017.4.1 on macOS I am building for android
    Does the package manager work in this version? I can't find it anywhere
     
  5. goldbug

    goldbug

    Joined:
    Oct 12, 2011
    Posts:
    768
    I could not find the package manager, but I wiped the cache folder and the problem seems to have gone away.
     
  6. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    Even if you want to use Unity Ads, there should not be two such JPG images in the build.

    123948 May 3 06:30 Unity.app/Contents/Resources/PackageManager/Editor/Packman_Temp/com.unity.ads-2.0.8/package/Editor/Resources/Editor/landscape.jpg

    118465 May 3 06:30 Unity.app/Contents/Resources/PackageManager/Editor/Packman_Temp/com.unity.ads-2.0.8/package/Editor/Resources/Editor/portrait.jpg

    These placeholder graphics are 8MB each. So about 1/4 to 1/3 of a small Android build.

    They seem to be included because someone at Unity named the folder "Resources" even though anything inside an "Editor" folder should be excluded. This is both a bug in the Unity Ads, and in the Unity Build system which can't decide which rule takes precedence.

    I'll neuter these files manually. Since it's inside the Unity.app, it will likely get mangled if I upgrade Unity later.
     
    goldbug likes this.
  7. DenisasK

    DenisasK

    Unity Technologies

    Joined:
    Oct 13, 2016
    Posts:
    89
    Hello @halley . Interesting... The images should not be included in a build. In goldbug's case it looks like something was cached in a wrong state.
    I have tested with the latest 2018.2 but no luck. Are able to reproduce it consistently? Which version are you using?
     
  8. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    @DenisasK, I will give it a shot this weekend. I only have one build of Unity at the moment. I neutered the files but didn't remove them, by reducing their JPEG compression quality to "eye-gouging blotchy" level. So they should still appear in a fresh project build report. If so, I will upload a full tarball of the built project for your perusal.
     
    DenisasK likes this.