Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    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:
    2,460
    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.