Memory Profiler TakeTempSnapshot crashes on console

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.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.)

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 ?

Bug number 1344238

1 Like