Giter Club home page Giter Club logo

projectauditor's Introduction

Project Auditor

Project Auditor is a static analysis tool that analyzes assets, settings, and scripts of the Unity project and produces a report containing: Code and Settings diagnostics, the last BuildReport, and assets information.

Disclaimer

This package is available as an experimental package, so it is not ready for production use. The features and documentation in this package might change before it is verified for release.

Feedback, bug reports and feature requests are more than welcome, please enter them here.

Installation

The simplest way to install Project Auditor is to clone the repository to the Packages folder of your project. Alternatively, it is possible to clone the repository to a different folder. However, note that in this case you will have to add com.unity.project-auditor to your Packages/manifest.json.

License

Project Auditor is licensed under the Unity Package Distribution License as of November 18th 2020. Before then, the MIT license was in play.

Documentation

For information on how to install and use Project Auditor, please refer to the documentation.

Development

Here are the steps required to setup a Unity project for Project Auditor development.

Tests

In order to be able to run (existing or new) tests in VS/Rider or within Unity using TestRunner, it is necessary to:

  • Install Test Framework from Package Manager.
  • Add the following lines to your Packages/manifest.json:
 "testables": [
    "com.unity.project-auditor"
  ]

Pull Requests

  1. Start a new pull request on GitHub.
  2. Describe the problem you are trying to solve.
  3. Describe the solution you are trying to implement.
  4. Add mtrive as reviewer to the pull request.
  5. Create the pull request.
  6. Once approved, select Squash and merge and delete the remote branch.

Note: Make sure to select Unity-Technologies/ProjectAuditor as base repository and master as base branch when creating the Pull Request.

The repository owners are committed to maintaining this repository and ensuring that it continues to adhere to Unity Standards for package development. Individual pull requests may take time to be approved if they contain changes that require the package to be re-validated.

projectauditor's People

Contributors

andyg-u3d avatar blake-young avatar borisbauer-unity avatar cabauman avatar ehab-abdulmejid avatar emeline-berenguier avatar igormaliukh avatar jacob-kjaer avatar jjjianjiao avatar justinkiffiak-sm avatar mattsutherlin avatar mcrvaz avatar mza79 avatar skiri-ki avatar unitystevem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectauditor's Issues

Object.name diagnostic

Problem statement
Object.name property allocates a new string in managed memory every time it is accessed.

Proposed solution
Introduce a new diagnostic that suggesting caching Object.name.

Assembly not showing

Describe the bug
After running analyze, I don't see Assembly-CSharp in the list of assemblies which means I don't don't see an analysis on my code. What I do see are all the assemblies for the various packages that I have installed.

I created an assembly for my code and re-ran the analysis. The assembly that I created also does not show up in the list.

To Reproduce
Steps to reproduce the behavior:

  1. Click analyze
  2. Only assemblies for my packages are shown

Expected behavior
I can see an analysis on my code as well as the packages I have installed.

Screenshots
NDA

Information (please complete the following information):

  • Windows
  • Unity 2020.3.16f1
  • Latest project auditor version installed today via git url

Show Only Critical Issues Resets After Compiling with Auditor Open

Describe the bug
When triggering a recompile with the code auditor open in the editor, if the user has Show Only Critical Issues checked, it'll reset the content when compiling finishes. Can only be resolved by running code auditor again.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a project analysis with at least Code checked
  2. Check Show Only Critical Issues
  3. Open a script and change a line of whitespace and save
  4. Switch back to Unity and wait for compiling to finish
  5. Observe that all critical issues have been cleared and toggling Show Only Critical Issues does not bring them back.

Expected behavior
Compiling does not update the open audit.

Information (please complete the following information):

  • OS: Windows
  • Unity: 2020.3.19
  • Project Auditor version: 0.8.2

Rule Descriptors Ids as strings are not comparing probably when checking if descriptor is enabled.

