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. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello;

    Build report doesn't show any textures in the used assets list. And it says "Shaders are the largest" in main window because of that, but it's incorrect.

    I am using unity 5.5.3f1 and standalone build. Build Report is version 3.2.1

    It shows textures only in the unused assets section. And it shows some small textures only in the actual build report.

    How can I solve this problem?
     
  2. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Send me the Editor.log file after it exhibits the bug, so I can check it out. I aim to recreate the bug on my PC so I can investigate it further.

    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, or ~/Library/Logs/Unity/Editor.log for Mac (See manual page: http://docs.unity3d.com/Manual/LogFiles.html)
     
  3. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Hi @AnomalusUndrdog

    Build report doesn't working for me for a while, using Unity 5.5.3p2 with latest Build Report. It's hanging at "Getting build sizes" stage and I've noticed following error in unity editor logs.

    Can you please take a look?
     
  4. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, I believe that's similar to the bug reports I received lately. If so, that's already fixed. I've also submitted a new version to the Asset Store about 2 days ago (version 3.2.2). It should go up in 1 to 2 weeks.

    Just to be sure, and if you want, send me a copy of your Editor.log file so I can try to recreate the problem you're having.
     
  5. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    Thank you, I hope new version should do it. I'll send the log if it's not...
     
  6. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Version 3.2.2 is out and fixes bugs that people have reported.



    The new option "Show calculated sizes of Used Assets instead of reported sizes" should fix the problem with the build report showing incorrect file sizes on assets. This is a workaround for bug 885258. Take note that this bug has been fixed in the upcoming Unity 2017.1, in Unity 5.5.3p1 and 5.6.0p1. The new option is there for people who can't upgrade to the newer Unity versions.

    This version also fixes the bug with getting stuck in "Getting build sizes...".

    @sergi-gil, @XSUnity, @arlevi09, @PixelEnvision: Please try out the updated version and see if that fixes your problem. Let me know if it doesn't work.
     
  7. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Meceka: I haven't received a reply from you but try to update to the latest version and see if that fixes your problem. Let me know if it doesn't work.
     
  8. PixelEnvision

    PixelEnvision

    Joined:
    Feb 7, 2012
    Posts:
    513
    It's working now, thank you. :)
     
  9. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    319
    Confirmed, asset is now working again in 5.6.0p3! Thanks :)
     
  10. coshea

    coshea

    Joined:
    Dec 20, 2012
    Posts:
    319
    Feature request, history graph :) Store the total build size and category (file type) sizes (not individual files) then show a graph of build sizes over time.
     
  11. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hmm, do you mean this to be for multiple build reports?
     
  12. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi,

    I have Build Report Tool v3.2.2 and Unity 5.6.0p3 and I'm getting stuck in "Getting build sizes..."

    Am I the only one?
     
  13. Hades714

    Hades714

    Joined:
    Oct 28, 2012
    Posts:
    7
    Hello!

    Updated the asset (in my projects) to v3.2.2 but the Build Report will not progress further than "Getting build sizes...".
     
  14. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Nadan @Hades714: Sorry about that. Please send me the Editor.log file after you build your Unity project, so I can check it out. I aim to recreate the bug on my PC so I can investigate it further.

    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, or ~/Library/Logs/Unity/Editor.log for Mac (See manual page: http://docs.unity3d.com/Manual/LogFiles.html)

    Either send me via email (my email's in the plugin's readme) or private message here in the forums.

    @Hades714: What version of Unity are you using, by the way?
     
  15. Hades714

    Hades714

    Joined:
    Oct 28, 2012
    Posts:
    7
    @AnomalusUndrdog No problem; I sent you a private message (At least I think I did, because I do not understand how this forum works yet).
    I am using Unity 5.6.0p4 (it came out yesterday). I have been experimenting with my project settings to see if there's something on my end that's causing this bug- but no success yet.
     
  16. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Yeah, I got your message in the Conversations. I think I narrowed down the cause. Seems to be a bug in the Unity patch versions. I'll update Build Report Tool soon for this.
     
  17. Hades714

    Hades714

    Joined:
    Oct 28, 2012
    Posts:
    7
    Good to hear! Can't wait. :)
     
  18. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Just checked the latest version on my Mac with 5.6.0p4. Works great!
     
  19. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Nadan @Hades714: Version 3.2.3 is out. Please go ahead and try it out and see if it fixes your problem.
     
    Nadan likes this.
  20. Hades714

    Hades714

    Joined:
    Oct 28, 2012
    Posts:
    7
  21. GarretPolk

    GarretPolk

    Joined:
    May 26, 2013
    Posts:
    49
    Found an unhandled exception. Maybe they changed the sprite packer names slightly?

    BRT version 3.2.3
    Unity 5.6.1

    Unhandled ArgumentOutOfRangeException in BRT_Utils.cs : line 799
    assetPath = "Built-in Texture2D:"

    Editor log:

    Used Assets and files from the Resources folder, sorted by uncompressed size:
    29.3 mb 1.$% Built-in Texture2D:
    4.0 mb 1.$% Built-in Texture2D: SpriteAtlasTexture-game-2048x2048-fmt12
     
  22. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Ok, thanks for the message. I'll look into this soon.
     
  23. Tommygat

    Tommygat

    Joined:
    Mar 12, 2015
    Posts:
    5
    Hello,

    I bought the Build Report Tool two days ago and installed v3.2.3 to Unity 5.5.2f1.

    Clicking on the "Used Assets" tab after a build only shows a blank screen and an endless stream of this error in the console:

    ArgumentOutOfRangeException: Cannot be negative.
    Parameter name: length

    I have tried tweaking the settings and rebuilding many times but no luck. I noticed what looks like some garbled lettering and an unusable x button compressed right beneath where it is titled "Build Report" in the upper left corner.

    The only thing usable is the navigation buttons and they are cropped in half by the top of the screen. Resizing the screen does nothing and the menu and arrow button at the upper right do nothing.

    All of the other features and screen layouts of the asset seem fine.

    Is there anything that can be done do to fix this?
     
  24. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    This sounds similar to the problem that NunSuperior mentioned (The Used Assets tab also shows a blank screen in that situation). If so, I've already submitted a bugfix to the Asset Store which should go live in a week or so.

    If you want, send me your Editor log so I can be sure.

    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, or ~/Library/Logs/Unity/Editor.log for Mac (See manual page: http://docs.unity3d.com/Manual/LogFiles.html)

    Either send me via email (my email's in the plugin's readme) or private message here in the forums.
     
  25. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Tommygat @NunSuperior Version 3.2.4 is out and should fix the problems you are having. Please let me know if it doesn't work. Thanks!
     
  26. Tommygat

    Tommygat

    Joined:
    Mar 12, 2015
    Posts:
    5
    Deleted 3.2.3 and installed 3.2.4 and everything works perfectly. Wow. My 250mb project is now down to 98mb. :D
     
    AnomalusUndrdog likes this.
  27. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    I get this error scene



    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.
    UnityEngine.Debug:LogWarning(Object)
    BuildReportTool.ReportGenerator:RefreshData(BuildInfo&) (at Assets/BuildReport/Scripts/Editor/ReportGeneration/BRT_ReportGenerator.cs:1978)
    BRT_BuildReportWindow:Refresh() (at Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs:295)
    BRT_BuildReportWindow:DrawTopRowButtons() (at Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs:576)
    BRT_BuildReportWindow:OnGUI() (at Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs:635)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  28. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Have you built your Unity project? Build Report Tool will obtain the data after the project has been built.
     
  29. udede

    udede

    Joined:
    Jul 26, 2011
    Posts:
    72
    sorry what is Unity project?
     
  30. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Your Unity project is your game, inside Unity.

    Build Report Tool will work after you click "Build", or "Build and Run":

     
  31. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    240
    need to add setup to increase the top of largest file and option to select file with shift and click because now when want to select file to delete unused assets is select all
     
  32. fornetjob

    fornetjob

    Joined:
    Sep 11, 2014
    Posts:
    27
    After build i have some built-in texture, but i do not found it.
    Where i can find this texture?

    upload_2017-8-3_18-18-13.png
     
  33. fornetjob

    fornetjob

    Joined:
    Sep 11, 2014
    Posts:
    27
    It is default sprite packer.
     
  34. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, I'll try adding those suggestions in a new version update when I can. Thanks!

    Yes those are from your 2d sprites, packed by Unity into a single texture. I'm not sure how you can see that resulting texture since I'm not familiar with the 2d tools. But I think you can tweak this atlas using the Sprite Packer (https://docs.unity3d.com/Manual/SpritePacker.html) and/or the Sprite Atlas settings (https://docs.unity3d.com/Manual/SpriteAtlas.html)
     
  35. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    240
    Will be awesome because will clean much faster the project(Please add fast as you can xD), your plugin is the best on market , keep working and add new feature in future, i have a little bug also = when i delete all unused file also deleted me prefab from bullet , texture hand , im using unity 5.5.3f1, Thanks.
     
  36. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @mentolatux

    I have a version update coming up. It will change the behaviour of asset selection to be more like how file explorers work:

    Click to select, ctrl + click to toggle selection, shift + click to select all from previously clicked to the current one.



    The checkbox for selection is replaced with a "Ping" button, which will show the asset in the project window.

    You can now also change the number of displayed entries in the Top Largest Used/Unused Assets in the Overview screen:


    Also fixed a bug with Top Largest Assets not showing the same file size as those in the Used/Unused Assets List screens.

    I've already submitted this to the Asset Store, so hopefully it'll go live in 1 to 2 weeks.

    EDIT: Version 3.3 is out!
     
    Last edited: Aug 29, 2017
    littlewormcug and kenshin like this.
  37. mentolatux

    mentolatux

    Joined:
    Nov 2, 2014
    Posts:
    240
    good job bro is what im looking, im very happy now, ill download soon . thanks for added like i tell you
     
  38. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    @AnomalusUndrdog
    I have used the BRT to get a report for my project. But I want my teammates to see the right report together, so maybe I tansfor the report as a common file formate (for example .txt or .html), I can post the file on a web server. That way we can disscuss the report at the same time.
    So can I do this with BRT?
     
  39. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Right now the reports are saved as XML files. You can view those in notepad and it will be readable, but it won't look fancy. If it's a priority for you, I can try working on an web browser-based viewer for those xml files.
     
  40. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    Appreciation for your reply。In fact, I need to post the build report on my web server for the requirement of my co-worker.The report content of Build Report Tool is exhaustive, is very useful for us.
    So if you can ,please try wrorking on this function.I think it is very useful for team work.Thank you.
     
  41. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    @AnomalusUndrdog
    Hi, I use the commandline to build my unity project, and the commandline is as follow:
    /Applications/Unity/Unity.app/Contents/MacOS/Unity --importPackage {BuildReportToolsPath} --projectPath {projectPath}

    But, after build this, the logfile : ~/Library/Logs/Unity/Editor.log do not change, the .xml file do not generated too.

    As a comparison, In File/Build Setting, and chose platform IOS, I can get the .xml file.

    So, what's the problem?
     
  42. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I don't think you should do a --importPackage each time, as that imports the package every time. You should only import a package to the project once.

    A typical command line way to build would look like this:
    /Applications/Unity/Unity.app/Contents/MacOS/Unity -quit -batchmode --projectPath {projectPath} -executeMethod MyEditorScript.MyMethod

    (Notice that there's no mention of Build Report Tool in the command line at all.)

    MyEditorScript would be a script in your project that would typically look like this:
    Code (CSharp):
    1. using UnityEditor;
    2. class MyEditorScript
    3. {
    4.      static void PerformBuild ()
    5.      {
    6.          string[] scenes = { "Assets/MyScene.unity" }; // include the rest of the scenes here
    7.          BuildPipeline.BuildPlayer(scenes, "BuildOutputFolder",
    8.                        BuildTarget.StandaloneOSXUniversal, BuildOptions.None);
    9.      }
    10. }
    There's no need to activate Build Report Tool from that script since it will automatically generate a report after a build (it makes use of PostProcessBuildAttribute to get notified after a build has been made). Unless Build Report Tool was disabled from doing this in the options, so make sure it is checked as well:

     
    littlewormcug likes this.
  43. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8

    Thanks for your reply.
    I think I should describe the process of my automatic building.
    1. Fetch changes from the remote Git repository, and the Build Report package imported last time would be removed.

    So, I use --importPackage each time to make sure the tool is in the project.

    2. Use the command line way to build the project.
    And I use -executeMethod BuildPackage_iOS to run my script. The "BuildTarget" and "ProjectPath" is defined as follow:
    PlayerSettings.SetApplicationIdentifier( build_target == BuildTarget.iOS ? BuildTargetGroup.iOS : BuildTargetGroup.Android, bundle_id );

    string build_message = BuildPipeline.BuildPlayer( _GetScenePaths(), target_path, build_target, build_option );
    The BuildTarget and targetPath is defined .

    3.Use XCode and make plist

    Above all, I can get a .ipa package. But I can not get the Editor.log file and .xml report file. It confused me a lot, why I build manually ,the Editor.log generated normally, but command line way don't.
     

    Attached Files:

  44. Lszt

    Lszt

    Joined:
    Sep 28, 2015
    Posts:
    38
    Quite strange cause I use the command line a lot. I have a huge builder process based on command line and I can get an Editor.log file and create it anywhere I want. Cause after the building I parsed it and send it by mail if there is some error message in it.
    Earlier this year, I used Build Report Tools with my process and all was generated nicely even in command line so it's quite odd that didn't work for you :/
    I stop using it cause unity seems to think my licence isn't bought on the store whereas it isn't true... anyway your system must work with this awesome tool !
     
  45. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, apologies for the delays in replies. Incredibly busy at work right now prepping for a convention booth. But when I get the time I will try to recreate your situation so I can diagnose the problem easier.

    I checked Build Report Tool's source code a bit and I remembered, it doesn't allow itself to activate during batch mode builds by default. (I set that to false by default because some customers complained about it).

    What you can try is to create a Build Report Options file with batch-mode-use set to true. You can put it in your home/My Documents folder as that is one of the locations that Build Report Tool will look for it:

    1. Add a folder in your home directory called "UnityBuildReports" if there isn't any yet (it has to be this name because that is where it is searched for).
    2. Inside that folder create an xml file named "BuildReportToolOptions.xml" (again it has to be this name).
    3. Then copy-paste this into the xml file (I tried attaching this file to my post but it seems Unity forum doesn't allow attaching xml files):

    Code (JavaScript):
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <BuildReportToolOptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    3.   <EditorLogOverridePath />
    4.   <IncludeSvnInUnused>true</IncludeSvnInUnused>
    5.   <IncludeGitInUnused>true</IncludeGitInUnused>
    6.   <AllowDeletingOfUsedAssets>false</AllowDeletingOfUsedAssets>
    7.   <CollectBuildInfo>true</CollectBuildInfo>
    8.   <BuildReportFolderName>UnityBuildReports</BuildReportFolderName>
    9.   <SaveType>0</SaveType>
    10.   <FilterToUseInt>0</FilterToUseInt>
    11.   <AssetListPaginationLength>100</AssetListPaginationLength>
    12.   <UnusedAssetsEntriesPerBatch>1000</UnusedAssetsEntriesPerBatch>
    13.   <NumberOfTopLargestUsedAssetsToShow>20</NumberOfTopLargestUsedAssetsToShow>
    14.   <NumberOfTopLargestUnusedAssetsToShow>3</NumberOfTopLargestUnusedAssetsToShow>
    15.   <IncludeUsedAssetsInReportCreation>true</IncludeUsedAssetsInReportCreation>
    16.   <IncludeUnusedAssetsInReportCreation>true</IncludeUnusedAssetsInReportCreation>
    17.   <IncludeUnusedPrefabsInReportCreation>true</IncludeUnusedPrefabsInReportCreation>
    18.   <IncludeBuildSizeInReportCreation>true</IncludeBuildSizeInReportCreation>
    19.   <GetImportedSizesForUsedAssets>true</GetImportedSizesForUsedAssets>
    20.   <ShowImportedSizeForUsedAssets>false</ShowImportedSizeForUsedAssets>
    21.   <GetImportedSizesForUnusedAssets>true</GetImportedSizesForUnusedAssets>
    22.   <GetProjectSettings>true</GetProjectSettings>
    23.   <AutoShowWindowAfterNormalBuild>true</AutoShowWindowAfterNormalBuild>
    24.   <AutoShowWindowAfterBatchModeBuild>true</AutoShowWindowAfterBatchModeBuild>
    25.   <UseThreadedFileLoading>false</UseThreadedFileLoading>
    26. </BuildReportToolOptions>
    Notice that AutoShowWindowAfterBatchModeBuild is set to true, this is what's needed to make it work I believe. Disregard the fact that it's named AutoShowWindow, no window will be shown in batch mode build if it's all in command line, just a bad variable naming decision on my part.

    This xml is auto-generated with default values into a project's ProjectSettings folder if it isn't found yet, but since your setup requires not keeping BRT inside the project, putting this xml file into your home folder might be more suitable.
    ___________________________________

    If somehow that doesn't work, you can try forcing that variable to true by editing the source code in the file BuildReport/Scripts/Editor/Options/BRT_Options.cs, line 52:



    Set that variable to true.

    If all of that still doesn't work, let me know, and I will look further into it.
     
    Last edited: Oct 25, 2017
  46. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    Thank you a lot.
    I have found the reason why I couldn't get the Editor.log file after auto building.My auto build script will execute two function with the command argument "-executeMethod",one function is "-executeMethod BuildPackage",and the other is "-executeMethod UploadPackage".In function "BuildPackage", BuildPipeline.BuildPlayer will execute to build the project, but function "UploadPackage" just upload the package after building and don't call BuildPipeline.BuildPlayer .
    So,if I just execute "BuildPackage",the Editor.log is normal,information about the building package is included.But if I execute "UploadPackage" after "BuildPackage",the Editor.log won't include those information.
    I will continue this auto build work,and want to learn more about this awesome tool.Do you have
    illustration document for this tool? I want learn more the process and method about how to collect package information in building.Thank you a lot.
     
  47. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    Oh,I think I am doing the similar things with you.Now my work is to use command line to build a project automatically,then send a message include compile error(if any) and build package report information.
    Can you get the .xml file when you use command line at batch mode?I use the way " <AutoShowWindowAfterBatchModeBuild>true</AutoShowWindowAfterBatchModeBuild>" to try,but I think it is strange to pop up a windows in batch mode build.I want to get the xml file without any unity windows appeared.
     
  48. littlewormcug

    littlewormcug

    Joined:
    Oct 11, 2017
    Posts:
    8
    I build my project in Android and IOS paltform,and get tow Editor.log file.But when comparing them, I find a hug difference between them.


    Anyone has an idea about this question?
     

    Attached Files:

  49. wood333

    wood333

    Joined:
    May 9, 2015
    Posts:
    851
    I almost purchased this asset today, but I could not agree to the additional license, (Eclipse Public License -v 1.0), that was required by the asset store as a prerequisite to purchasing Build Report Tool. Sorry.
     
  50. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    That's totally fine! Just a note: The Eclipse Public License notice is required because this editor extension makes use of FuzzyString. It will not mean your game/app needs to conform to the Eclipse Public License.