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
    I also wish to have this feature. I had an editor script in the past for tracking that but it was rather unreliable.

    Use case: Switched to android and felt like build takes longer. Checked build logs to see that its longer for every build in the past 7 days. something I have done in this time may have caused that.
     
  2. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Johannski, @Meceka: Noted, I'll add it to my todo list.

    I'm currently working on adding a requested feature (showing poly count of meshes), but admittedly my progress has been slow since I'm also working on a game project right now that's planned to release on Steam Early Access soon, so it's been hectic.
     
  3. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Thanks, looking forward to it! And good luck with hitting your deadline :)
     
  4. NathanielAH

    NathanielAH

    Joined:
    Jul 22, 2013
    Posts:
    100
    @AnomalusUndrdog , in case you weren't aware, getting the below warnings in Unity 2019.4.1f1.

    • Assets\BuildReport\Scripts\Editor\Utility\BRT_Util.cs(140,10): warning CS0618: 'BuildTarget.StandaloneLinux' is obsolete: 'StandaloneLinux has been removed in 2019.2'

    • Assets\BuildReport\Scripts\Editor\Utility\BRT_Util.cs(146,10): warning CS0618: 'BuildTarget.StandaloneLinuxUniversal' is obsolete: 'StandaloneLinuxUniversal has been removed in 2019.2'

    • Assets\BuildReport\Scripts\Editor\ReportGeneration\BRT_UnityBuildSettingsUtility.cs(396,42): warning CS0618: 'PlayerSettings.virtualRealitySupported' is obsolete: 'This API is obsolete, and should no longer be used. Please use XRManagerSettings in the XR Management package instead.'
    Just wanted to share. Thanks, and keep up the great work!

    Sincerely,
    Nathaniel
     
    AnomalusUndrdog likes this.
  5. hkdev_unity

    hkdev_unity

    Joined:
    Sep 18, 2018
    Posts:
    11
    Does this work with previous saved editor.logs? I tend to save them and look them over and compare to recent reports. Your tool seems really useful, I'd love to be able to feed it different editor.logs since that's what it's processing through anyway. Is that possible or does it work with just the one's in the unity directory?
     
  6. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Yes, although the process isn't exactly one click: you can set an "Override Log" in the Options, then press the Get Log button as usual. I created this functionality more of as a debugging aid for Build Report Tool itself, but you can indeed use it that way.

    As long as the editor.log file you give it was made from the same project that's currently open, it will work as expected.

     
    hkdev_unity likes this.
  7. Racsoth

    Racsoth

    Joined:
    Feb 20, 2015
    Posts:
    11
    Hi! Thanks for making this. I have an inquiry:

    I see that the tool shows a "size in build" for each used asset. I'd like to double-check: is that value the *compressed* (or *packed*) size of the asset?

    I'm asking you because historically, the Editor.log file has shown the *uncompressed* sizes of the assets, which is basically how much RAM do those assets use, not how much disk space do they use.

    Thanks again!
     
  8. Racsoth

    Racsoth

    Joined:
    Feb 20, 2015
    Posts:
    11
    One more thing: it would be VERY useful to ignore certain file types or folders in the reports. The report includes third party assets that you probably won't want to touch. It even includes Build Report tool itself!

    EDIT: I'm specifically talking about the "Unused assets" part of the report, but the comment probably applies to the whole report.
     
    Last edited: Oct 12, 2020
  9. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    98
    Just picked this up. Enjoying it so far. Two questions:

    1) How is the "largest" item calculated on the Overview page? It says "Animations are the largest at 2%" when on the Size Stats it says Textures are 1.6G 90%.

    Maybe this is a zero index issue, where you took the list[1] instead of list[0]? Because Animations is the second item on the displayed list.

    2) What is the purpose of Unused Assets? Are these really impacting my build or my project in some way? I figured they were not included in the build and thus had a zero impact. Some of these items are large wav files that I just leave sitting around in case I decide to use them. I'm curious what the motivating factor was behind identifying unused assets and providing mass delete capabilities.

    Thanks!
     
  10. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Sorry for the late reply.

    The "size in build" is the file size in the build. It is still the disk space used, but for the build.

    The disk space used in the build will be different from the disk space used in the project. Because your files will be converted into a format that's usable in runtime. JPGs and PNGs used as textures for 3d models for example, will be converted into a DXT texture. A DXT texture's file size is usually larger than a JPG or PNG, because it's in a format that's ready to be used as-is by the videocard. It's these DXT textures that go into your build, not the JPG/PNG.

    But it's a little inaccurate to say it's the file size in the build. Because depending on the platform, your assets will be further archived. In Android builds, all the assets are packed into one giant archive with solid compression (due to the solid compression, you lose any sense of individual sizes). In most Standalone builds, the assets are archived per scene. So if you have an asset whose reported "size in build" is 1 MB, you won't necessarily find a 1 MB file in your build.

    Ok, I can add that. I only do it to assure you that Build Report files are not getting included in the build. I'm currently busy with another project but I'll add it to my todo list.


    Sorry, I'll fix that. I used to include the "total size" as part of the list at index 0, so index 1 used to indicate the largest category. I removed that but forgot to change the code for displaying the largest category.

    The Unused Assets are files not included in the build. Users use it to catch unnecessary files (some users found .git or .svn folders in their project that they don't want, which is why they wanted a quick delete option).
     
    sarynth likes this.
  11. LeeLorenzSr

    LeeLorenzSr

    Joined:
    May 3, 2015
    Posts:
    50
    Does this work in 2020.1? I just brought it in to check my swelling build sizes, and I got some strange behavior... before restarting Unity, I got no errors, but builds aborted within seconds (no messages at all in log). After restarting, it reported a ton of errors. I may look at it again, because removing the it allowed me to build again. I really like your tool, I'd just like to save some time if there is an update coming out or this is a known issue.

    I am not sure if there is any conflict with my other editor extensions. That's possible, but I will look into this myself. I'd really like to track down why my build has gotten so big.
     
  12. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    98
    I've been using it fine in 2020.1.13 through 2020.1.17. I have a fair number of plugins from ES3 to Odin, as well as a custom build call that I use sometimes and it always pops up after the build without issue.
     
  13. LeeLorenzSr

    LeeLorenzSr

    Joined:
    May 3, 2015
    Posts:
    50
    sigh... simple fix.

    Convert these lines:

    Code (CSharp):
    1.             TextWriter writer = new StreamWriter(xmlFileFullPathToSaveTo);
    2.             x.Serialize(writer, buildInfo);
    3.             writer.Close();
    4.  
    into:

    Code (CSharp):
    1.             using( var  writer = new StreamWriter(xmlFileFullPathToSaveTo) )
    2.                         {
    3.                   x.Serialize(writer, buildInfo);
    4.                         }
    5.  
    It's cleaner anyway, we should always use "using" for IDisposables.
     
  14. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    98
    Why did that crash in your project?

    Note that there are 4 places where a new StreamWriter is created within the tool. Just FYI if you need to fix them. I checked my project and I have 22 uses of new StreamWriter and 13 of them had using. (One of them being my own implementation where I didn't wrap with using.
     
  15. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Hi, I downloaded 2020.1.17f1 and tested with a blank scene, the project builds fine. I do get a strange error saying:
    TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 23

    It has no stacktrace whatsoever, so I don't even know which code is causing that.

    But that keeps showing up even after I close the Build Report Window and just merely move the mouse around. I close the project and open it again, then make a build, and the error doesn't show anymore. I repeated that about 3 times and still no error. Might be something with 2020.1. I assume it's not related to Build Report Tool.

    You can disable Build Report Tool's automatic report generation after a build (from the Options in the Build Report Window). That would mean you need to manually click on the Get Log button after making a build, but it might help if the issue happens again.

    I respect that you want the code written that way, but those two are semantically the same (TextWriter.Close() calls Dispose(), same thing that happens when execution leaves the using block). If we're talking about fixing a bug that prevents building, I'm not sure if that brought any meaningful change.

    When you mentioned
    what were the exact error messages? It might help me if I know what those are. I'm just taking a wild guess, it might be an issue with reloading assemblies, or source code not being compiled in the right order. Simply causing a recompilation might have fixed something. But that kind of issue is really hard to replicate.

    If you can point me to a particular error message, it would help a lot. Right now, the best I can do so far is just guess.
     
    sarynth likes this.
  16. sarynth

    sarynth

    Joined:
    May 16, 2017
    Posts:
    98
    Have you had a chance to look at this?
     
  17. ChaosHelme

    ChaosHelme

    Joined:
    Nov 22, 2016
    Posts:
    4
    Anyone tested this tool on Unity 2020.2 yet? Does it work?
     
  18. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Yes, using it with Unity 2020.2 without any problems :)
     
    ChaosHelme likes this.
  19. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Sorry for the late reply, but I've released a minor update to fix it. Please go ahead and try it and see if the bug still happens or not.
     
  20. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    I've been wondering, does BuildReport really report the Addressable data on Build including Addressable files?
     
  21. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    No, I've made no mention of such a feature of any sort. But it is one of the things I've been looking into. Unfortunately, something like AddressableAssetBuildResult doesn't provide much info.
     
  22. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Yeah I know... been using your BuildReport for several years now! :D
    I am also into the Addressable Build Report feature now, such a pain in the ass.
    I did find this related to the Addressables, but didn't get it to work yet...
    - https://docs.unity3d.com/Packages/c...13.1651681310.1617003212-170378736.1594097726
     
    AnomalusUndrdog likes this.
  23. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Build Report Tool version 3.6 has been released!

    Texture Data columns

    When viewing the Textures Filter, you can now show extra columns like Texture Format, Width & Height, Non-Power of 2 Scale, Filter Mode, etc. You can use this to sort through your images by those properties.

    This is an old feature request (apologies for taking so long).



    The options being shown in the popup panel can also be changed from the Options Screen:


    Right now, these are all the texture properties that can be shown, if you want a property that isn't here, you can comment here or reach out to me with the contact email, and I'll see what I can do.



    Note: Since this is a new feature, unfortunately, old saved Build Reports will not have this information.

    More features are planned, such as being able to create Filters dedicated for just sprites, a front-end for creating File Filters (right now you have to manually edit the FileFiltersUsed.xml file), showing mesh data as columns (vertex count, scale factor, number of UV channels, etc.) in the same way that these texture data are being shown, etc.

    Search Options
    Also included is now the functionality to turn off Approximate String Matching (Fuzzy Search). Instead, you can now toggle between 3 types of Search: Basic (using * as the wildcard), Regexp, and Fuzzy Search:


    With the inclusion of Basic and Regexp type searches, you can now toggle case-sensitive search (Fuzzy Search, on the other hand, is always case-insensitive).

    You now also have the option to do the search on the asset filenames only, or to include the asset's path in the search:


    Also as a minor addition, you now have the option to hide Build Report Tool assets themselves in the Unused Assets List. Originally I allow them to show up in the Unused Assets List to prove that they aren't being included in the build, but I realize it might be bothersome to keep seeing them when the user is looking for unused assets to delete, so there is now the option to hide them. I've gotten a feature request to allow custom ignore folders (i.e. assign paths that will not show in the Unused Assets List), that will be coming in a future version, and will work in the same manner.
     
    Last edited: Apr 12, 2021
    Johannski and Meceka like this.
  24. DomeCreator

    DomeCreator

    Joined:
    Mar 5, 2020
    Posts:
    29
    Last edited: Apr 12, 2021
  25. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    I just imported this into 2019.4 and it throws an error and won't compile:

    Assets\BuildReport\Scripts\Editor\ReportGeneration\BRT_TextureDataGenerator.cs(326,30): error CS0117: 'TextureImporterType' does not contain a definition for 'DirectionalLightmap'
     
  26. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Will fix this, thanks.

    EDIT: Sent out a bugfix version, hopefully it goes live soon.

    It's rather strange because I based this off of the official docs and it says 2019.4 is supposed to have it: https://docs.unity3d.com/2019.4/Documentation/ScriptReference/TextureImporterType.html


    But I did test just now in Unity 2019.4.19f1 and it did indeed say it's not defined there.

    I'll look into this. I haven't used package manager for asset store plugins so I don't know what's the proper thing to do here yet.

    EDIT: I'm still not sure, but you could just delete the BuildReport folder, and hopefully the Import button at the lower-right corner of the Package Manager window will work properly this time.

    If you have your BuildReportToolOptions.xml inside the BuildReport folder, you may want to move it outside before deleting the BuildReport folder. You can put it into the project's ProjectSettings folder and it will still be recognized later on.
     
    Last edited: Apr 13, 2021
    dizzymediainc likes this.
  27. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    433
    Yea that is odd, thanks for fixing it! Will keep an eye on the release.
     
  28. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Version 3.7 is released!

    This is a minor update with a few new features.

    Ignore Patterns for Unused Assets



    With this you can now specify paths or filenames to ignore for the Unused Assets List. So for example, if you have a project that builds for both iOS and Android, by putting the iOS plugin folder and the Android plugin folder in the Ignore Patterns, the Android plugins will no longer show in the Unused Assets List when you build the project for iOS, and vice-versa (iOS plugins will no longer show as unused when you build for Android).

    You can use Regex for the Ignore Pattern using the toggle beside each entry. A checkmark will indicate whether the inputted regular expression is valid or not.


    Project Settings Multi-Column View
    This creates additional columns to take advantage of any available extra width.



    Packages List
    Project Settings tab will now also record what Packages were used in the project. This is subject to further improvement, but I wanted to put it out already to get any possible feedback.
     
  29. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    Awesome update, I like the multiple columns feature!
    Here's a bit of feedback: I see some strange line breaks for one letter (where it would not be necessary)
    ezgif-2-20bcba0e4324.gif

    Not sure if that is possible, but for the builtin packages it would be really interesting to see, if they are stripped away or not.

    And a friendly reminder that I would love to see the build time included in the report :)
     
  30. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Johannski: Sorry about the build time taking so long, I made a new update that now includes it. I also disabled word-wrapping to fix that problem with the Project Settings tab.

    From what I understand, there are certain platforms where Unity does some automatic stripping of Built-in Packages if they are not used, but I have not looked into this yet. Basically, right now Build Report Tool only reports what's been enabled from the Package Manager (which is all of them, by default).

    You can manually disable them and, consequently, they will not show up in Build Report Tool:
     
    Johannski likes this.
  31. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    @AnomalusUndrdog Awesome, that was fast! That is exactly how I imagined the build time report, thanks a lot! Also the line break bug is fixed for me.

    When clicking through the report, I noticed that I got a lot of shader warnings from another asset. The build report window had a lot of problems displaying the console log. Might be something you want to look into (even though the feature is not that interesting for me, but I guess this can be improved). I made a screenshot of the editor profiler.
    upload_2021-4-27_18-27-36.png
     
  32. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I see, how many were the warnings? I might need to paginate the display of the logs. This is one of the weak points of the Editor IMGUI sadly. Everything in a scrollview is being drawn, even the ones not currently visible.
     
  33. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Version 3.8 has been released!

    This adds recording of build time. Build time is basically the duration between OnPreprocessBuild and OnPostprocessBuild.


    If you're using Unity 2018.1+, Build Report Tool will include the contents of Unity's BuildReport API. Currently, it only displays the build steps and log messages in a new tab called "Build Process", but more is planned in the future.
     
  34. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    999+ ^^
    I just updated the Shapes Asset that created all those warnings, and rebuilt the project:
    upload_2021-4-28_10-57-4.png

    now it is 336 warnings and 7 infos (still mostly warnings for Shapes). The windows now performs without problems, so I guess it was just an absurd amount of logs the last time. However, not that the log number calculation does not work in my case (see screenshot).

    Edit:
    Fixed up my project, now I understand the logic of the build process window, that's quite neat! maybe the upper part should have a larger minheight, since it does not make too much sense in my last screenshot. Here's how it looks to me, when it is tidy:
    upload_2021-4-28_13-39-23.png

    Thank you for your great work!
     
    Last edited: Apr 28, 2021
  35. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    @Johannski
    Yeah aside from paginating the logs, I think I'll give the upper area a bigger min height, plus I'll make the divider draggable.
    I'll look into that log count not working. Hopefully won't take too long to do all those.
     
  36. jamiedixxon

    jamiedixxon

    Joined:
    Mar 20, 2018
    Posts:
    8
    I'm getting this same error in 2020.1.5f1 - thoughts?

    Thanks in advance.


     
  37. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Sorry about that. It seems DirectionalLightmap was added in 2020.1, but in a 2020.1 version that's later than 2020.1.5, but which one exactly, Unity doesn't say.

    I'll fix this, but you can easily just remove this part in BRT_TextureDataGenerator.cs starting at line 326:
    Code (CSharp):
    1.                 case TextureImporterType.DirectionalLightmap:
    2.                     return "Directional Lightmap";
    The code will still work fine with that removed.
     
  38. wechat_os_Qy01LAc3jLJ9V2_8OQvQsUKEE

    wechat_os_Qy01LAc3jLJ9V2_8OQvQsUKEE

    Joined:
    May 10, 2021
    Posts:
    1
    Just got the following errors when importing 3.9 version of Build Report Tool to Unity 2020.3.8f1

    Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs(1402,13): error CS0117: 'Options' does not contain a definition for 'UpdatePreviousSearchType'
    Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs(1529,59): error CS0117: 'Options' does not contain a definition for 'HasSearchTypeChanged'
    Assets/BuildReport/Scripts/Editor/Window/BRT_BuildReportWindow.cs(1540,61): error CS0117: 'Options' does not contain a definition for 'HasSearchTypeChanged'

    Is there anyone who is facing the this issue?
     
  39. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    You probably have your own class or enum that's named Options. Build Report Tool also has an Options class under the BuildReportTool namespace. And when that happens, the C# compiler can't automatically tell which Options class is being referred to unless you use the full name (aka fully qualified name). I usually use the fully qualified class name to prevent things like this, but I'll check if I missed any.
     
  40. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    This is a great tool, I've been using it for years. But in the Unused Assets panel, when I move my mouse over the list of items, some of them trigger a small popup that says "Used By" with a list of scenes which are included in the build....which confuses me. These are the Unused Assets, so why does BR say they are in use?

    thx
    Dave
     
  41. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    I normally determine the "Used by" using AssetDatabase.GetDependencies and inverting that, so that an asset knows what is using it.

    I just checked with my own small test project, and there is one situation I see the bug happening: when a scene is using a js script, it comes up in AssetDatabase.GetDependencies, but since Unity doesn't do js scripts anymore, they don't really get included in the build (goes in the Unused Assets list) but the tooltip will say they're being used. I'll be fixing that, though I'm not sure if that's also what's happening to you.

    Can I get a screenshot of the bug, and a copy of the xml files of the build report? Preferably including the dependencies xml file, which would be in the format "DEP-Project Name-Build Platform-Date-Time.xml" It should match the filename of your main build report xml file, just prefixed with "DEP-"
     
  42. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    thanks! I'll PM you with that info.
     
  43. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Hey, if you get a chance to look at my PM soon, I'd really appreciate it!
     
  44. dipanker_g2w

    dipanker_g2w

    Joined:
    Oct 22, 2019
    Posts:
    2
    Hi

    I am getting the following error:

    Build Report Tool: Invalid data in build info file: /Users/dipanker/UnityBuildReports/SWS_Android-Android-2022May20-120440.xml

    Unity version 2019.4.38f1
    Build Report version: 3.9.3
     
    Last edited: May 20, 2022
  45. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Can you check the file size of that mentioned xml file? If it's zero, the code that saves the file might not have worked. That can happen if an exception occurred (or if Unity hanged) before the saving could finalize. If such a thing was caused by the Build Report Tool code, I'd be interested in seeing what it is.

    You could try making another Build Report and see if it still happens. If it consistently happens, I'd appreciate some further information, like if you could send me the xml file itself so I can see what it looks like.
     
  46. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I just started having trouble with Build Report, was working until today: When I do a build, the BR window opens up the usual report layout, but it's from yesterday's build, not today's build. (It has yesterday's datestamp, and it also shows files that I have deleted from the project.) So I click the Get Logs buttons, and it says "Getting values...." forever, stuck trying to get values, I guess. Closing and reopening the BR window doesn't help, it still automatically starts Getting Values...

    I deleted the folder in my Documents with all my saved reports, did another build, same thing. So where is it getting yesterday's report data and how do I purge that and try to get it to create a new report? (No errors or anything in the console.)

    thanks
    Dave
     
  47. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Build Report Tool gets its data primarily from the Unity Editor log file. You can check where exactly it's coming from in the Build Report's Options (scroll down a bit to see the "Editor Log File" section):


    When you click on "Clear Override Log" that ensures it's using the proper log file (in case you previously manually assigned a different one with "Set Override Log").

    After clicking "Clear Override Log", that should be pointing to the same log file that you can access from Unity's built-in Console window when you click on "Open Editor Log":


    At this point can you check that log file's "Date modified" in your file browser (in the Build Report Tool Options, click on the "Show in Explorer" button beside it)? It ought to be the current date and time, since it is immediately modified the moment you started the Unity Editor.
     
    Last edited: May 25, 2022
  48. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    Ah thanks! My editor log was 4gb, and I often have two projects open simultaneously, so I bet it just couldn't cope with all that. I deleted the Editor log, built again, and works now.
     
  49. kotrynavy

    kotrynavy

    Joined:
    Mar 17, 2020
    Posts:
    2
    Hi. I have an issue where I try to build A unity project from batch mode using BuildPlayer and i run after

    Code (CSharp):
    1. var pathToBuildReport = BuildReportTool.ReportGenerator.CreateReport(buildPlayerOptions);
    However i keep gettings this message :
    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.

    If i run the same script from Unity and it creates me the build report. I attach the report i get from Unity when i make a build. And as i understand i should be able to create the same from batch mode too right?


    I am building on iOS and unity 2019.4.23f1
    Would appreciate the help. Thanks
     

    Attached Files:

  50. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Yes, behaviour really should be the same regardless if you are in batch mode or not.

    That kind of error message means there was no build data in the log file.

    Build Report Tool uses whatever was specified as the log file to use in the Options:
    By default it should already be the correct one, but you can click on "Clear Override Log" to ensure it.


    Even the batchmode BuildReportTool.ReportGenerator.CreateReport method call will use that setting.

    However, if you want, you could also override which log file to use by specifying the 2nd parameter. For example, this should force it to use the correct log file:

    Code (CSharp):
    1. var pathToBuildReport = BuildReportTool.ReportGenerator.CreateReport(buildPlayerOptions,
    2. BuildReportTool.Util.EditorLogDefaultPath);
    You can verify that the log file has the build info needed if you open it in Notepad and look for this piece of text:
    (you could just ctrl + F to find "Uncompressed usage by category" to quickly find it)


    If it has that, you should not be getting an error message.

    I did a test here where I have the editor log file opened and updated in real-time, while I run the batchmode build from a console window:
    The build takes a while but in the end once you see the log messages that start with "Build Report Tool: Saved:" then that means it's successful.
     
    kotrynavy likes this.