Get Started with the Unity Profiler & Profile Analyzer Data on Quest

Cristiano FerreiraBlog Hero Image
Attaching the Unity Profiler and saving out trace data to help track CPU hotspots is a very reliable and easy process on the Oculus Quest. With the addition of the Unity Profile Analyzer, these tools combined offer a variety of ways that you can help shave off precious milliseconds from the CPU and set up a solid regression testing workflow. The objective of this article is to show you how to capture profiling data from your application running on the Quest and then show you how you can ingest the profiler data into the Profile Analyzer to pinpoint spikes, hotspots and performance regressions with the compare mode. For further information about these tools be sure to check out Unity’s documentation at the end of this article.

Building and Capturing

  1. Build out your APK with Development Build checked within the build menu.
  2. Install the APK on your Quest
  3. Make sure that your Quest is on the same network as your machine running the Unity editor
  4. Get your IP address and add it to the target list in the Unity profiler
    • Open command prompt
    • Enter ‘adb shell ip addr show wlan0’
    • Take note of your device’s ip address and save it
    • In Unity, open the Unity profiler
      • Window > Analysis > Profiler
      • On the top pane where you see Record, Deep Profile, Profile Editor, Editor, etc. Click the Editor dropdown and click <Enter IP> then paste in the IP address you grabbed in the previous step and hit Connect.
  5. After you’ve added the IP, you can run the game on your Quest and connect by selecting the IP you entered in the same dropdown. It may take a few seconds to connect, but right after you’ll see profiling data begin to populate the various profilers you have selected. Data is kept in a circular buffer up to x frames where x is provided as a setting. Be sure to immediately pause capture after you’ve encountered the scenario that you’d like to investigate.
    • Important note: There’s LOTS of overhead to capturing profiling data, so be sure to discount this information when getting profiling numbers and looking at frame time. Unity will show you the estimated overhead which is captured in a profiling marker at the end of the frame slice.
      • For raw frame time, we recommend using the OVRMetrics Tool without ever connecting the profiler.
  6. If you want to get timing info on sub-sections of custom functions, you can use Unity’s profiler markers to delimit beginning / end code regions with a custom string to identify the section.
    • Include UnityEngine.Profiling namespace
    • Add Profiler.BeginSample(“My code section”); before the region you want to have added to the profiler collection.
    • Add Profiler.EndSample(); after the region you want to collect profiling info on.

Saving / Loading Profiler Data

  1. Once you’ve captured enough frames and want to save out a play session, just click the save button in the profiler. This will save the *.pdata file that you can load back in at any time via the load button next to it.
    • The Unity Profiler data can be opened on other machines, so it’s good to store some tied to various versions on an internal server for regression testing later on.

Using the Unity Profile Analyzer

The Unity Profile Analyzer is useful because it pulls a set of frames captured in your Profiler trace and performs statistical analysis on them, generating useful info for each function such as min, median, mean, max timings (with clustered plotting on the side) as well as total call counts across the pulled frames and the count mean (the average count per frame). This tool can also diff 2 sets of profiling data which will provide info on performance regressions or improvements. Finding the highest median/mean timings on functions with high call counts are the best way to improve overall performance. Additionally, the functions with a huge discrepancy between mean/median time and max time will help you quickly identify spikes to alleviate. Just sort by the max column and do your checking!
Installing the Profile Analyzer Package
  1. Select Window > Package Manager
  2. Click the Packages: My Assets dropdown and select Packages: Unity Registry to show available packages
  3. Scroll to Profile Analyzer and click Install
  4. Profile Analyzer will now show up under Window > Analysis > Profile Analyzer
Profile Analyzer General Usage / Tips
  • With your profiling data loaded into the Unity Profiler, open Profile Analyzer and click the Pull Data button to pull existing frame data from the open Unity Profiler
  • When it loads you’ll get a breakdown of your heaviest functions in median time
    • Remember to verify the call count isn’t just a one-off for heavy functions if you want to work on consistently heavy functions frame by frame
  • Here is an overview of the tool window
  • Tips
    • You can drill into only user scripts (removing engine layer functions) by selecting Depth slice: 4. If you look at the Unity profiler in timeline mode, you can correlate the callstack depth to make a selection here - user scripts appear in blue and are the 4th level down. This is a quick way to see if your specific logic scripts are heavy by themselves.
      • You can do the same with rendering data to see how much time the CPU is taking to prepare opaques vs transparents, etc. for example
    • On the right side, you can find the highlighted function’s performance range histogram - you can find the exact frame the max timing was found on and then go back to the profiler to select that frame to analyze contributing factors.
Profile Analyzer Compare Mode
  • When you have profiler data loaded into the tool, click the save button to save a profile analyzer data file.
  • Pull in new data you want to compare to and save that in the same fashion.
  • Under mode, click Compare button (default is Single)
  • Load in both profile analyzer files (left and right)
    • Tip: Name them Before_<Filename> and After_<Filename> for easy differentiation
  • You’ll get a breakdown of timings on a per-function basis between the two frame sets, as long as names and labels weren’t changed between build versions.
If you have any questions, please let us know on the developer forum.

Additional Resources

Quest
Unity
Did you find this page helpful?
Explore more
GDC 2026 Highlights: What's Next on Meta Horizon OS
Catch up on GDC 2026: where VR is headed, what's new in Meta Horizon OS, and the tools and Store updates helping developers ship faster.
All, Apps, Design, GDC, Games, Quest, Unity, Unreal
The State of VR at GDC 2026: Building a Sustainable Future
Explore the state of VR from GDC 2026: stronger app discovery, growing Meta Quest usage, more $1M+ titles, and much more.
All, Design, Games, Hand tracking, Optimization, Quest, Unity, Unreal
Faster Builds, Smarter Discovery, and the LiveOps Playbook: What to Know After GDC Day 2
Explore Day 2 at GDC 2026: tools to speed up builds, optimize Store discovery, and learn LiveOps strategies from Gorilla Tag.
All, Apps, Design, GDC, Games, Optimization, Quest, Unity, Unreal

Get the latest updates from Meta Horizon.

Get access to highlights and announcements delivered to your inbox.