Improving performance

This commit is contained in:
CroakFang
2023-07-13 21:56:48 +08:00
parent e4623a3f8a
commit 97a6322f13
7 changed files with 94 additions and 54 deletions
+9 -2
View File
@@ -71,7 +71,7 @@ public class UmaSceneController:MonoBehaviour
Destroy(CavansInstance);
}
public void LoadingProgressChange(int curren, int target)
public void LoadingProgressChange(int curren, int target, string message = null)
{
if(curren == -1)
{
@@ -80,8 +80,15 @@ public class UmaSceneController:MonoBehaviour
else
{
LoadingProgressPanel.SetActive(true);
LoadingProgressText.text = $"Loading...({curren}/{target})";
LoadingProgressSlider.value = (float)curren / target;
if (string.IsNullOrEmpty(message))
{
LoadingProgressText.text = $"Loading...({curren}/{target})";
}
else
{
LoadingProgressText.text = $"{message}({curren}/{target})";
}
}
}
}