您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
28 行
578 B
28 行
578 B
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using TMPro;
|
|
using UnityEngine;
|
|
|
|
public class LoadingScreen : MonoBehaviour
|
|
{
|
|
public TextMeshProUGUI loadingText;
|
|
|
|
private void OnEnable()
|
|
{
|
|
Application.backgroundLoadingPriority = ThreadPriority.Low;
|
|
}
|
|
|
|
private void OnDestroy()
|
|
{
|
|
Application.backgroundLoadingPriority = ThreadPriority.Normal;
|
|
}
|
|
|
|
public void SetLoad(float load = 0.0f)
|
|
{
|
|
if (loadingText)
|
|
{
|
|
loadingText.text = $"{load * 100f}% Loading...";
|
|
}
|
|
}
|
|
}
|