Skip to content

Instantly share code, notes, and snippets.

@ifshuaishuai
Created June 2, 2016 15:15
Show Gist options
  • Save ifshuaishuai/d25496eca754215f64af9de14551ec1c to your computer and use it in GitHub Desktop.
Save ifshuaishuai/d25496eca754215f64af9de14551ec1c to your computer and use it in GitHub Desktop.
unity 5.x Profiler no label
using UnityEngine;
using System.Collections;
public class ProfilerTester : MonoBehaviour
{
void Update()
{
Profiler.BeginSample("AAATest");
float sum = ExpensiveOperation();
Debug.Log(sum);
Profiler.EndSample();
}
private float ExpensiveOperation()
{
float sum = 0.0f;
for (int i = 0; i < 10000; ++i)
sum += Mathf.Sin(i);
return sum;
}
}
@ifshuaishuai
Copy link
Author

Test Under Unity 5.3.4f1, result is here.
NO Profiler Label was foud.

@ifshuaishuai
Copy link
Author

I find out that When "Deep Profile" enabled, custom label dispeared, see here
When "Deep Profile" disabled, custom label shows, lol, see here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment