Search Unity

[RELEASED] Better Build Info - An in-depth look at build and assets

Discussion in 'Assets and Asset Store' started by gwiazdorrr, Sep 9, 2016.

  1. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Thanks! I remember I had it in the first version, but since loading thumbnails was slow (i.e. typical, without workarounds) at the time, holding up/down arrow button meant you would get small freezes from time to time, making the tool seem sluggish and clunky.

    This shouldn't be a problem any more, though. I'll see if I can get it back in.
     
  2. snugsound

    snugsound

    Joined:
    Mar 9, 2014
    Posts:
    17
    Sounds good! If loading thumbnails is still slow you could always consider deferring this until the key is released? From a user perspective I would say it's reasonable to not expect something to fully load while quickly scrolling.
     
  3. bitinn

    bitinn

    Joined:
    Aug 20, 2016
    Posts:
    961
    Special case request: I am wondering how this tool might interact with Addressables package.

    The way Addressables operate is to build content in /StreamingAssets/ folder during build, then clean up after build.

    I see that none of those data are included in the build report, while not surprised, I basically bought this tool to debug Addressables, so I expect others might do the same thing in future.

    (PS: This is kinda what Unity is moving towards, as Addressables is based on the new Scriptable Build Pipeline; again, didn't expect an asset to support it, but nice to have.)
     
    gwiazdorrr likes this.
  4. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    @snugsound: the latest version has proper keyboard navigation support, hope you'll enjoy it!
     
    snugsound likes this.
  5. keen-x

    keen-x

    Joined:
    Sep 18, 2018
    Posts:
    2
    Could I get a build report while building in the batch mode?
     
  6. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Yes you can. You need to call
    BetterBuildInfo.NotifyBuildEnded()
    after your
    BuildPipeline.BuildPlayer
    . If the scenes you are using are different than scenes in Player settings, be sure to call
    BetterBuildInfo.SetExpectedScenesPaths
    prior to
    BuildPipeline.BuildPlayer
    .

    It's all a drag, I know. I believe that it can be avoided after 2018.3, though; what Unity version are you on?
     
  7. keen-x

    keen-x

    Joined:
    Sep 18, 2018
    Posts:
    2
    I am using 2017.4. Works well.
     
  8. bagelbaker

    bagelbaker

    Joined:
    Jun 5, 2017
    Posts:
    67
    Hi!
    Just tested this out on our project and have a few questions:

    1) In the "Used Assets" tab, Why is there some files greyed out with size 0kb when these files aren't 0kb in the project? The size is 0kb but the "Total" is non zero.

    2) In the "assets referencing selection", are these direct references? Or it can be from indirect references, for example, if A refers to B refers to C, then A will show up in this window when currently selecting C?
     
    Last edited: Aug 1, 2019
  9. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Sometimes prefabs get merged with scenes, silently. They don't show up in logs, but are still used. Since there's no way of calculating their size, they just show up as 0kb. References etc. are still traced.

    These are direct and indirect references. Getting pure direct references is possible, but would be extremely slow.
     
  10. boost-merlin

    boost-merlin

    Joined:
    May 13, 2014
    Posts:
    1
    On macOS Mojave, after build, there is a warning:

    BetterBuildInfo: Unable to obtain build artifacts info: System.InvalidOperationException: Error parsing line: Zip file size: 129786548 bytes, number of entries: 325 ---> System.FormatException: Input string was not in a correct format.
    at System.Number.StringToNumber (System.String str, System.Globalization.NumberStyles options, System.Number+NumberBuffer& number, System.Globalization.NumberFormatInfo info, System.Boolean parseDecimal) [0x00057] in <7ba07f088431485bb722f3b3373e87ee>:0
    at System.Number.ParseInt64 (System.String value, System.Globalization.NumberStyles options, System.Globalization.NumberFormatInfo numfmt) [0x00014] in <7ba07f088431485bb722f3b3373e87ee>:0
    at System.Int64.Parse (System.String s) [0x00007] in <7ba07f088431485bb722f3b3373e87ee>:0
    at AlXNRSbp$OVlcEl2wtJ6GR2y2OSMUklLYqUOZ6SnlMSdWQOgub04_lt_$LXVgSuLUw+4IdlIv6ky24m88tgy1Pe81rMlzl4ZkUsinqtxJwJ1YeH3489$$N8pP8LjHwQpQ8_vceTgWC1dtMINOr2BiKeLi2EkOhvms1RQLZQjQ01UjA8jbBIVUAn9_pj8KZ88W$DAsNshQb$BaOflibnbKPyt_Q.MoveNext () [0x0014c] in <3e8d841a136e4dcda431d61c8ab06232>:0
    --- End of inner exception stack trace —
    And size overview alway be 0.
    企业微信截图_c84a1551-2ac2-4a9e-957f-9b6c1afef9be.png
     
  11. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Well that's puzzling. I'm on it.
     
  12. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Just tried it on 2018.4.11f1 on macOS and it is giving me this after a build:
    Code (CSharp):
    1. BetterBuildInfo: Unexpected error: System.ArgumentException: No asset info found in the log
    2.   at Better.BuildInfo.Internal.BuildLogParser.GetLastBuildAssetsSizes (System.String buildLogPath, System.Collections.Generic.List`1[T] paths, System.Collections.Generic.List`1[T] sizes, System.Collections.Generic.Dictionary`2[TKey,TValue] scenes) [0x001c7] in <3e8d841a136e4dcda431d61c8ab06232>:0
    3.   at Better.BuildInfo.BuildInfoProcessor.IMT510SWhWU73rzg6hYBS_u8hKOGzFmSMAAow5nMLRd_ (System.String , System.Collections.Generic.Dictionary`2[TKey,TValue] , System.Collections.Generic.Dictionary`2[TKey,TValue] ) [0x00018] in <3e8d841a136e4dcda431d61c8ab06232>:0
    4.   at Better.BuildInfo.BuildInfoProcessor.UyNjcEmu5ubryw35Te5UXPkDRL9xUsCVlzGjh5hIIaZL (UnityEditor.BuildTarget , System.String ) [0x0003f] in <3e8d841a136e4dcda431d61c8ab06232>:0
    5. UnityEngine.Debug:LogError(Object)
    6. a_6ap3G0pZcXAt9vvop$IXBGbNmCLWRiyES2e2OYJQ_g:nC_Xz2BZ6T9gqaVg_yAX1oU(String, Object[])
    7. Better.BuildInfo.BuildInfoProcessor:UyNjcEmu5ubryw35Te5UXPkDRL9xUsCVlzGjh5hIIaZL(BuildTarget, String)
    8. Better.BuildInfo.BuildInfoProcessor:LyTr7_hutXmHkvycvvYsvcE()
    9. Better.BuildInfo.PAUY_0jon17FAm7rPh3Z6NepbKMu6gnyCd6f2Erpj7YJgXpep5w9zL6F0Oya0arscw:k43846Wzp1hfFxBcpW9drM8()
    10. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
    11.  
    Let me know if there's anything I can do to help investigate. Thanks!
     
  13. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Well the first thing is to enable debug log in the settings :) Also, anything fancy with the way you build your project?
     
  14. mons00n

    mons00n

    Joined:
    Sep 18, 2013
    Posts:
    304
    Ah, was not aware of that checkbox in the BBI scriptable :) I will send you a PM of the relevant log data.
    I do not believe so; we build our project via script but simply building it via Build Settings also produces the same error.

    edit: ok I have no idea what happened but it magically started working. Not going to ask any more questions :O
     
    Last edited: Oct 21, 2019
  15. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    No problem :)

    Things like this happen when something goes wrong with the build, but in a silent way. Glad it works now!
     
  16. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
  17. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    Is the post 2018.3 workaround available somehow? I'm on 2018.4 and would happily use this feature.

    Also, have you tried enabling BBI with the Teamcity runner for Unity? I am using it for one build configuration but am not getting any build reports, I'm guessing I need to call the NotifyBuildEnded somehow but its unclear how to do that from their runner. I guess I will switch this config to our build script too :)

    Also, one more thing, I've got this kind of output in the inspector:

    upload_2019-10-27_12-7-53.png

    Any idea why the text is corrupted like that? It doesn't get fixed if I adjust the width of the inspector pane in any direction.
     
  18. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    Second question:

    It looks like BBI doesn't like logs from the batchmode build to go to stdout?

    Code (csharp):
    1.  
    2. [16:33:04]
    3. DisplayProgressbar: Better Build Info
    4. [16:33:04]
    5. BetterBuildInfo: Unexpected error: System.IO.FileNotFoundException: - does not exist
    6. [16:33:04]
    7. File name: '-'
    8. [16:33:04]
    9. at System.IO.File.Copy (System.String sourceFileName, System.String destFileName, System.Boolean overwrite) [0x000b6] in <df7127ba07dc446d9f5831a0ec7b1d63>:0
    10. [16:33:04]
    11. at Better.BuildInfo.Internal.BuildLogParser.GetLastBuildAssetsSizes (System.String buildLogPath, System.Collections.Generic.List`1[T] paths, System.Collections.Generic.List`1[T] sizes, System.Collections.Generic.Dictionary`2[TKey,TValue] scenes) [0x00008] in C:\TeamCity\buildAgent\work\cd9fad03e26ac841\Assets\Plugins\Editor\BetterBuildInfo\Internal\BBI_BuildLogParser.cs:25
    12. [16:33:04]
    13. at Better.BuildInfo.BuildInfoProcessor.GetAssetsAndSizesFromBuildLog (System.String buildLogPath, System.Collections.Generic.Dictionary`2[TKey,TValue] assetsUsedByScenes, System.Collections.Generic.Dictionary`2[TKey,TValue] sceneSizes) [0x00019] in C:\TeamCity\buildAgent\work\cd9fad03e26ac841\Assets\Plugins\Editor\BetterBuildInfo\BBI_BuildInfoProcessor.cs:627
    14. [16:33:04]
    15. at Better.BuildInfo.BuildInfoProcessor.PostProcessBuild (UnityEditor.BuildTarget target, System.String path) [0x00044] in C:\TeamCity\buildAgent\work\cd9fad03e26ac841\Assets\Plugins\Editor\BetterBuildInfo\BBI_BuildInfoProcessor.cs:325
    16. [16:33:04]
    17. UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    18. [16:33:04]
    19. UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    20. [16:33:04]
    21. UnityEngine.Logger:Log(LogType, Object)
    22. [16:33:04]
    23. UnityEngine.Debug:LogError(Object)
    24. [16:33:04]
    25. Better.BuildInfo.Internal.Log:Error(String, Object[]) (at Assets\Plugins\Editor\BetterBuildInfo\Internal\BBI_Log.cs:9)
    26. [16:33:04]
    27. Better.BuildInfo.BuildInfoProcessor:PostProcessBuild(BuildTarget, String) (at Assets\Plugins\Editor\BetterBuildInfo\BBI_BuildInfoProcessor.cs:471)
    28. [16:33:04]
    29. Better.BuildInfo.BuildInfoProcessor:OnBuildEnded() (at Assets\Plugins\Editor\BetterBuildInfo\BBI_BuildInfoProcessor.cs:101)
    30. [16:33:04]
    31. BetterBuildInfo:NotifyBuildEnded() (at Assets\Plugins\Editor\BetterBuildInfo\BBI_BetterBuildInfo.cs:58)
    32. [16:33:04]
    33. BatchmodeBuilder:Build(BuildConfiguration) (at Assets\Editor\BatchmodeBuilder.cs:152)
    34. [16:33:04]
    35. BatchmodeBuilder:Build() (at Assets\Editor\BatchmodeBuilder.cs:122)
    36. [16:33:04]
    37. BatchmodeBuilder:Init() (at Assets\Editor\BatchmodeBuilder.cs:105)
    38. [16:33:04]
    39. UnityEditor.EditorApplication:Internal_CallUpdateFunctions() (at C:\buildslave\unity\build\Editor\Mono\EditorApplication.cs:200)
    40. [16:33:04]
    41. [16:33:04]
    42. (Filename: Assets/Plugins/Editor/BetterBuildInfo/Internal/BBI_Log.cs Line: 9)
    43.  

    Is there any workaround to this possibly?
     
  19. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Sorry for the lag, I'm back. Let's address these issues one be one.

    1) The need for NotifyBuildEnded vs 2018.3: it wouldn't be a workaroud, but a rework. I planned to implement this in November. If you're up for a test drive, I can send you an early version once I have a stable one.

    2) Teamcity integration: you're right, NotifyBuildEnded needs to be called. That said, you don't need to go fully custom as you can invoke custom script in the Unity build step ("Execute method" field).

    3) The broken inspector: interesting; settings don't have a custom editor, just public fields with standard attributes. Is it still broken? If so, which Unity version are you on exactly?

    4) Logging to stdout: BBI gets bulk of its info from the log, so this is not going to work. There's a chance that rework mentioned in 1) will get rid of the need to peek into the logs completely.
     
  20. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    1) I'm up for any test drives.
    2) Oh, indeed, I haven't tested that before (does that skip the regular build pipeline entirely, so I can just hook into it there?, sorry don't mean to turn this into a Teamcity support session but you seem to have knowledge)
    3) 2018.4.12f1 and I will confirm tonight but it was still broken last I saw (I do use Odin Inspector but should that affect anything?)
    4) OK, but paired with #2 I may be able to workaround this since the Teamcity runner is not logging to `-` it seems
     
  21. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    I found out that using the execute method field + marking "Run Tests" so that the Teamcity Runner doesn't add `-quit` to the commandline has allowed my custom pipeline to work in their runner, and now BBI works because they log to files. Thanks!

    [edit] Regarding the corrupted inspector output: I am using 2018.4.12f1 and I have narrowed the problem down to Odin Inspector (disabling Odin fixes the panel's output). It isn't a long term issue for me as I am not really changing BBI settings.
     
    Last edited: Nov 3, 2019
    gwiazdorrr likes this.
  22. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Interesting, I'll check how & why Odin interferes with BBI settings.

    Let me know if I can help with anything!
     
  23. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    Almost works on Linux, but not quite; inside
    Plugins/Editor/BetterBuildInfo/BBI_BuildInfoProcessor.cs
    , the
    switch
    statement on line 127 should be changed to this:

    Code (CSharp):
    1.  
    2. switch (Environment.OSVersion.Platform)
    3. {
    4.     case PlatformID.Win32NT:
    5.         return Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Unity\Editor\Editor.log");
    6.     case PlatformID.MacOSX:
    7.         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library/Logs/Unity/Editor.log");
    8.     case PlatformID.Unix:
    9.         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "unity3d/Editor.log");
    10.     default:
    11.         throw new NotSupportedException("Platform " + Environment.OSVersion.Platform + " not supported");
    12. }
    13.  
    Note the
    Unix
    case.

    Also, I encounter the issue described in #18.

    Otherwise, great job! Love this.
     
    Last edited: Dec 6, 2019
    gwiazdorrr likes this.
  24. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Thanks for the snippet!

    What platform do you build for? If for Android, do you have zipinfo in the PATH?
     
  25. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    Linux is the only one I've tested for so far. I do have
    zipinfo
    in my
    PATH
    , though.
     
  26. LuisEGV

    LuisEGV

    Joined:
    Jul 21, 2015
    Posts:
    36
    Hello, I encounter an issue. This is a simple one fortunately, in the same code provided in 73, in macOS the switch is going through UNIX, so is looking for Editor.log in the wrong path
     

    Attached Files:

  27. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    O_O

    On second thought, it's not too surprising.

    Anyway, here's a fix that should work and fallback to the legacy code if fails. PRO user can fix it simply by pasting, non-PRO need to wait for tests and publish being done (shouldn't be too long).


    Code (CSharp):
    1.  
    2. switch (SystemInfo.operatingSystemFamily)
    3. {
    4.     case OperatingSystemFamily.Windows:
    5.         return Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Unity\Editor\Editor.log");
    6.     case OperatingSystemFamily.MacOSX:
    7.         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library/Logs/Unity/Editor.log");
    8.     case OperatingSystemFamily.Linux:
    9.         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "unity3d/Editor.log");
    10.     default:
    11.         // fallback to the old code
    12.         Log.Warning("Unknown operatingSystem ({0}), falling back to Environment.OSVersion", SystemInfo.operatingSystem);
    13.         switch (Environment.OSVersion.Platform)
    14.         {
    15.             case PlatformID.Win32NT:
    16.                 return Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Unity\Editor\Editor.log");
    17.             case PlatformID.MacOSX:
    18.             case PlatformID.Unix:
    19.                 return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library/Logs/Unity/Editor.log");
    20.             default:
    21.                 throw new NotSupportedException("Platform " + Environment.OSVersion.Platform + " not supported");
    22.         }
    23. }
    24.  
     
    LuisEGV likes this.
  28. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    Relative path doesn't seem to be supported if I redirect the log using -logFile

    BetterBuildInfo: Unexpected error: System.IO.FileNotFoundException: output/raw_build.log does not exist
    File name: 'output/raw_build.log'

    Would this be an acceptable change?
    Code (CSharp):
    1. private static string EditorLogPath
    2.         {
    3.             get
    4.             {
    5.                 // first try to get it from the command line
    6.                 var args = System.Environment.GetCommandLineArgs();
    7.                 var logFileSwitchIndex = Array.FindIndex(args, x => string.Equals(x, "-logFile", StringComparison.OrdinalIgnoreCase));
    8.                 if (logFileSwitchIndex >= 0 && logFileSwitchIndex < args.Length - 1)
    9.                 {
    10.                     var path = args[logFileSwitchIndex + 1];
    11.  
    12.                     if (Path.IsPathRooted(path))
    13.                         return path;
    14.                     else
    15.                         return Path.Combine(Directory.GetCurrentDirectory(), path);
    16.  
    17.                 }
    18.  
    19.                 switch (Environment.OSVersion.Platform)
    20.                 {
    21.                     case PlatformID.Win32NT:
    22.                         return Environment.ExpandEnvironmentVariables(@"%LOCALAPPDATA%\Unity\Editor\Editor.log");
    23.                     case PlatformID.MacOSX:
    24.                         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.Personal), "Library/Logs/Unity/Editor.log");
    25.                     case PlatformID.Unix:
    26.                         return ReliablePath.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "unity3d/Editor.log");
    27.                     default:
    28.                         throw new NotSupportedException("Platform " + Environment.OSVersion.Platform + " not supported");
    29.                 }
    30.             }
    31.         }
     
    Last edited: Dec 23, 2019
  29. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    I haven't tested it recently, but a year ago or so there was no way to tell where the log is, if the path was relative. Basically Unity would create the log relative to your current working directory (say c:/users/foo) and then switch working directory to the project root (d:/src/bar), without indication. The solution was to pass the full path.

    Is it different now?
     
  30. JesseSTG

    JesseSTG

    Joined:
    Jan 10, 2019
    Posts:
    236
    When building my game via a library on the command-line, a build report is not generated despite the actual game being properly built.

    This is how I invoke Unity:

    Code (csharp):
    1. ~/Unity/Hub/Editor/2019.3.0f5/Editor/Unity -batchmode -projectPath . -silent-crashes -executeMethod sttz.Trimmer.Editor.BuildManager.Build -profileName DesktopDebugMono -buildTarget StandaloneLinux64 -quit -output Build/DesktopDebugMono/StandaloneLinux64/Chromavaders -nographics -logFile "$(pwd)/out.log"
    I build my game with Trimmer. The method
    sttz.Trimmer.Editor.BuildManager.Build
    is implemented here. I've attached my log to this post.

    Bottom line, the error received is
    The build seems to have failed or been interrupted
    , from
    BBI_BuildInfoProcessor.cs
    , line 105.
    BuildInfoProcessor.buildTimer
    seems to be running when it shouldn't. It's only cleaned up in
    BuildInfoProcessor.Dispose()
    , but when is that called?
     

    Attached Files:

  31. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    The current version needs you to call
    BetterBuildInfo.NotifyBuildEnded()
    , when run in batch mode. But don't bother - the version I am going to upload soon doesn't have this requirement any more. I am going to PM you a link to a new version with instructions.
     
  32. LogBeat

    LogBeat

    Joined:
    Mar 28, 2015
    Posts:
    1
    Hey Piotr,

    I'm experiencing issues trying to get the tool to analyze our project after the build is done.

    I'm getting the following exception:

    Code (CSharp):
    1. BetterBuildInfo: Unexpected error: System.ArgumentOutOfRangeException: Argument is out of range.
    2. Parameter name: index
    3.   at System.Collections.Generic.List`1[System.String].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:635
    4.   at GtmIBan2qTR9Wl2C57ABjn$tnVj9iZe92jIgcTY7kGzqq3ub5CES01wz77c86s3GgNbq5UikIqDKoH$Jsom3yNE.GDlRAy0BI37t6L62Emn5JEsOzNoOMQ8WYSM1Ml8iUMkS (System.Collections.Generic.Dictionary`2 , System.Collections.Generic.List`1 , .AlXNRSbp$OVlcEl2wtJ6GR2y2OSMUklLYqUOZ6SnlMSdWQOgub04_lt_$LXVgSuLUw , System.Collections.Generic.List`1 , System.Collections.Generic.List`1 , .ZyRaWXucCCF3HRrn76a90X1N0JT_hDIb4tcon21v3e4CR$Eiyu5Xq3xiWzpDg$O4Lg ) [0x00000] in <filename unknown>:0
    5.   at Better.BuildInfo.BuildInfoProcessor.UyNjcEmu5ubryw35Te5UXPkDRL9xUsCVlzGjh5hIIaZL (BuildTarget , System.String , System.Func`2 ) [0x00000] in <filename unknown>:0
    6. UnityEngine.Debug:LogError(Object)
    7. a_6ap3G0pZcXAt9vvop$IXBGbNmCLWRiyES2e2OYJQ_g:nC_Xz2BZ6T9gqaVg_yAX1oU(String, Object[])
    8. Better.BuildInfo.BuildInfoProcessor:UyNjcEmu5ubryw35Te5UXPkDRL9xUsCVlzGjh5hIIaZL(BuildTarget, String, Func`2)
    9. Better.BuildInfo.BuildInfoProcessor:LyTr7_hutXmHkvycvvYsvcE()
    10. Better.BuildInfo.PAUY_0jon17FAm7rPh3Z6NepbKMu6gnyCd6f2Erpj7YJgXpep5w9zL6F0Oya0arscw:kbl0rwcmrolhV4cD_NEznyk()
    11. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
     
  33. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Could you send me a log? Please enable debug logging first!
     
  34. RupeOxVR

    RupeOxVR

    Joined:
    Jul 18, 2018
    Posts:
    7
    A few questions prior to purchase...

    1. Has it been tested with 2019 LTS version of Unity?

    2. Are you able to give an idea of what impact it has on build times?

    3. There's a question above about Addressables which I can't see any answer to. Probably not a deal-breaker for us but would be interested to hear you thoughts.
     
  35. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Tests are all green for the 2019.4.

    It absolutely depends on the options you set. With everything enabled, for a very large projects it can take up to a few minutes. Overall not very long compared to the build times.

    That said, I personally find ANY delay annoying. The last thing I want to do when trying to pinpoint a bug is to wait even a few seconds for a report I am not going to have a look at. So what I usually do is I have the plugin disabled locally and enable it on build servers. Unless I want to see the report ASAP - then I enable it locally.

    Addressables present three problems actually:
    1) how big are the asset in the resulting asset bundles?
    2) where are the addressables "referenced"?
    3) how should addressables be treated in used/unused asset overlay?

    I have a rough version of 1) and 3) in the works (you're welcome to test it!), the 2) can be done, but it is going to be extremely slow (*everything* would need to be loaded and traversed), so it is likely not happening.
     
    mandisaw likes this.
  36. friuns3

    friuns3

    Joined:
    Oct 30, 2009
    Posts:
    307
    Hi is there way to show statics for asset bundle? after calling BuildPipeline.BuildAssetBundles
     
  37. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    The reason why this is not implemented is that AFAIK there are no callbacks to handle, so this feature would be intrusive (i.e. you'd need to replace BuildPipeline.BuildAssetBundles with something like BetterBuildInfo.BuildAssetBundles). It would also force getting back to the log-parsing days, which has problems of its own.

    What I am actually working on is inspecting asset bundles that get included in the player.
     
  38. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Any update on that? I only bought the asset to inspect assetbundles. I dont mind wrapping the build call to some custom api
     
  39. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Is inspecting asset bundles that are included in the player ok for you or do you expect a standalone asset bundle inspector?
     
  40. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    I think what is included in the player should be fine
     
  41. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    FYI I am testing the asset bundle parsing feature. If anyone's interested in pre-release testing, please PM me.
     
    mandisaw likes this.
  42. alpdogan

    alpdogan

    Joined:
    May 8, 2015
    Posts:
    10
    Hey, good work first of all.
    There are couple of things I want to point out:
    1. Videos are categorized as unknown and has wrong size in the Build Info.
    2. While it's good to know which Sprite Atlases are in the build, is there any way to track down individual sprites in the atlas?
    3. Do you plan to add support for Addressables?
     
  43. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    Hi, thanks :)

    1. Yes, I might have missed videos when preparing categories. Still, you can add one yourself. Go to settings and simply add an entry to
    Categories
    array. Something like this:
    upload_2020-12-17_13-48-53.png

    2. Sprites are not assets per se; you can still track how they are being used by tracking their source textures.

    3. There are two problems that need to be solved to have full Addressables support:
    a) Parse resulting bundles and include them in a report: this is already kind of done if you enable
    Check Asset Bundles
    and set up
    Asset Bundle Filters
    to match where Addressables happen to exist in the build.
    b) Trace Addressable "references": this is going to be extremely slow, as every prefab and every scene would have to be loaded and checked for any possible addresses. I have it in my backlog, but I don't know if this is going to be doable in the end.
     
    mandisaw and alpdogan like this.
  44. MultivariousDev01

    MultivariousDev01

    Joined:
    May 22, 2014
    Posts:
    28
    Super minor note. Unity's been giving these (attached image) compiler warnings for BBI

    (In Better.BuildInfo.Internal.UnityVersionAgnostic; function IsUsingLegacySpriteAtlases)

    I changed that function to return 'false' under the assumption that I won't ever be using legacy sprite atlases so it will never come up.

    Again, super minor thing. I'm just a stickler for a clean console :)
     

    Attached Files:

  45. Xnite

    Xnite

    Joined:
    Oct 3, 2015
    Posts:
    5
    Great asset.

    Question. In the Overview tab > Size Overview > What is the Unaccounted category?

    Unaccounted makes up a large percent of my total size and I'm curious if I can do anything about it? Additionally some of my recent optimizations seem to reduce the Assets size but add most of it back in additional unaccounted size?
     
  46. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    @Xnite Unaccounted is basically the difference between the actual build size and the sum of sizes of everything BBI was able to interpret. What platform is the build for? Can you inspect it manually?
     
  47. Xnite

    Xnite

    Joined:
    Oct 3, 2015
    Posts:
    5
    @gwiazdorrr Build is for Android. Standalone build has a much smaller unaccounted percent. 5% vs 70%. Similar overall size. I noticed on Android build the runtime is coming in at 0%. Could this be a large part of the unaccounted?

    Not sure how to inspect Android build manually?
     
  48. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    To inspect a build manually, you need to look into apk/obb/abb archives (with 7-zip, for example).

    That said, I believe that you build App Bundle (.aab) - I've just noticed current BBI version has a bug that prevents these from being properly analysed. A fixed version should be available once it goes through the Asset Store pipeline (a day or few).

    In the meantime build a regular .apk, the results should be close to identical to what you'll get with .aab, once the fix comes through.
     
  49. Xnite

    Xnite

    Joined:
    Oct 3, 2015
    Posts:
    5
    Okay great. Thanks for the info. Will look out for the fixed version too.
     
  50. gwiazdorrr

    gwiazdorrr

    Joined:
    Sep 29, 2014
    Posts:
    102
    @Xnite It should be live already.