To profile various metrics and track the performance impact of mesh combining, you can use the profiling feature. Follow these steps to set up and enable profiling:
Open the profile modules settings: In the Unity Editor, navigate to "Window" > "Analysis" > "Profiler" to open the Profiler window. Then, click on the gear icon in the Profiler window toolbar to access the settings:
Add the MC metrics module: In the Profiler settings, click the "Add" button to add a new module. Search for "MC metrics" in the module list and select it:
Save the profile settings: Click the "Save" button to save the profile settings with the added MC metrics module.
Enter Play mode: To start the profiling, enter Play mode by clicking the Play button in the Unity Editor toolbar or by using the shortcut Ctrl + P:
During Play mode, the Profiler window will display the performance metrics related to mesh combining, allowing you to analyze the impact on CPU usage, rendering, and other relevant metrics.
The provided screenshots are for illustrative purposes only. The actual appearance of the Profiler window and settings may vary based on your Unity Editor version and configuration.
By using the profiling feature, you can gain insights into the performance characteristics of mesh combining and optimize your project accordingly. Analyzing the metrics can help you identify potential bottlenecks, optimize your resource usage, and achieve optimal performance in your Unity project.
If you prefer to disable the profiler feature, there are a few scenarios where you might want to do so. For example, you may not want to include dependent packages.
To disable the profiler, you can add a scripting define symbol named DISABLE_PROFILE
. This can be done in the Unity Editor by following these steps:
Open the Unity Editor.
Go to "Edit" → "Project Settings" → "Player".
In the "Player Settings" inspector, scroll down to the "Other Settings" section.
In the "Scripting Define Symbols" field, add DISABLE_PROFILE
as a new symbol.
Adding this define symbol will disable the profiler functionality, allowing you to exclude the dependent packages or work with older Unity versions without any profiler-related features.