以下为计算函数消耗计时的代码
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
watch.Stop();
Debug.Log($"耗时{ watch.ElapsedMilliseconds}ms");
以下为计算函数消耗计时的代码
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
watch.Stop();
Debug.Log($"耗时{ watch.ElapsedMilliseconds}ms");