Profiling running Unity process

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
jannerasanen
Posts: 1
Joined: Thu Oct 26, 2017 4:51 pm

Profiling running Unity process

Post by jannerasanen » Thu Oct 26, 2017 4:56 pm

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.

Andreas Suurkuusk
Posts: 1000
Joined: Wed Mar 02, 2005 7:53 pm

Re: Profiling running Unity process

Post by Andreas Suurkuusk » Fri Oct 27, 2017 8:33 am

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.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests