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

Question Clarifications for the Unity Profiler class api.

Discussion in 'Documentation' started by GalShaffir1, May 29, 2022.

  1. GalShaffir1

    GalShaffir1

    Joined:
    Mar 3, 2022
    Posts:
    4
    Hello everyone!

    I have recently started messing around with the unity profiler for the first time, my goal is to monitor GPU and CPU usage in my project through script and display the data on screen.
    I'm using the profiler class in order to achieve this but I have some questions to which I didn't get a full answer when going through the documentation and looking through the forums (all regarding the "memory" category in the profiler):

    1) What is the right stat to get the current ram usage? Is it "Total Used Memory"? What is the difference between this and "System Used Memory"

    2) Is there a way to get the VRAM usage of the graphics card? if not, what is the best way to monitor GPU usage through the profiler api (by monitoring gpu usage i mean what is the current work load of the gpu and how high is it regarding the total workload the gpu can handle)

    3) what is the meaning in "Gfx Used Memory"? this memory is allocated on the RAM or the GPU?
    In addition what is the difference between this stat and "UnityEngine.Profiler.GetAllocatedMemoryForGraphicsDriver"? they both appear to have the same value in my scene

    *) I have used the Memory profiler module in unity api.
    *) My project unity version is 2020.3.29f1


    Some questions might appear trivial but stiil any help would be much appreciated, thank you!
     
    Last edited: May 29, 2022
  2. Baste

    Baste

    Joined:
    Jan 24, 2013
    Posts:
    6,294
    If there's lacks in the documentation, somebody from the profiler team like @MartinTilo would probably want to know!

    Most of the information and activity about profiling happens in this subforum.