Describe the bug
If you add a Rule entry into the Project Settings and set the Id As String to the rule you want to enable, it will not be enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Project Settings -> Project Auditor
  2. Add a Rule with Id As String of "PAA0007"
  3. Run an analysis with Assets enabled and at least one texture in the project
  4. Set a breakpoint in AnalysisContext::IsDescriptorEnabled
  5. Step into the Params.Rules.GetRule call and notice that the Equals call between the Descriptor instances will fail

Expected behavior
Rules that you place in the Project Settings will run.

Screenshots
Screenshot 2024-03-06 at 11 12 43 AM
Screenshot 2024-03-06 at 11 45 08 AM

Information (please complete the following information):

  • OS: Windows
  • Unity version: 2021.3.34
  • Project Auditor version: 0.11.0

[Feedback] Allocation marked as critical even if called only once

I have a static list that is set once and then ever again. Like this :

if (s_forbiddenSubareaList == null)
{
s_forbiddenSubareaList = SubArea.GetAllSubArea().FindAll(s => s.m_mountAutoTripAllowed == false);
}

This code is included in a method that is called very often so the auditor is flagging it as a critical memory leak but in reality it's going to be called only once in the game lifetime.

[Performance] Window OnEnable() is slow

My most recent Project Review, which focused heavily on Editor performance and iteration times, showed that the Project Auditor window's OnEnable() method is relatively expensive. Definitely not the worst offender, but it would be good to improve this if possible. This is what it looks like with the PA window open when you make a small code change and the assembly reload process refreshes all of the open windows in the Editor. Taken from Profile Analyzer, and filtered by OnEnable() . This impacts assembly recompilation/reload after every code change, and entering/exiting Play Mode if domain reload is not disabled.

OnEnableCosts

Errors when building in batchmode

Using project auditor 0.6.3-preview

No graphic device is available to initialize the view.
UnityEditor.EditorWindow:GetWindow(Type)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:ShowWindow() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1138)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:get_Instance() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:35)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:OnPostprocessBuild(BuildTarget, String) (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1243)

No graphic device is available to show the window.
UnityEditor.EditorWindow:GetWindow(Type)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:ShowWindow() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1138)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:get_Instance() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:35)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:OnPostprocessBuild(BuildTarget, String) (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1243)

No graphic device is available to initialize the view.
UnityEditor.EditorWindow:GetWindow(Type)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:ShowWindow() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1138)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:get_Instance() (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:35)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow:OnPostprocessBuild(BuildTarget, String) (at Library/PackageCache/[email protected]/Editor/UI/ProjectAuditorWindow.cs:1243)

ShowWindow should not be called in batchmode maybe?

Missing ProjectSettings.Android.optimizedFramePacing() in Unity 2020.3

Describe the bug

An exception occurred in 'optimizedFramePacing' while running the analysis.

ArgumentException: Method UnityEditor.PlayerSettings+Android.optimizedFramePacing() not found in assembly UnityEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null!
UnityEditor.Macros.MethodEvaluator.Eval (System.String assemblyFile, System.String typeName, System.String methodName, System.Type[] paramTypes, System.Object[] args) (at /Users/bokken/buildslave/unity/build/Editor/Mono/Macros/MethodEvaluator.cs:68)

To Reproduce
Steps to reproduce the behavior:

  1. Create a new project using Core-2D template in Unity2020.3.5f.
  2. Add package according to https://docs.unity3d.com/Packages/Installation/manual/upm-ui-quick.html
  3. Switch Platform for Android.
  4. Select Platform:Android and run
  5. See error

Expected behavior

Optimized Frame Pacing itself has been around since 2019.2, but as of 2020.3 there is no API to access it from code.

The Project Auditor settings file (Data/ProjectSettings.json) defines it as available from 2019.2, so trying to reference it will throw an exception.

It's working fine on 2022.3 and 2021.3.

Information (please complete the following information):

  • OS: macOS Ventura 13.5
  • Unity version : 2020.3.5f1
  • Project Auditor version : 0.10.0

