Page 1 of 1

Profiling running Unity process

Posted: Thu Oct 26, 2017 4:56 pm
by jannerasanen
Hey,

I've got .NET Memory Profiler 5.5.

Is it possible to profile a running Unity process?

When I try to attach to a running process (via Visual Studio -> Profiler -> Attach Profiler to Process), the running Unity process is not listed. When I try spawn the process and attach automatically (Profiler -> Profile Application) the profiler window never gets past phase "Waiting for .NET runtime to be loaded".

I'm currently using .NET 4.6 with Unity 2017.1.0p4.

Re: Profiling running Unity process

Posted: Fri Oct 27, 2017 8:33 am
by Andreas Suurkuusk
As long as the Unity application is running under the .NET runtime, e.g. as a Universal Windows App under .NET Core, then you should be able to attach to the process, or to profile the process using File->Profile Windows App. You must make sure that you don't use the IL2CPP script runner or Mono, as that is not supported by .NET Memory Profiler.

We don't have any experience with Unity, but I did a quick test yesterday and it seemed to work well to profile a .NET based Unity application.