方法一:
Stopwatch sw = new Stopwatch();
sw.Start();
TestMethod();
sw.Stop();
UnityEngine.Debug.Log(string.Format("total: {0} ms",sw.ElapsedMilliseconds));
方法二:需要打开打开Profiler界面找到那一帧
Profiler.BeginSample("TestMethod");
TestMethod();
Profiler.EndSample();
![]()
573

被折叠的 条评论
为什么被折叠?



