Use all of Unity 6's profiling tools in the smartest and most efficient way (Part 2)
Project AuditorProject Auditor scans your entire project and provides detailed reports about inefficiencies, such as heavy scripting calls, unused assets, excessive entity counts, and more.
The Project Auditor covers several different areas:
- Performance optimization: It identifies problems that could impact your project’s runtime performance, such as excessive garbage generation, unnecessary object allocations, or expensive function calls.
- Code and asset review: It highlights unused assets, inefficient code patterns, or outdated APIs that can be refactored. This helps reduce build size, improve overall project maintainability, and optimize memory use.
- Diagnostics and best practices: It provides recommendations based on Unity best practices and highlights errors or warnings related to your project setup, such as missing references or suboptimal Player and Quality settings.
- Customizable reports: It organizes the results into categories, making it easy to prioritize optimizations. You can also create custom rules to tailor the analysis to your specific project or needs.
Deep ProfilingI still see a lot of misunderstanding about how deep profiling works. Luckily, the book highlights it once again:
"Enabling Deep Profiling will result in the insertion of Profiler markers at the beginning and end of each function call."
And a very important point following from this:
"However, deep profiling adds a marker to the start and end of every function call, and each marker adds some overhead. This means that a part of your code which has a deep call stack (say MyDeepFunction) will show up as more expensive than places which do all their work inside a single function (MySingleFunction). That means you cannot rely on the relative timing of these two pieces of code – MyDeepFunction might look more expensive than MySingleFunction with deep profiling enabled, but this cost could all be in the extra markers added."
https://unity.com/blog/use-unity-6-profiling-tools-smart-efficient#profiling #performance #optimization