Skip to content

The VisualProfiler provides a drop in, single file, solution for viewing your Windows Mixed Reality Unity application's frame rate and memory usage.

License

Notifications You must be signed in to change notification settings

crogersarvr/VisualProfiler-Unity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Visual Profiler

The VisualProfiler provides a drop in, single file, solution for viewing your Windows Mixed Reality Unity application's frame rate and memory usage.

drawing

Missed frames are displayed over time to visually find problem areas. Memory is reported as current, peak and max usage in a bar graph.

The Visual Profiler is targeted towards profiling 3D UWP Unity applications, and has been verified to work on the following platforms:

  • Microsoft HoloLens & HoloLens 2
  • Microsoft Immersive headsets (IHMD)
  • Steam VR (HTC Vive / Oculus Rift)
  • OpenXR platforms

Installation

Clone, or download, VisualProfiler.cs and place it anywhere within the Assets folder of your Unity project.

Next, add the VisualProfiler component to any GameObject in the Unity scene you wish to profile. The profiler is initially active and visible (toggle-able via the IsVisible property), but can be toggled via the enabled/disable voice commands keywords.

NOTE: For improved rendering performance you can optionally include the "Hidden/Instanced-Colored" shader in your project along with the VisualProfiler.

IMPORTANT: Please make sure to add the microphone capability to your app if you plan on using the enable/disable keywords, in Unity under Edit -> Project Settings -> Player -> Settings for Windows Store -> Publishing Settings -> Capabilities or in your Visual Studio Package.appxmanifest capabilities.

Usage

When using the profiler look for "missed frames" which appear as orange bars. Missed frames indicate your application is not hitting its target frame rate and may need optimization work.

drawing

One should also keep an eye on the bottom memory bar to insure memory usage isn't rapidly changing or approaching the application's memory limit.

The profiler UI (such as anchoring, scale, follow behavior and UI color) can also be tweaked in the component inspector.

drawing

Feedback

To file issues or suggestions, please use the Issues page for this project on GitHub.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

About

The VisualProfiler provides a drop in, single file, solution for viewing your Windows Mixed Reality Unity application's frame rate and memory usage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 94.4%
  • ShaderLab 5.6%