加载场景以及更新进度条
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RedScarf.UguiPartner;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using System;
[AssetBind("UguiPartner/Prefab/LoadingPanel",FilePathKind.Resources)]
/// <summary>
/// 加载面板
/// </summary>
public class LoadingPanel : UIPanel
{
[SerializeField] protected bool m_DestroyOnLoaded=true;
[SerializeField] protected Slider m_Process;
protected AsyncOperation m_AsyncOperation;
protected override void Start()
{
m_Process.interactable = false;
}
private void Update()
{
UpdateProcess();
}
/// <summary>
/// 更新进度
/// </summary>
protected void UpdateProcess()
{
if (m_AsyncOperation == null)
return;
m_Process.value = m_AsyncOperation.progress;
}
/// <summary>
/// 加载场景
/// </summary>
/// &l