[Bug] Overflow Exception on Analysis

I tried to analyze a sizable project, it's been 7 hours already I have no idea if it's gonna finish analyzing. Task manager shows very little disk/processor usage for the Unity process...
image

[Bug] StackOverflowException when viewing Shader Variants

It's been reported that the Editor throws a StackOverflowException when viewing Shader Variants in Project Auditor.

Package Version: ec82257
Unity Version: 2020.3.11f1 and 2019.4.22f1

Repro steps:

  • build
  • open auditor
  • hit analyse
  • view assets -> shader variants
  • hit refresh

[Bug] Muted issue not staying muted

Sometime muted issues come back on next analyse. I'm not sure of a 100% repro but for example it can happen if you mute an issue, edit some code and then come back to the auditor.

[Feature] New Recommended package version

Problem
Sometimes an installed package is not the latest Recommended version. For example:

recommended-package

Note that some packages might print a message is the console:

package-update-console

However, neither it allows you to upgrade, nor to open Package Manager.

Solution
Project Auditor should report any package that is upgradable to a recommended version and it should allow the user to do so with a simple click without having to open Package Manager.

Add to DateTime suggestion

Problem statement
Usually when people use DateTime it is because it is convenient for comparison of two time stamps to get the delta in seconds. This is a slow way to get this data.

Proposed solution
When DateTime is used to get a seconds delta use StopWatch. It is very fast and precise.

Detect WithoutBurst usage

ECS code should always be Burst'ed. In a few cases it might be needed to disable it but that should be the exception.

Let's add support for detecting WithoutBurst usage.

Shader variant `Player.log` parsing does not correctly parse unnamed passes (Unity 2021.2.14+)

Describe the bug
Shader variant Player.log parsing does not correctly parse unnamed passes, starting with Unity 2021.2.14 (I did a binary search of Unity downloads today to narrow it down). Changes to the format seems to be a recurring theme, but unfortunately this time it was introduced in a patch release, so the UNITY_2021_3_OR_NEWER scripting define symbol won't cut it this time in the special case handling. This new format also applies to the latest LTS at the time of writing (2021.3.16). The pass new format is of the form pass: <Unnamed Pass 0>.

I also noticed a difference in Editor.log: The pass name is an empty string rather than Pass 0

Snippets from Unity 2021.2.13 logs

Editor.log

Compiling shader "Hidden/BlitCopy" pass "Pass 0" (vp)
    1 / 1 variants left after stripping, processed in 0.00 seconds
    starting compilation...

Player.log

Compiled shader: Hidden/InternalClear, pass: unnamed, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/InternalClear, pass: unnamed, stage: pixel, keywords <no keywords>
Compiled shader: Hidden/Internal-GUITexture, pass: unnamed, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/Internal-GUITexture, pass: unnamed, stage: pixel, keywords <no keywords>
Compiled shader: Sprites/Default, pass: unnamed, stage: vertex, keywords <no keywords>
Compiled shader: Sprites/Default, pass: unnamed, stage: pixel, keywords <no keywords>
Compiled shader: Hidden/BlitCopy, pass: unnamed, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/BlitCopy, pass: unnamed, stage: pixel, keywords <no keywords>

Snippet from Unity 2021.2.14 logs

Editor.log

Compiling shader "Hidden/BlitCopy" pass "" (vp)
    1 / 1 variants left after stripping, processed in 0.00 seconds
    starting compilation...

Player.log

Compiled shader: Hidden/InternalClear, pass: <Unnamed Pass 7>, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/InternalClear, pass: <Unnamed Pass 7>, stage: pixel, keywords <no keywords>
Compiled shader: Hidden/Internal-GUITexture, pass: <Unnamed Pass 0>, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/Internal-GUITexture, pass: <Unnamed Pass 0>, stage: pixel, keywords <no keywords>
Compiled shader: Sprites/Default, pass: <Unnamed Pass 0>, stage: vertex, keywords <no keywords>
Compiled shader: Sprites/Default, pass: <Unnamed Pass 0>, stage: pixel, keywords <no keywords>
Compiled shader: Hidden/BlitCopy, pass: <Unnamed Pass 0>, stage: vertex, keywords <no keywords>
Compiled shader: Hidden/BlitCopy, pass: <Unnamed Pass 0>, stage: pixel, keywords <no keywords>

