Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
VGSources
Blog

How to Debug and Fix Performance Problems in Unity With the Profiler

A repeatable Unity Profiler workflow: capture the slowdown, investigate the right module, make one measured change, and verify it on the target platform.
WorldUnity With the Profiler Length5 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To debug a Unity performance problem, reproduce it in a consistent scene and action, capture a representative slow frame, then use CPU Usage to locate the work and the relevant Profiler module to investigate it. Test suspected fixes with comparable captures, and make release-performance decisions from a Development Build running on the intended target platform—not from Editor Play mode alone.

Set up a repeatable capture

Open the Profiler from Window > Analysis > Profiler. The exact menu wording can vary by Unity Editor version. Unity’s Profiler overview describes the window as a way to inspect performance information across areas including CPU, memory, rendering, and audio.

  1. Reproduce the symptom. Use the same scene, player action, camera view, and device conditions each time. A stable scenario makes it possible to distinguish a real change from normal variation.
  2. Capture the frame that matters. Inspect a representative slow frame or spike as well as the surrounding frames. An average can conceal a brief hitch that players notice.
  3. Profile the intended release platform. Unity’s 2022.2 manual says, “The best way to get accurate timings about your application is to profile it on the end platform you intend to publish it on.” For a connected target Player, that manual requires a Development Build; enabling Autoconnect Profiler lets the Player connect to the Editor’s Profiler.
  4. Use Play mode for quick checks, not final proof. Play mode runs in the Editor process, where Editor systems compete with the game for CPU, GPU, and memory. To reduce interference during a quick check, maximize the Game view and close unnecessary Editor windows. Validate the result again on target hardware.

Profiling itself affects performance. Keep build type and conditions consistent when comparing captures, and treat a profiling build as a measurement tool rather than a direct stand-in for the final player build. Where appropriate, separately validate a non-development build.

Start with CPU Usage, then follow the evidence

The CPU Usage module provides a broad view of per-frame CPU work. Select a slow frame and inspect its detailed data; use the largest relevant contributors to decide where to look next, rather than guessing from the symptom alone. Unity’s 2019.4 Profiler window guide describes the module workflow, while module details and labels can differ in other Editor versions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Script work and call paths

In CPU Usage details, inspect marked methods and engine callbacks that contribute to the selected frame. If a sample is difficult to trace, enable Call Stacks for relevant samples such as GC.Alloc. This can show the call path that led to the sample without instrumenting every script method.

If the code you need to inspect has no useful marker, add a narrow, explicit ProfilerMarker around the suspected region and capture again. Unity’s Unity 6.0.65f1 Profiler scripting API also documents BeginSample and EndSample for custom sections. Keep instrumentation focused so the capture answers a specific question.

Managed allocations and garbage collection

Find GC.Alloc samples and use Call Stacks to investigate their origin. Check whether allocations recur in the slow frames or happen during loading or another one-off event. A single allocation sample does not, by itself, establish a frame-time problem; its frequency and context matter.

Rendering workload

Use the Rendering module to inspect information such as batching, SetPass and draw calls, triangles, and vertices. These counts are clues, not universal optimization targets: interpret them alongside the frame’s timing and the specific scene or view that reproduces the issue.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Memory trends

The Memory module can help reveal allocation and asset-memory trends. For deeper memory analysis, Unity lists the Memory Profiler as a separate tool in its Profiler overview; its package-specific workflow is outside the scope of the cited overview.

GPU timing

When supported, GPU Usage helps show where the application spends GPU time. Support depends on platform and graphics API. Unity’s cited GPU Usage documentation identifies itself as a 2019.4 manual, lists restrictions, directs Metal users to Xcode’s GPU Frame Debugger in the documented contexts, and identifies unsupported Vulkan configurations. Check the manual for the project’s own Unity version and platform. If the module is unavailable, do not infer GPU time from a CPU chart alone.

Choose the right level of diagnostic detail

Approach Best use Trade-off
Editor Play mode Quick iteration on a suspected issue. Editor work shares resources with the game, so results are less representative of release hardware.
Development Build on target platform Assess performance on the intended device; Autoconnect Profiler can connect a target Player to the Editor Profiler. Requires a Development Build and target-device setup. Profiling still adds overhead.
Built-in markers and Call Stacks Trace relevant samples, including allocation call paths, with focused diagnostic detail. Useful only where available markers and captured call-stack information answer the question.
Deep Profile Investigate script-method calls when ordinary profiling does not provide enough detail. Unity warns it can add substantial overhead and memory use, slow the application significantly, and be impractical for complex or large projects.
Specialized supporting tools Investigate a focused area, such as deeper memory analysis with the Memory Profiler or GPU work with a platform debugger. Tool choice and availability depend on the problem, package, Unity version, platform, and graphics API.

Use Deep Profile as a temporary diagnostic, not the default capture mode. Unity’s profiling guidance describes its overhead and cautions against using it indiscriminately. The Unity 6 scripting API also notes that most Profiler API functionality is available only in Development Builds because profiling negatively affects performance.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Tell a CPU problem from a GPU problem

Compare CPU and GPU timing evidence from the same representative scenario. A long CPU frame points toward work measured on the CPU; GPU Usage, when supported, can provide evidence about GPU time. Neither a high rendering count nor a CPU chart alone proves which resource is the bottleneck. If GPU timing is unsupported for the project’s platform/API combination, the Profiler cannot supply that evidence through the GPU module.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Apply one change and verify it

  1. Write down the suspected cause. Tie it to a sample, module reading, recurring allocation, or measured spike in the capture.
  2. Change one suspected cause. Avoid bundling unrelated optimizations; otherwise, a changed result is harder to attribute.
  3. Repeat the same capture scenario. Keep the scene, action, view, device, build type, and relevant conditions consistent with the baseline.
  4. Compare the affected frame and relevant values. Check whether the specific contributor changed and whether the original hitch improved. Do not claim a particular FPS gain unless repeatable project measurements show it.
  5. Revalidate on target hardware. Unity recommends validating changes on target devices. A promising Editor result is not sufficient evidence for release performance.

When reporting a measured result, identify the device, Unity version, build type, scenario, and before-and-after conditions. That context matters because profiling overhead and hardware can change the timings.

Common profiling mistakes to avoid

  • Treating Editor timings as device truth: Editor activity competes for system resources. Use Play mode to iterate, then profile on the target platform.
  • Optimizing an isolated count: Draw calls, triangles, or a single allocation are evidence to investigate, not automatic proof of the cause.
  • Turning on Deep Profile first: Its instrumentation can substantially alter runtime behavior. Try ordinary CPU details, Call Stacks, or a small ProfilerMarker first.
  • Assuming GPU timing is always available: The cited GPU support information is version-specific and depends on platform/API. Consult documentation for the project’s actual configuration.
  • Comparing unlike captures: Different scenes, build types, devices, or actions make it difficult to attribute a timing change to the code change.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How To Create Custom Stickers & Shoutouts In Monster Hunter WildsMonster Hunter WildsBlog20min
  2. How to Get XL Gogoat in Pokemon Legends Z-A (An Extra-Large Gogoat)Pokemon Legends Z-ABlog20min
  3. How to Get Rotting Lightbringer in Diablo 4Diablo 4Blog17min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.