Created
June 2, 2016 15:15
-
-
Save ifshuaishuai/d25496eca754215f64af9de14551ec1c to your computer and use it in GitHub Desktop.
unity 5.x Profiler no label
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Test Under Unity 5.3.4f1, result is here.
NO Profiler Label was foud.