Hi everyone. I have a little question about profiling. As long I’m make some Profiler inside void Start() everything is fine like:
void Start()
{
Profiler.BeginSample(“TEST”);
myFunction();
Profiler.EndSample();
}
After this I can see a single Sample in the profiler - perfect. But now imagine that “myfunction” has 2 or more sub functions. Then I see the complete hierarchies of all samples. But I want to collapse all the same Samples into one, so I know which sub functions are ineffective. I’m not interested in every single function call. How does this work?
void Start()
{
Profiler.BeginSample("TESTALL");
myFunction();
Profiler.EndSample();
}
//this is not correct !!!!
void myFunction(){
// want to collapse TESTFIRST into one Profilerblock
Profiler.BeginSample("TESTFIRST");
myFunctionInsideOne();
Profiler.EndSample();
// want to collapse TESTSECOND into one Profilerblock
Profiler.BeginSample("TESTSECOND");
myFunctionInsideTwo();
Profiler.EndSample();
}
Thanks =)
Chris