To Reproduce

  1. Create a new project in Unity 2021.2.14 or later in the 2021 series. I've been doing my testing using the 3D (URP) Core template.
  2. Follow the steps outlined in the Variants documentation.
  3. Observe the missing compiled shaders. If you export a shader variant collection and use it in shader stripping, you'll notice pink textures when running the exe.

Expected behavior
Should correctly parse unnamed passes

Screenshots
If applicable, add screenshots to help explain your problem.

Information (please complete the following information):

  • OS: Windows
  • Unity version: 2021.2.14 - 2021.3.16
  • Project Auditor version: 0.9.0-preview

Additional context
Add any other context about the problem here.

When I get some time, I'll look into contributing a fix in the ShaderModule code.

[Feature] Can build reports include the file path the build was created in?

During a Project Review, a customer asked whether the Build Report view could include the full path and (where appropriate) executable name for the folder that was selected to contain the build. I don't recall seeing that in the original Build Report Inspector so I don't know how easy this would be - although I'm pretty sure the build path ends up getting logged in the console window, so I guess it would show up in the Editor.log, so... Maybe?

Adding issue here as a reminder to investigate the possibility when there's time.

[Bug] float marked as array allocation

The following code gives a critical array allocation warning for each line:

//inside a for loop
Rect aabb = Rect.zero;
aabb.x = Mathf.Min(0.5f, camMin.x, camMax.x, camCenter.x);    //the three other arguments are all Vector2's
aabb.y = Mathf.Min(0.5f, camMin.y, camMax.y, camCenter.y);
aabb.xMax = Mathf.Max(0.5f, camMin.x, camMax.x, camCenter.x);
aabb.yMax = Mathf.Max(0.5f, camMin.y, camMax.y, camCenter.y);

Moving the 0.5f into a variable continues to give an error. Moving the variable outside the loop and changing it to a class constant still generates the errors, which are once again marked critical.

NullReferenceException on MonoCecilHelper.IsOrInheritedFrom method

Describe the bug

NullReferenceException invoked when try to analyze code issues.

To Reproduce
Steps to reproduce the behavior:

  1. Open Project Auditor Window
  2. Select Code Module in Modules field from window.
  3. Press Analyze
  4. Code analyze failed. There is no entry in Code view.
    And error in console view

Object reference not set to an instance of an object Unity.ProjectAuditor.Editor.CodeAnalysis.MonoCecilHelper.IsOrInheritedFrom (Mono.Cecil.TypeReference typeReference, System.String typeName)

Expected behavior
Code compilation finished without error and user can see code analysis on Code view.

Information (please complete the following information):

  • OS: MacOS Ventura
  • Unity 2021.3.9
  • Project Auditor version 0.8.4 preview

Oddly-worded button names in Assets > Diagnostics prompt

Describe the bug
Pressing View > Assets > Diagnostics yields an oddly-worded set of buttons.

To Reproduce
Steps to reproduce the behavior:

  1. Go to View > Assets > Diagnostics
  2. Observe the buttons labeled "Ok" and "No"

Expected behavior
I expected the buttons to show:

  • "Yes" and "No"
    Or reword the description and buttons:
  • "AssetDignostic analysis will now begin"
  • "Okay" and "Cancel"

Screenshots
image

Fatal Error when trying to analyze Textures in 2022.3.1f1

Whenever I try to analyze 'Textures' of my project, I am always met with a specific bug that tells me I am out of memory, whereas I have 32 GB of RAM which I believe is enough.

