Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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,546
  2. AdamSingle

    AdamSingle

    Joined:
    Apr 18, 2013
    Posts:
    22
    Hi AnomalusUndrdog,

    I love this tool, I used it quite a lot while making games for mobile as a sub contractor, veyr handy.
    I now work for a larger company and introduced them to the tool, but we are having the same issue as @liszto. We were originally using my version so I could show them what it does, and then, despite it not working, they commited the $5 to get a copy themselves, so we downloaded it fresh from the store. In both cases we get the same issue. it just sits there saying "Getting build size". There is nothing outputed into Doxuments/UnityBuildReports either. All that's in there is FileFiltersUsed.xml.
     
  3. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    I'm going to need to try to replicate your situation as much as I can so that the error you're experiencing can happen on my PC where I can study it.

    Here is a simple utility script that will dump in a .txt file all the filenames in your project and their file sizes. I need you to use it on your project so I can recreate some dummy files that mimic yours, so I can attempt to trigger the same error on my PC.

    https://gist.github.com/AnomalousUnderdog/cd525d669ef93e1c5ceb

    Email me the .txt file at anomalous_underdog@yahoo.com

    I also want to know what OS you are using, and what Unity version you use. If you experienced the error happening in other PC's, please tell me the OS and Unity versions in there as well.


    I'll also PM you. I'll perhaps need to give you a modified copy of Build Report Tool with some extra diagnostic code. Hopefully we can pinpoint where in the code this error is happening.

    EDIT: PM sent
     
    Last edited: May 5, 2014
  4. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Btw here's a hunch: could it be anti-virus or malware protection programs, sandboxing Unity?

    All the Build Report Tool does when generating a report is:

    1. retrieve the contents of the Unity Editor log file (it's just a text file, found in the user's documents folder)
    2. get the file sizes of all the files in your project's Assets folder
    3. get the file sizes of your built executable and whatever data files that came along with it

    An anti-virus may perhaps try to prevent the plugin from doing that. If you do have an anti-virus/malware protection program, you can try temporarily disabling it before generating a build report (perhaps disconnect the Internet/LAN connection first, if you're worried about malware).

    EDIT: I've also experienced times when generating a build report was slow, and times when it isn't. It could be because Windows is updating its search index (which slows down the computer in general), or some other background app doing something, that made the build report slow during the times that it was. I'll check more whenever time and circumstance permits.
     
    Last edited: Jun 8, 2014
  5. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    Hi again,
    I was pretty busy the past few month. So I never give you answer to my problem of "Getting Build Size" which is never ending.
    This happen to every people in my company in fact and only for PC build. For others builds there is no problem (Android / iOS) I don't try on MAC build. But I can if you need more informations. I tried to update to the last version (2.2.3) but the problem is still here.

    But in the editor.log file, I can see that your tools do his job cause the list of all asset with their size is present in it.

    Other thing, we have change your tools location and change the path in the build_option to match. I send you a MP with my editor.log .
     
    Last edited: Jul 15, 2014
  6. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    I just upgraded to Unity 4.5.2 and discovered that BuildReport plugin is not showing up when I select it in the Window > Show Build Report .

    Could you check to see if it's working in 4.5.2 ?

    Edit: Checked the plugin in an empty project with only NGUI and it works. Went back to original project, deleted and imported in but still same problem. Perhaps something in the project is conflicting, decided to deleted Facebook example folder that's in my project and now it works. Very strange.

    cheers
     
    Last edited: Jul 15, 2014
  7. tobia88

    tobia88

    Joined:
    Aug 1, 2013
    Posts:
    5
    Hi AnomalusUndrdog, I've met these error:

    Assets/BuildReport/Scripts/Editor/Util/BRT_Util.cs(1233,0): error CS1010: Newline in constant
    Assets/BuildReport/Scripts/Editor/Util/BRT_Util.cs(1233,31): error CS1525: Unexpected symbol `;', expecting `)', or `,'
    Assets/BuildReport/Scripts/Editor/Util/BRT_Util.cs(1233,35): error CS0201: Only assignment, call, increment, decrement, and new object expressions can be used as a statement
    Assets/BuildReport/Scripts/Editor/Util/BRT_Util.cs(1233,37): error CS1525: Unexpected symbol `?', expecting `)', `,', `;', `[', or `='

    i'm using Unity 4.5.2f1 on PC, hope to have solution soon :)
     
  8. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Ok I will look into this.

    I'm going to need to try to replicate your situation as much as I can so that the error you're experiencing can happen on my PC where I can study it.

    Here is a simple utility script that will dump in a FileDump.txt file all the filenames in your project and their file sizes

    I need you to use it on your project so I can recreate some dummy files that mimic yours, so I can attempt to trigger the same error on my PC.

    https://gist.github.com/AnomalousUnderdog/cd525d669ef93e1c5ceb

    After putting it into your project, go to Window > Dump filenames of assets. A file FileDump.txt will be created.

    Email me the FileDump.txt at anomalous_underdog@yahoo.com

    I also want to know which Windows you are using. Are you using Windows Vista, 7, or 8?
     
  9. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Ok, I'll look into this. It could be a conflict with the class names but that's not likely since you should've gotten a compile error in that case. Is there no error message from the console log when you try it in your project?
     
  10. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    That's caused by some problem with Unicode. I haven't encountered it so I don't know what exactly is wrong.

    But you can just delete the line. It's simply trying to replace € with €
     
  11. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    @rocki: I only noticed now that you said your problem got fixed. I have a hunch it might be the assets' metadata GUID that is conflicting. Had you moved the BuildReport folder elsewhere in your Assets folder before this bug happened?
     
  12. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    I didn't move the BuildReport folder.
     
  13. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Ok wait, could it be the Facebook example had some compile errors preventing BRT from working?
     
  14. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Facebook example did not have compile errors. This is why i was stumped for a while trying to figure which plugin was the problem.
     
  15. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    @rocki: Ok, so if you put the Facebook example back in your project, does the problem with Build Report Tool happen again?

    Which Facebook plugin are you referring to anyway? Perhaps I can get a copy and see for myself.
     
  16. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    News Update
    July 21, 2014 (UTC+8)

    I've worked with @liszto in fixing the bug that makes Build Report Tool hang when generating a build report. I've sent a quick bugfix update, designated 2.2.4. Thanks again for that @liszto!


    What's next

    I've been busy redoing the GUI to make it look more "built-in" to Unity. I also got rid of the custom fonts, which will make importing of the plugin much much faster.

    Also included here is the requested feature from @MikeHergaarden: showing compressed sizes of the files. I've decided to call it "imported size" since compressed size would not be entirely accurate (if the texture was imported as uncompressed, it would technically be, not having any compressed size).

    Since showing that does not rely on build data, you can easily update information on compressed sizes at any time. I added a button "Recalculate Imported Sizes" for that.

    You'll also be able to sort the list by column (ascending or descending), much like in a typical file browser application. You can sort the list by the file's folder path, or by their filename only.




    Also coming in the next update is a new minor feature:

    The Unity build settings are recorded in the build report. This is useful for us doing automated builds and want to review the settings used.



    I'll be raising the price of the plugin to $10 on release of this, so now's a good time to buy this for those who haven't! I have a few more features planned to add in.
     
  17. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Unity 5's been announced for quite some time. I think we can consider Unity 3 to be quite old already. I'm going to release a new version of my Build Report Tool hopefully soon.

    To those who know my plugin, as you know, the lowest version required is 3.5.3. This is a hassle as I need to do additional effort to handle parts that work differently in Unity 3.x from 4.x. I'm maintaining two branches of my code to ensure the plugin is working properly in both major versions.

    If I were to drop support for 3.x this would speed up development considerably. So the question is, is there anyone here who uses Build Report Tool still using it in Unity 3.x? Why is that? Will you be ok with me dropping support for Unity 3.x?

    I will at least still be able to provide old versions of my plugin (the old version will still work properly in Unity 3.x) but the new versions that I will release from here on will require 4.x. Are you ok with that?
     
  18. Freezy

    Freezy

    Joined:
    Jul 15, 2012
    Posts:
    234
    You could add a zip file of a unity 3 version in the asset package for legacy support, with a promise to fix critical issues only. This is a fair policy as people will retain what they paid for with additional upgrades waiting for them when they finally do transfer to a newer version of Unity.
     
  19. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Sounds like a good plan. I'll go with that.
     
  20. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    the zip solution is a quite good idea !
     
  21. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    News Update
    August 18, 2014 UTC+8

    I've ported the plugin to Unity 4.5.0 so that's the minimum required to use Build Report Tool from here on.

    This new version will be designated Build Report Tool 3.0

    As discussed earlier in this thread, Build Report Tool 2.2.5 will still be available for those who are not using at least Unity 4.5.0.

    I will include 2.2.5 as a zip (or maybe a .unitypackage file) inside Build Report Tool 3.0. This will mean you need at least Unity 4.5.0 to download it, but you can just take out the BRT 2.2.5 package from it afterwards.

    If that's a hassle, you can contact me via email, and I can give you BRT 2.2.5, you'll just need to give me your invoice number (if you hadn't given it yet) and I'll send it to you.

    Or, download BRT 2.2.5 now while the 3.0 update hasn't come out yet.


    So for the updates:

    I've updated the Pro dark skin.

    The new GUI will also have an "Overview" tab where a summary of the report will be shown.





    As mentioned before, the Used/Unused Assets list can now be reordered by name or size, and it also differentiates from size on disk to size as imported (compressed) into Unity.

    Some assets are actually larger in file size upon being imported into Unity (see entry #27 in the screenshot below). This is probably because of the extra data Unity creates for the FBX (probably Mecanim data). For that reason, that column is labeled "Imported Size", not "Compressed Size".

    Also, you'll see in the screenshot there's "Asset Path" and "Asset Filename". You can use this to sort by filename alone, or by the whole folder path of the asset.





    Also as mentioned in my previous News Update, the new version will have a "Build Settings" tab, which records your Unity settings upon building.





    More Features Later On

    I'll be adding more tabs based on your suggestions. I can't promise when these further additions will come out as I'm only doing this plugin in my freetime, apart from my day job. But here's what I plan to add:
    1. A tab that will show asset usage per scene file.
    2. Asset Dependency tab: an interactive node diagram (will look like Mecanim) that shows which asset is using which. It can tell you which asset is the most reused in your project.
    3. Ability to view the saved build report XML files in your web browser.
    4. Treemap view of the used/unused assets.
    When you say treemap, it's a visual representation of how much each files are eating up the space. I got the idea from WinDirStat (pretty helpful program too IMO):



    Perhaps you guys can vote on which new feature you want me to work on first.
     
    Last edited: Aug 18, 2014
  22. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    Hi,
    so the 3.0 version will be released soon ? :)

    According to me the feature number 4 or 2 are the most useful !

    Really good job AnomalusUndrdog for this tools !
     
  23. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Thanks! I just need to add in the options screen a checkbox to toggle if you want project/build settings to be recorded or not, and that's it. I'll prepare new screenshots for the Asset Store page then submit it.
     
    Last edited: Aug 18, 2014
  24. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    ok ! That's sound really good ;)
     
  25. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    Some thing that will change in the next Unity Major release (5.0). The target "NaCl" & "FlashPlayer" will not be supported anymore. So an exception will be needed in BRT_Utils between the lines 99 => 105.

    But this can be done really really later ;)
     
  26. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    @liszto: Ok noted.

    By the way, the 3.0 update should be rolling out soon! Do test it when it comes out.

    EDIT: It's now out! http://u3d.as/4u2

    This screenshot is only the preview:
     
    Last edited: Aug 27, 2014
    Freezy likes this.
  27. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    Hi,
    what is present in your code that limite the Unity version to 4.5.0 or higher (just to know).
    There are features only present in 4.5 ?
     
  28. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    When it records the project settings. A lot of variables had been added since Unity 4 in PlayerSettings, EditorUserBuildSettings, etc. And it seems between minor revisions (4.1 to 4.2 to 4.3 etc.) Unity had been renaming and moving them around. It's difficult for me to keep track of all of those, so I decided to use 4.5 as the minimum required.

    Unity had been changing things a bit in their APIs with all those new platforms they keep on adding an dropping (PS Vita, Blackberry, NaCL, Flash, and so on), I hope things stabilize by the time Unity 5 comes out.
     
  29. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    I think you let some debug stuff in your build :)
    Or maybe it's normal. It's just the names that seems like debug ones.
     
  30. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Those shouldn't be there. :p I'll send an update.
     
  31. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    Ok I continue to check but really good job for your version :)
     
  32. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    I just see in your new versions. There is a list of all defines.

    Here I use something called global defines that are defines in some special files with the names "gmcs.rsp" and "smcs.rsp". That are files used within Unity to defines your personal global defines within your project to avoid the writing of each one in each files.

    Could it be possible to add this to this list ? I will do the patch in local. If it's possible and ok for you, it could be cool to add them here :)
     
  33. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    So the defines in those files are not getting picked up? I think I know of a sure way to detect them. I'll look into it when I get the time. Feel free to share some code or pass me a link for another way to do it.
     
  34. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    ok. I will do it tonight if i"ve got time. Thanks.
    I mean those files are extra files and Unity can use them. But by default its own defines are not located here.
     
  35. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Yes, understood.

    By the way, Unity provides built-in way to add custom defines in the player settings under Scripting Define Symbols (see Platform Custom Defines part of http://docs.unity3d.com/Manual/PlatformDependentCompilation.html).

    But regardless of where you are defining it, I'll improve BRT so it can detect them.
     
  36. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    FYI I submitted a bugfix update to get rid of those debug menu entries. It still doesn't have that fix to get the defines coming from smcs.rsp. This update will have no .unitypackage file for the old BRT anymore so get it if you need it.

    EDIT: So I finished adding that improvement for defines, even though the bugfix update hasn't come out yet. The next update will be 3.0.2, and will also include the changes for the defines.

    EDIT 2: Version 3.0.2 is now out!
     
    Last edited: Sep 3, 2014
  37. liszto

    liszto

    Joined:
    Dec 22, 2011
    Posts:
    135
    nice one !
     
  38. jofa

    jofa

    Joined:
    Jan 11, 2013
    Posts:
    6
    Hi, after upgrade to BRT 3.0.3 I am dealing with error Cannot find suitable GUI Skin
    I cannot find any skin within BuildReport folder, how to solve the issue?
    Thanks & Regards
    Jofa
     
  39. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    I've experienced that when I import a newer version of Build Report Tool to a project that already has an older version. My guess is something with the metadata ID's of the Unity assets getting a conflict of some sort.

    It's best if you completely delete the old BuildReport folder first before importing the newest one. If that doesn't work, please do notify me!

    EDIT: Also try importing it into an empty project.
     
  40. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    may i know which version works for unity pro 4.3.4 & unityconsole for ps4?
     
  41. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    I'm not familiar with the Unity PS4 development (and what Unity version it corresponds to) but the last major version of Build Report Tool will work as far back as Unity 3.5.3. Since the Asset Store doesn't let you download previous versions of an asset, I'll have to send it to you manually if you want it. Just email me your invoice number for verification (if you purchased BRT already) and I'll send a copy to you via email. You can email me at anomalous_underdog@yahoo.com
     
  42. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    512
    There are quite some compile errors with the Unity 5.0.b9 out for pre-order customers. Are there plans to make the build report tool compatible to Unity 5?

    Example: Assets/BuildReport/Scripts/Editor/ReportGeneration/BRT_UnityBuildSettingsUtility.cs(314,73): error CS0117: `UnityEditor.EditorUserBuildSettings' does not contain a definition for `appendProject'
     
  43. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    In the build report, I'm seeing many textures and assets that is included in build that I am not using in my scene. Is there a way to tell unity not to use these assets?
     
  44. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    I'll fix them when I get my hands on a Unity 5 license. Hopefully sometime next week.


    Hard to say why they got included. As a rule, anything in a Resources folder always gets included. If they're not in a Resources folder, then something is making use of it.

    It could be used by a prefab, and that prefab could be used by another prefab, and that other prefab could be used in your scene. So sometimes, it's not evident that it's being used. It's in my plan to add another tab in build report which shows a sort of node graph to let you see which asset is being used by which. But it's not in yet.

    Although it doesn't show it as a node graph, there's this free plugin that shows asset dependencies too that you can try: https://www.assetstore.unity3d.com/en/#!/content/10772 I personally haven't tried that yet, however.
     
  45. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,457
    Thanks for the link to the free asset.

    It would be really awesome if build report has a node graph.
     
  46. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    405
    I have multiple projects where with Unity 4.5.4, the build report window no longer appears. I don't get any errors in the console when going window-->SHow build report, and I haven't moved it offscreen (I'm on a mac, and if I multi-finger up to go to whatever-apple-calls-the-all-windows-view-this-week it's not there either.

    Do you have any suggestions?

    Thanks,
    Alex
     
  47. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    I've experienced that before (I've received some feedback of other users experiencing the same) when updating the copy of Build Report in my project with a .unitypackage of a newer version. Try deleting the whole folder for BuildReport first, before importing the new version.

    Let me know if that works or not.
     
  48. ferretnt

    ferretnt

    Joined:
    Apr 10, 2012
    Posts:
    405
    I'd already done a clean import, but stuffing a call to Show() immeditaly after you create/get the EditorWindow seemed to fix it.
     
  49. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,546
    Hmm ok, I'll look into that when I get the time.
     
  50. Freezy

    Freezy

    Joined:
    Jul 15, 2012
    Posts:
    234
    Perhaps you could contact unity and sell the tool to them for inclusion into unity as a module ;-)
    The least they could do is give you access to a free beta version for now :-D
    I am really missing the build report tool using unity 5 beta.