Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Update for Frame Timing Manager

Discussion in 'Profiler Previews' started by antonk-unity, Nov 2, 2021.

  1. alexeyzakharov

    alexeyzakharov

    Joined:
    Jul 2, 2014
    Posts:
    507
    Sorry for this - as a part of Dynamic Resolution feature we only supported on 2021 iOS
    , macOS and tvOS (Metal only), Android (Vulkan only), Windows Standalone (DirectX 12 only), and UWP (DirectX 12 only). We've extended support to almost all platforms it in 2022, but it required changes that could destabilize 2021, so we didn't backport those changes to 2021.

    One option you may be able to use depending on the platform is native graphics plugin API - https://docs.unity3d.com/2021.3/Documentation/Manual/NativePluginInterface.html
    It should be possible to obtain the render device and use it to issue timestamps/timerqueries at a certain point of frame and collect later.
     
    paulatwarp and MartinTilo like this.
  2. paulatwarp

    paulatwarp

    Joined:
    May 17, 2018
    Posts:
    134
    It turns out it does work for my platform in 2021.3 :D, just not in the editor.
     
    MartinTilo likes this.
  3. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    379
    Funny. For me it works in the editor and standalone development builds but NOT in standalone release builds. :/
    Unity 2021.3.22f1
     
  4. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,406
    The improvements mentioned in this thread landed on 2022.1.0a14
     
  5. Xaron

    Xaron

    Joined:
    Nov 15, 2012
    Posts:
    379
    Thank you! Understandable.
     
    MartinTilo likes this.
  6. peterc-neq

    peterc-neq

    Joined:
    Jan 17, 2024
    Posts:
    2
    Hi, I was wondering if you could help.

    I am using Unity 2022.3.14f1.

    I have a script that collects profiling data using ProfileRecorders with the Time Manager Manager enabled over 60 frames. However the data I am collecting seems quite inconsistent and it would be great to get some clarification on what I am seeing.

    The stats I am collecting are :-

    "CPU Total Frame Time"
    "CPU Main Thread Frame Time"
    "CPU Render Thread Frame Time"
    "GPU Frame Time"
    "Main Thread"
    "PlayerLoop"

    The problem I am seeing is that "CPU Total Frame Time", "CPU Main Thread Frame Time", "Main Thread" and "PlayerLoop" stats seem quite inconsistent, for example on one frame "CPU Total Frame Time" is the slower value where as on another "CPU Main Thread Frame Time" is slower and another the "PlayerLoop" stat is slower.

    I would expect that there should be a stat that is consistently the slowest stat, that stat shows the time the whole frame takes on the CPU(including waiting for other threads to sync with the main thread).

    Any information on this would be of great help.
     
  7. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    2,406
    For others following along, the above has been answered in this thread.
     
    codestage likes this.