Steps to reproduce the behavior:

  1. Window>Analysis>Project Auditor
  2. Click Analyze
  3. Click the "View: Summary" dropdown box and locate Assets>Textures>Textures and click "Ok" on the popup window
  4. After a while, a fatal error will pop out and freeze your system is why I had to take a photo of the issue with my mobile phone instead of screenshot

Expected behavior:
I expected it to go through with no errors and the analysis to be completed

Screenshots:
IMG_20240229_142638

System Information:

  • OS: Windows 11 (10.0.22622) 64bit
  • RAM: 32 GB
  • GPU: RTX 4070
  • Unity 2022.3.1f1
  • Project Auditor 0.10.0

[Feature] Custom IssueCategory support

Project Auditor should be extendable without having to modify Project Auditor's package. This is not possible today as the IssueCategories are defined in this enums. We should provide an API that allows anyone to add new enums (perhaps via Reflection).

[Feature request] Do not create config if already exists

Problem statement
Not having user control over the location of the config file can be frustrating.

Proposed solution
Before creating the config file, check if it already exists in the project. And use it if found.

For instance, ProBuilder does the following when getting a vertex color palette (scriptableobject).
https://github.com/Unity-Technologies/com.unity.probuilder/blob/44bd74a35d984b7e3e9ad4b23ad6704d1227c3ea/Editor/EditorCore/VertexColorPalette.cs#L76-L77
https://github.com/Unity-Technologies/com.unity.probuilder/blob/44bd74a35d984b7e3e9ad4b23ad6704d1227c3ea/Editor/EditorCore/FileUtility.cs#L139-L149

I think the following should work, but I'm not familiar with this project so it's just a reference.
ryagiuchi@0f03916

Thank you for your consideration.

[Feature Request] Add option to analyze assets that go into build.

Problem:
The tool is great, but does not allow you to revise the resources that will be packed into build, it analyzes assets of the entire project.
It would be great to have an option to set a desired platform and have this relevant information, it would help immensely to figure out, localize and optimize the problems.

Solution:
Have an option to select a platform and specify that you want to only see the assets that go into the according build.
Analyze assets dependencies, including bundles (addressables), and display information about it.
Analyzing stripped code would be great too, but not as important as, for example, being able to see which textures will be used in build.

Sorting is not in proper order in Build Size and Resources view

Describe the bug
In the Resources and Build Size views, sorting by path name, asset name, or asset type does not produce an order of items that is actually sorted. In short, sort is broken.

To Reproduce
Steps to reproduce the behavior:

  1. Open a view
  2. Sort by name, asset type, or path. The issue seems to relate to most lexical values.

Expected behavior
Items should be lexically sorted.

Screenshots
image

Information (please complete the following information):

  • OS: OS X
  • Unity 2021.2.x
  • Project Auditor version 0.8.0-preview

Stack overflow when reports are saved

Describe the bug
Analysis will always fail in our project due to stack overflow when it reaches the end and tries to save, no matter which settings I use. It will also instantly close the Unity editor.

To Reproduce
Steps to reproduce the behavior:

  1. Have a reasonably sized project (in this case, the Vampire Survivors Unity project)
  2. Open Window/Analysis/Project Auditor
  3. Hit 'Start Analysis'
  4. See error

Expected behavior
The report finishes without Unity crashing to desktop :)

Information:

  • OS: Windows
  • Unity version: 2021.3.33f1
  • Project Auditor version: 0.11.0

Additional context
I've attached the Editor-prev.log file of a run where this error occurred (I've deleted identifying information)

Editor-prev.log

Script compilation errors if both RP package installed

If both HDRP and URP package is installed, the following compilation error occurs:

Library/PackageCache/com.unity.project-auditor@752b820c58/Editor/SettingsAnalysis/SrpAssetSettingsAnalyzer.cs(105,17): error CS0246: The type or namespace name 'HDRenderPipelineAsset' could not be found (are you missing a using directive or an assembly reference?)

Item selected value at bottom of the page

Describe the bug
Item selected value at bottom of the page is set to an absolute value and not moving with the bottom of the screen

