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. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

Question Memory Profiler TakeTempSnapshot crashes on console

Discussion in 'Profiler Previews' started by Shawn-Halwes, Jun 15, 2021.

  1. Shawn-Halwes

    Shawn-Halwes

    Joined:
    Jul 17, 2013
    Posts:
    51
    I am trying to trigger a Memory Profiler snapshot via the API. I am running a player on device and connecting the profiler to the device. I have gotten successful snapshots using the editor capture button, but I need to be more precise than using the editor button.

    When I try:
    UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeTempSnapshot(...)
    UnityEngine.Profiling.Memory.Experimental.MemoryProfiler.TakeSnapshot(Application.temporaryCachePath + "/MySnap.snap", ...)

    It just crashes with an invalid mount error on the console.

    Since it works by using the Memory Profiler editor Capture button it seems like I should be able to call some API to make it work via the player code.

    Is this true? Is there something special about the player path I need to designate since it is running on device?

    (I also posted this on the console specific Unity forums hoping to get an answer there too.)
     
  2. MartinTilo

    MartinTilo

    Unity Technologies

    Joined:
    Aug 16, 2017
    Posts:
    1,948
    Hi there,
    I'll not get into which paths work on this side of the forums, console support should hopefully get back to you on that one. TakeTempSnapshot not working seems to be an oversight on our side though. Could you please report that as a bug through the in-Editor bug reporter tool under Help -> Report A Bug ?
     
  3. Shawn-Halwes

    Shawn-Halwes

    Joined:
    Jul 17, 2013
    Posts:
    51
    Bug number 1344238
     
    MartinTilo likes this.