Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UnityEditor.Build.Reporting.BuildReport for Addressables built assets

Discussion in 'Addressables' started by dirty-rectangle, Jul 30, 2019.

  1. dirty-rectangle

    dirty-rectangle

    Joined:
    Apr 23, 2015
    Posts:
    78
    How can i list the files in a BuildReport each with built files sizes for an addressable build?

    I'm looking to display the full UnityEditor.Build.Reporting.BuildReport for my addressables build but it looks like it is only for the assets built by calling BuildPipeline.BuildPlayer()
    I've edited com.unity.addressables AddressablesPlayerBuildProcessor.OnPostprocessBuild() to also list the files in the build report and their sizes, when i run an app build from the editor it does call the AddressablesPlayerBuildProcessor.OnPostprocessBuild() and list the files from the BuildReport,
    but it looks to only be listing files built in to the app bundles (from the Resources folders) and not the files from the addressable builds itself.
    Is there a way to get a per asset detailed build report for asset built by an addressables build which is called from AddressableAssetSettings.BuildPlayerContent()?
     
  2. unity_bill

    unity_bill

    Joined:
    Apr 11, 2017
    Posts:
    1,053
    We don't have a report at this time, but we should have all the data available to you if you if you call the addressables build from code. Check out IDataBuilderResult.FileRegistry. That should get you started.
     
  3. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    Any news here?
    The above API exposes the file paths, but how do we get the actual build size used for these files on this specific platform/buildsettings?

    We need to know where&how we can optimize our buildsize (as we want to reduce texture sizes from 2gb to, say, a few hundred MBs on mobile)

    So for example: if we'd only build one addressable bundle for a scene (100mb), I need to be able to see that the terrain texture is taking up 10mb inside this bundle.
     
    Last edited: Nov 27, 2019
    Xarbrough and phobos2077 like this.
  4. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    @unity_bill How can we get the platform build sizes for the data in "IDataBuilderResult.FileRegistry" ?
     
    phobos2077 likes this.
  5. MikeHergaarden

    MikeHergaarden

    Joined:
    Mar 9, 2008
    Posts:
    1,027
    I believe we are unable to make any useful report using Addressables because stuff like "TextureUtil.GetStorageMemorySizeLong(t);" is internal.