Search Unity

Build Report Tool - Track files in your project that need slimming down!

Discussion in 'Assets and Asset Store' started by AnomalusUndrdog, Apr 14, 2013.

?

How much would you be willing to pay for this?

Poll closed Oct 26, 2015.
  1. $2

    23.5%
  2. $5

    50.0%
  3. $10

    26.5%
  1. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    zubairhamed likes this.
  2. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
    @AnomalusUndrdog
    Thank you very much.
    I neglected to mention I'm on Windows 10, if that is of any consequence.
     
  3. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @FuguFirecracker: I found and fixed the bug! It'll take a week or two before the bugfix update will go live in the Asset Store.

    @Tinjaw: Hopefully, the bug you encountered is the same as the one I just fixed. Please do test it when you get the new version.

    If either of you are in a hurry, I can send you a .unitypackage of the bugfix version immediately via email. Just email me the invoice number of your purchase of Build Report Tool for verification. (My email's in the plugin's readme)
     
  4. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
  5. FuguFirecracker

    FuguFirecracker

    Joined:
    Sep 20, 2011
    Posts:
    419
    And... It works. Thanks so much for the quick fix !
     
  6. Tinjaw

    Tinjaw

    Joined:
    Jan 9, 2014
    Posts:
    518
    I'm in no hurry. I can wait for the Asset Store. Thanks for the support.
     
  7. Lszt

    Lszt

    Joined:
    Sep 28, 2015
    Posts:
    38
    I get some weird issue since I upgrade to Unity 5.1.X (I was in Unity 4.6.X before). All the informations in the overview and all others tab seems to be corrupted :/.
    The report tools didn't find the correct elements in my build too so the size is wrong all the element indicated as not my build are wrong :(

    Ok nevermind, maybe it's due to my Build Report Tools version. I'm currently in 3.0. I will try an update before report something else ;).
    I remember I helped you with some patchs with Unity 5 so it seems really weird I didn't see the issues at this time.
     
    Last edited: Sep 28, 2015
  8. Tatanan

    Tatanan

    Joined:
    Jun 9, 2014
    Posts:
    9
    Hi,
    I have have just buy Build Report Tool but it doesn´t works. After builds it does nothing.
    I have tried everything to make it runs but nothing. It says: "No Buils info".And when "Get Log" is pressed an info warning is shown on Console: "Build Report Tool: No build info found. Build the project first. If you have more than one instance of the Unity Editor open, close all of them and open only one."
    Even with "Automatic show Build Report Window after build" setted to Always, Build Report windows is never launched.


    Testest on Unity 5.2.1p1 MacOX (pro licence).

    Thanks
     
  9. crudeMe

    crudeMe

    Joined:
    Jul 8, 2015
    Posts:
    92
    Hi! Didn't buy it yet and wanna know if I can get reports for assetbundles in similar way? There are times, when you build your levels as downloadable content. In pre 5.0 asset bundles system we were able to get such info, but sadly not after unity upgrade.
     
  10. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Something is really screwy with the Unity 5.2 editor.log file. Sometimes I build and it's 800KB. Then I build again and it grows to 1,400KB. But the editor-prev file is still only 275KB. I close Unity, delete editor.log, rebuild and it's 252KB. What the heck? I haven't tested with BRT uninstalled though.

    I also notice that the editor.log file is also getting truncated when I have Build Report Tool set to automatic, which results in the 'no build info' issue. My log file sometimes is 80KB.

    Right now Build Report Tool works fine if I just run it manually.
     
  11. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I'm afraid not, I haven't tried making Build Report Tool make reports on asset bundles yet. I may add support for it in the future. For now, my focus is on the bug reports with Build Report Tool.
     
    crudeMe likes this.
  12. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, are you using the latest version (3.0.13) of Build Report Tool? I fixed a similar bug in the latest version.

    If the latest version doesn't fix it, I can diagnose the problem but I'll need a copy of your editor.log file so I can recreate the problem on my end. You can send it here or email it to me if you prefer (my email is in the Build Report Tool readme). Just do a build as usual, so the editor.log file will have the build data inside, then send that file. If you close and re-open Unity, the editor.log file will be cleared, so don't do that yet.

    Your editor.log file should be in ~/Library/Logs/Unity/Editor.log (See manual page: http://docs.unity3d.com/Manual/LogFiles.html)
     
  13. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    That's strange. The auto-report generation simply does the same thing as clicking the "Get Log" button, only it does it immediately after a build, using [UnityEditor.Callbacks.PostProcessBuild] (See manual page: http://docs.unity3d.com/ScriptReference/Callbacks.PostProcessBuildAttribute.html)

    Can you try giving me copies of those editor.log files that have varying sizes? I can try looking into them to see what's wrong. You can either attach them here or send me an email, if you prefer.
     
  14. gekidoslair

    gekidoslair

    Joined:
    Sep 7, 2012
    Posts:
    128
    testing with 5.3 beta, apparently they've marked a few things obsolete without warning:

     
  15. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Alright, good to know. Thanks for the heads-up!
     
  16. netics

    netics

    Joined:
    Aug 23, 2011
    Posts:
    102
    Hello.

    I want to get the build report for android build.
    I pressed "Get Log" button after building android apk.

    But the report always have the flag, UNITY_EDITOR, UNITY_EDITOR_WIN, .... in Project Settings - Code Settings section.
    Used assets sectoin include for Editor/Resources folder assets, too.

    Is this report correct?
     
    Last edited: Nov 12, 2015
  17. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I'm not sure. Maybe it's catching the wrong build data. The Build Report Tool can't distinguish between multiple Unity Editor instances (they all write to the same Editor.log file), so if you had more than one Unity Editor running during the time, try again with only one Unity Editor running.

    If that's not the case, can you give me a copy of your Editor.log file upon building the apk? I will try to see what's wrong.

    Just do a build as usual, so the Editor.log file will have the build data inside, then send that file. If you close and re-open Unity, the editor.log file will be cleared, so don't do that yet.

    The Editor.log file should be in your C:\Users\your username\AppData\Local\Unity\Editor\Editor.log (See manual page: http://docs.unity3d.com/Manual/LogFiles.html)

    I'll try to experiment on this. I'm still downloading the Android SDK. I'll let you know how it goes.


    As a rule, all assets in a Resources folder will *always* be included in your build.

    But I don't know if putting them in an Editor folder overrides that rule.

    So I made some experiments. I put some assets in an Editor/Resources folder (an animation, a physic material, and a material).

    In Unity 5.0, they don't get included in the build. But in Unity 5.2.2 (and 5.1.2), they actually do get included.

    Seems the rules got slightly changed somehow, or maybe there was some bug in Unity 5.0 that got fixed in 5.1. I checked the release logs, but I couldn't find anything that mentions about this.

    Regardless, if an asset is in an Editor folder, if you use it explicitly (like a material file in an Editor folder, but you used that material in a 3d model that's in the scene, and that scene is included in the build) then it will get included, since Unity detected that you're using it.
     
  18. netics

    netics

    Joined:
    Aug 23, 2011
    Posts:
    102
    It's not the case of multi unity editor instance.
    It's not the case of explicit referencing to Editor/Resources folder assets.

    I sent you the log file by the mail.

    Wow, you revealed a big bug.
    I think it's an important bug.
     
  19. messi.unity.dev

    messi.unity.dev

    Joined:
    Dec 9, 2015
    Posts:
    1
    I'm using Build Report Tool 3.0.10 on Unity 4.6.5p3
    The bellow error occured after i import the asset.
    Assets/BuildReport/Scripts/Editor/ReportGeneration/BRT_UnityBuildSettingsUtility.cs(224,64): error CS0117: `UnityEditor.PlayerSettings' does not contain a definition for `enableCrashReportAPI'
    Please tell me how to fix this.
     
  20. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Sorry, I'll work on a fix for that soon, for now, you can simply delete that line of code, it's not a critical part of the build report.

    To everyone else: I'll also make sure to keep Build Report Tool compatible with Unity 5.3, I'll work on it soon!

    EDIT: I've submitted a version update. It should go live in the Asset Store in 1 to 2 weeks.

    If any of you need it urgently, I can send a copy in email. I just need the invoice number of your purchase of Build Report Tool for verification. You'll find it in the receipt pdf attached in the email Unity gives you after your purchase. Send me an email.

    Sorry about all the delays, everyone!
     
    Last edited: Dec 13, 2015
    actraiser3 likes this.
  21. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    what your email address?
     
  22. tripknotix

    tripknotix

    Joined:
    Apr 21, 2011
    Posts:
    744
    also if i dont have the email anymore, how do i retrieve it?
     
  23. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, sorry for the late reply (internet connection was down). Try updating via Asset Store now. 3.0.14 has been released which gives Unity 5.3 compatibility. Just post here if there's still any problems with it.
     
  24. Gaurav-Gulati

    Gaurav-Gulati

    Joined:
    Sep 22, 2014
    Posts:
    52
    Hi,
    Build report tool excludes the textures/models size present in Resources folder?
     
  25. Left-Hand-Side

    Left-Hand-Side

    Joined:
    Dec 31, 2015
    Posts:
    1

    You can check "BRT_ReportGenerator.cs" file, line 496
    Code (CSharp):
    1. const string ASSET_SIZES_KEY = "Used Assets, sorted by uncompressed size:";
    change it to this:
    Code (CSharp):
    1. const string ASSET_SIZES_KEY = "Used Assets and files from the Resources folder, sorted by uncompressed size:";
    Maybe it's OK, I found this bug and FIX IT.
    Now, Everything is OK for me.
     
  26. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi Gaurav,

    Thanks for reporting this. I just did some tests. Seems that at one point in a Unity 5 version update, "Resources" assets don't show up in the build log anymore. I'll update the code to fix this.

    EDIT: Build Report Tool 3.0.15 fixes this issue and has been released
     
    Last edited: Jan 9, 2016
  27. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I actually fixed this in version 3.0.13, you can also try updating to that version.
     
  28. Gaurav-Gulati

    Gaurav-Gulati

    Joined:
    Sep 22, 2014
    Posts:
    52
    Thanks,Let me know when its done.
     
  29. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Ok I've sent an update to fix the problem. It should go live in 1-2 weeks. You can message me if you want a copy already, I can send you a .unitypackage file. Just send me either in email or private message your invoice number for verification.

    EDIT: Build Report Tool 3.0.15 has been released
     
    Last edited: Jan 9, 2016
  30. GXMark

    GXMark

    Joined:
    Oct 13, 2012
    Posts:
    515
    I'm using unity 5.3.1p3 and the build report tool no longer is working

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2.   at BuildReportTool.BuildInfo.GetSizeSumForUsedAssets (System.String assetFolderName, System.Func`2 fileTypePredicate) [0x00014] in C:\Unity Projects\virtuosoclient 0.2.4\Assets\BuildReport\Scripts\Editor\ReportData\BRT_BuildInfo.cs:183
    3.   at BuildReportTool.BuildInfo.FixSizes () [0x00000] in C:\Unity Projects\virtuosoclient 0.2.4\Assets\BuildReport\Scripts\Editor\ReportData\BRT_BuildInfo.cs:137
    4.   at BuildReportTool.ReportGenerator.OnFinishedGetValues (BuildReportTool.BuildInfo buildInfo) [0x00040] in C:\Unity Projects\virtuosoclient 0.2.4\Assets\BuildReport\Scripts\Editor\ReportGeneration\BRT_ReportGenerator.cs:1862
    5.   at BRT_BuildReportWindow.OnFinishGeneratingBuildReport () [0x00000] in C:\Unity Projects\virtuosoclient 0.2.4\Assets\BuildReport\Scripts\Editor\Window\BRT_BuildReportWindow.cs:304
    6.   at BRT_BuildReportWindow.Update () [0x00014] in C:\Unity Projects\virtuosoclient 0.2.4\Assets\BuildReport\Scripts\Editor\Window\BRT_BuildReportWindow.cs:84
     
  31. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Alright, I'll look into that. I'll need a few days to go and download Unity 5.3.1p3 to test it (internet is slow here).
     
  32. Eknoes

    Eknoes

    Joined:
    Sep 15, 2015
    Posts:
    56
    Build report tool is also broken in 5.4.0b10

    For example:
     
  33. 109383670

    109383670

    Joined:
    Aug 1, 2014
    Posts:
    1
    unity 5.3.4f1, can't work.
    Always display getting values.
    Hope fixed.
     
  34. poyu1219

    poyu1219

    Joined:
    Sep 2, 2013
    Posts:
    1
    Hope fixed.
     
  35. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, I've submitted a version update that fixes these errors, it will take about 1 to 2 weeks until it goes live in the Asset Store. If anyone needs it urgently, PM me your invoice number (found in the pdf attached in an email when you purchased Build Report Tool) and I'll send you a .unitypackage.
     
  36. Demigiant

    Demigiant

    Joined:
    Jan 27, 2011
    Posts:
    3,242
    Hi,

    First of all, this is awesome. I have it since you released it first, but for some reason I got to use it only now (idiot me).

    I have one question though. I noticed that, in the "Used Assets" panel, you include also those assets that are tagged as "EditorOnly", while in that case Unity does not include them in the build. Any chance this could get a fix? Unless I'm missing something.

    Cheers,
    Daniele
     
  37. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I'll look into that when I get the time, but basically, if the build log mentions the file, it means it got included into the build somehow.

    If it's something like a 3d model or image, maybe one of your game objects or prefabs was using it even if you didn't mean to.

    If it's a script, then if one of your runtime scripts is using it (and granted if it compiles to the build without errors), then it'll get included even if you didn't mean to.

    I haven't been using the tag system that much, but when I get the time, I'll do some experiments to see if "EditorOnly" assets really get in the build or not.
     
  38. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    When I have been trying to use this recently the build window wont show up any info after a build. I am using Advanced Builder to perform the build operations for me, any reason why they wouldn't work together?
     
  39. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I always try my best to keep Build Report Tool compatible with custom build plugins, but it's possible an update on any of them breaks things in Build Report Tool.

    I will look into this when I get the time.

    What's the version of Unity that you use, and what's your operating system? Also, what version of Advanced Builder are you using?
     
  40. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Unity 5.3.4 (release or patches), latest Advanced Builder, OSX.

    Thanks for looking into it, ill try it again later. Could it be an issue of where the builds get placed?
     
  41. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Actually I fixed a bug related to that recently. Please make sure you're using the latest version of Build Report Tool (3.0.18).

    If that doesn't fix it, please show me if there's any error messages that come out when Build Report Tool refuses to work.
     
  42. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    Awesome, thanks. Ill give this a test as soon as I can on a project.
     
  43. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    So after checking, the report is being generated by my "Total Build Size" for iOS is reporting as 0B.

    I also have a quick questions regarding file sizes. The reported size, is that the actual included size of the texture inside the build? So if its reported as 12mb, it will be 12mb of space inside my build?
     
  44. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    281
    Hi,
    What is the purpose of the "Recalculate Imported Sizes" button in the Used Assets section?

    Thanks
     
  45. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Yes, for some reason, calling BuildPipeline.BuildPlayer won't update the build size, so I'm forced to report the build size as 0. I don't know if this was a change in the Unity API.

    Generally speaking, yes. The file sizes in the build report are the sizes of the files as they get packaged into the build.

    But for some platforms, they process the files further. For example, if you build the game for Unity's Web Player, Unity compresses everything into a .unity3d file, and it performs solid compression on all the assets, so you won't exactly be able to quantify the size of each individual asset anymore. Last I built a project for iOS, I think the assets are packed in solid compression as well.
     
  46. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    It's for in case the size was changed while you're viewing the build report and want to see the new size. For example, if you changed the import settings to an image, like change it from compressed to an uncompressed format, the imported size will change. Build Report Tool won't try to detect the change automatically since that will make it slow, so I decided to have a manual update button instead.
     
  47. mimminito

    mimminito

    Joined:
    Feb 10, 2010
    Posts:
    780
    I did some tests and tried many different formats, sizes and packing of textures in a standalone project for iOS. I got varied results, but the build was never as large as I expected. For example Build Report states the textures are 27.3 MB, but after doing an archived build on iOS the result is around 18 MB.

    Just trying to figure out the actual size of these textures in builds to try and do some optimisation.
     
  48. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Then my guess is it's likely doing some form of solid compression, as that method will indeed reduce the final file size further.
     
    Last edited: Apr 23, 2016
  49. nxtboyIII

    nxtboyIII

    Joined:
    Jun 4, 2015
    Posts:
    281
    Ok that's what I thought, but when I change the size and press the button, it doesn't update. :/
     
  50. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hmm, if you edited the file outside of Unity, make sure it got re-imported (the progress bar for importing pop up). In those cases I usually need to alt+tab in and out of the Unity editor a few times.

    If you changed the import settings, make sure you click the Apply button.

    Other than that, I'm not sure what other reasons may be for that happening. I'll look into it when I get the time.