Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using Profiler effectively?

Discussion in 'Editor & General Support' started by Cyclops, Jul 21, 2010.

  1. Cyclops

    Cyclops

    Joined:
    Jan 31, 2010
    Posts:
    111
    Recording

    How do I record Profiler data while the Game Window is maximized? When I have the Profiler as a tab next to Game, hit record, then play - the Game Window maximizes and the Profiler tab is no longer visible. When I stop play, I don't see any Profiler data. The only way I can get it to record, is by pulling the Profiler tab out into a separate window (which stays on top of the screen, partially covering the Game). Is this correct behavior? Or am I missing something?

    Selecting data

    On the Graph Display, is there any way to select a range of frames? I would like to see one second's worth of data, for instance. Most of the numbers I'm seeing are 0.0ms, only occasionally spiking up to 0.1ms or 0.2ms.

    Interpreting the data

    On the Numeric Data display (or whatever the bottom half of display is called), for a random frame, I see that my Scripts generally take 0.05ms, and 40% of the Total (Deep Profiling on). What I assume is the Total Frame value runs from 0.10ms - 0.15ms and 5000-8000 FPS.

    On the Graph display, there are no spikes above 0.25ms (except script initialization). So, this would seem to indicate that everything is fine, I shouldn't see any slowdowns in the game.

    Is that a reasonable interpretation? If all frames are running under 0.2ms, and all of my functions are called from Update() (no co-routines), then those functions should all be completed in less than 0.2ms, correct?

    I can't see how it wouldn't be correct :) Yet I'm getting weird slowness in one position-computing function versus another version of the same function. But if both functions complete in under 0.2ms, then why would one be visibly slower than the other?

    John C>
    "For all your days, prepare, and meet them ever alike;
    When you are the anvil, bear - when the hammer, strike."