关于加载资源所需时间的计时器 (C# Unity)

Timer on how long it take to load a resources (C# Unity)

我想 Debug.Log 我的加载方法,了解他们需要多长时间才能完全加载我的所有资源。这是我从我的资源中加载它们的方式。

yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/minimap_type_b (x_ 1575, 1356)", tf));
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/replay", tf));

tf = transform.Find("UI Root/FullscreenPanel/Screen3DUI/panel (depth 1~2)");
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/logo", tf));
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/card_open_window", tf));
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/ranking", tf));
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/top_bar", tf));

tf = transform.Find("UI Root/FullscreenPanel/Screen3DUI/panel (depth 10~11)");
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/midterm_loading", tf));

tf = transform.Find("UI Root/FullscreenPanel/Screen3DUI/panel (depth 12)");
yield return StartCoroutine(LoadAsync("MC_VERSION/{0}/UI/Screen3DUI/game_result", tf));

loading.SetValue(0.02f);    // 2%.

我的问题是我不知道该用什么。 Time.timeSinceLevelLoadTime.realtimeSinceStartup。另外,我真的不知道如何使用它们。有人可以指导我吗?

我想出了这个主意。当我在等待答案时,一个灯泡突然弹出。

 public float start_time;
 Debug.Log(string.Format("End LoadUI - {0}s", Time.realtimeSinceStartup - start_time));

谢谢大家。