To Reproduce

On Resolution 1920x1080 display the string"0/2000 Items Selected" appears to be forced under the Inverted Call Hierarchy Visual Panel

The only reason I complain is that usually on a PR we are on Macbooks with no other screens so opening the auditor takes a lot of screen screen space. Maybe we can move it above the Issue Panel.

Screenshots
auditorBug

[Bug] Erroneous reporting of forward rendering

Project Auditor reports that both Forward and Deferred rendering are being used in the project, when in fact the whole project is only using deferred rendering (Built-in Render Pipeline). See screenshot.

PA_Bug

[Bug] "Analysis in progress..." can show indefinitely

Steps to reproduce:

  1. Select Assets/Editor/ProjectAuditorConfig and tick the "Log Timings Info" checkbox. Ensure the Console window is visible
  2. Open Project Auditor, and click Analyze
  3. After clicking the button, do not interact with the computer: don't move the mouse or touch the keyboard
  4. Note how when the Project Auditor logs into the console that it has completed, the window still shows the yellow "Analysis in progress..." text. It will continue to do so until you reach step 5.
  5. Mouse the mouse. The Project Auditor window will immediately refresh and stop showing the "Analysis in Progress..." text.

Expected results: Project Auditor window should refresh as soon as analysis is complete, so that it doesn't appear to be analyzing for much longer than it actually is.

Mono Cecil code compilation error

Hi,
I'm part of one of Electronic Arts mobile teams, trying to develop a new game.
We were using this package for a while now and everything was ok until we decided to upgrade the Unity version from 2020.3 to 2021.3.9f8 both LTS versions.
There is a compile error when using 2021.3 and we wonder if you can do a quick fix for this one.
This error is present in both the official version and in our modified version

"Library\PackageCache\com.unity.project-auditor@b19edc002e\Editor\InstructionAnalyzers\BoxingAnalyzer.cs(51,41): error CS1061: 'GenericParameterConstraint' does not contain a definition for 'IsValueType' and no accessible extension method 'IsValueType' accepting a first argument of type 'GenericParameterConstraint' could be found (are you missing a using directive or an assembly reference?)"

Thank you
[email protected]

Have anyone use ProjectAuditor in Unity2017.4?

Today I imported all the package into a empty project of Unity2017. There were lots of error waiting for me. Was it really usable for Unity2017 ?

At least I found “UnityEditor.Build.Reporting” is not avaliable in Unity2017.

[Bug] "Call tree (slow)" checkbox causes errors in Resources view

To reproduce:

  1. Right click on the Project Auditor tab and select Developer Mode
  2. Analyze a project
  3. Navigate to the Resources view
  4. Enter a string into the Filter box
  5. Tick the "Call tree (slow)" checkbox.

(You can perform steps 2-5 in any order and get the same result).

Result: Console error (shown below) and an empty Tree View window.
Expected Result: No errors? I think probably the "Call tree (slow)" checkbox should be greyed-out like it is in the other non-code views, or possibly hidden completely in non-code views.


NullReferenceException: Object reference not set to an instance of an object
Unity.ProjectAuditor.Editor.TextFilter.MatchesSearch (Unity.ProjectAuditor.Editor.DependencyNode node, System.Boolean recursive) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/TextFilter.cs:55)
Unity.ProjectAuditor.Editor.TextFilter.Match (Unity.ProjectAuditor.Editor.ProjectIssue issue) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/TextFilter.cs:29)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.Match (Unity.ProjectAuditor.Editor.ProjectIssue issue) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:114)
Unity.ProjectAuditor.Editor.UI.Framework.IssueTable.<BuildRows>b__18_0 (Unity.ProjectAuditor.Editor.UI.Framework.IssueTableItem item) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/IssueTable.cs:116)
System.Linq.Enumerable+WhereArrayIterator`1[TSource].ToArray () (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable`1[T] source) (at <351e49e2a5bf4fd6beabb458ce2255f3>:0)
Unity.ProjectAuditor.Editor.UI.Framework.IssueTable.BuildRows (UnityEditor.IMGUI.Controls.TreeViewItem root) (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/IssueTable.cs:114)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.FetchData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeViewDataSource.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeView+TreeViewControlDataSource.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeViewController.ReloadData () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
UnityEditor.IMGUI.Controls.TreeView.Reload () (at <c84609c921cb488481d7d8a5fcdf9588>:0)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.Refresh () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/Framework/AnalysisView.cs:131)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.RefreshDisplay () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:586)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.OnGUI () (at Library/PackageCache/com.unity.project-auditor@e388503b3f/Editor/UI/ProjectAuditorWindow.cs:207)

