Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question Clarifications for the Unity Profiler class api.

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

  1. GalShaffir1


    Mar 3, 2022
    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


    Jan 24, 2013
    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.