How to enable High Detail mode in profiler with code

In CPU usage profiler, we can click the High Detail button to enable High Detail mode. I want to know how to enable High Detail mode with code.

Or where can I find the reference document about the namespace UnityEditorInternal?

Any reply will be appreciated.

I know that there is some classes for accessing the profiler in code. Like the Profiler class:

They’re in the UnityEngine.Profiling namespace.

I don’t know this ‘High Detail’ option though. You must be on the newer Unity. I’m still on Unity 5.6

I am on Unity 5.6 as well. Go to Window > Profiler, select the CPU Usage and click Timeline. Then you can see there is a High Detail button.
3224007--247240--upload_2017-9-18_15-3-15.png

I want to find the reference document about namespace UnityEditor.UnityEditorIneternal. There are other classes such as ProfilerDriver to control the profiler. But I can not find such document.
3224007--247241--upload_2017-9-18_15-7-23.png

Thank you for your reply.:slight_smile:

There is no reference documents for the internal stuff… it’s considered internal.

You can use the Object Explorer to search around it though, possibly find a method that looks like it’d get the job done, and then test it.

OK, I will try. Thanks!

UnityEditor.UnityEditorInternal namespace is not exposed and cannot be scripted (I’ve recently been trying this to script some NavAI UI stuff into my own editor scripts).

Are you trying to enable high detail during execution when something specific occurs?

Thank you for your reply. I am writing code to count the call stack time per frame at runtime. They are showed below in the profiler.
3225433--247393--upload_2017-9-19_17-35-57.png

But in the default setting, the two item [Alloc] and [Dealloc] won’t be recorded, so I have to enable High Detail mode. Then I can get the data I want.