Severity category incorrectly named "Info" instead of "Minor"

To Reproduce
Steps to reproduce the behavior:

  1. Open a report
  2. Navigate to View > Code > Diagnostics
  3. Change the dropdown to Group By: Severity
  4. Note the category names in the tree below, "Info", "Moderate", "Major"

Expected behavior
It is expected that the list shows "Minor" as a category rather than "Info", to match the string in the Severity column

Screenshots
image
image

Null Reference when exporting the Build Size Data to CSV

Describe the bug
When trying to export the build size data to CSV there is a null reference error. The file it's created but it's empty.

NullReferenceException: Object reference not set to an instance of an object
System.Linq.Enumerable+SelectManySingleSelectorIterator`2[TSource,TResult].MoveNext () (at <f97e358e7a5e4bf5ba1b3e551d919146>:0)
System.Linq.Enumerable.TryGetFirst[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate, System.Boolean& found) (at <f97e358e7a5e4bf5ba1b3e551d919146>:0)
System.Linq.Enumerable.FirstOrDefault[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) (at <f97e358e7a5e4bf5ba1b3e551d919146>:0)
Unity.ProjectAuditor.Editor.Report.GetLayout (Unity.ProjectAuditor.Editor.IssueCategory category) (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/API/Report.cs:250)
Unity.ProjectAuditor.Editor.Core.Exporter.Export (System.String path, Unity.ProjectAuditor.Editor.IssueCategory category, System.Func`2[T,TResult] predicate) (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/Core/Exporter.cs:24)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.Export (System.Func`2[T,TResult] predicate) (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/Framework/AnalysisView.cs:692)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.DrawDataOptions () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/Framework/AnalysisView.cs:587)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.DrawToolbar () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/Framework/AnalysisView.cs:509)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.DrawTable () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/Framework/AnalysisView.cs:456)
Unity.ProjectAuditor.Editor.UI.Framework.AnalysisView.DrawContent (System.Boolean showDetails) (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/Framework/AnalysisView.cs:391)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.DrawReport () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/ProjectAuditorWindow.cs:1626)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.DrawPanels () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/ProjectAuditorWindow.cs:1466)
Unity.ProjectAuditor.Editor.UI.ProjectAuditorWindow.OnGUI () (at Library/PackageCache/com.unity.project-auditor@d9a7891015/Editor/UI/ProjectAuditorWindow.cs:485)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition) (at <6e08e61cfda04255b3972ba7f0515fae>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect dockAreaRect) (at <6e08e61cfda04255b3972ba7f0515fae>:0)
UnityEditor.DockArea.OldOnGUI () (at <6e08e61cfda04255b3972ba7f0515fae>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <4afa7aba4e754829b9f32c254e65e7c8>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <2880c19c3b344d8cb20d5ad03e3efbe5>:0)

To Reproduce
Steps to reproduce the behavior:

  1. Open ProjectAuditor
  2. Analyze the Build Report from an Android build.
  3. Go to Build > Build Size > Click Export > All
    image

Expected behavior
A CSV file populated with build data is created at the selected location.

Information (please complete the following information):

  • OS: Windows 11
  • Unity version: 2021.3.20f1
  • Project Auditor version: 0.11.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.