1
This commit is contained in:
@@ -12,6 +12,24 @@ public class LoadingPanel : MonoBehaviour
|
||||
public Image image_Bg;
|
||||
public Action actionEnd;
|
||||
public float fadeTime = 1.3f;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
// ⭐ 视频播放期间预载大厅主面板:把 HomeUIRes 的加载提前到这段视频等待时间里,
|
||||
// 登录成功 UILoginPanel.Succeed() 的 ShowAsync(HomeMainPanel) 命中缓存秒开,
|
||||
// 不再出现"登录成功后进大厅白等"。
|
||||
StartCoroutine(PreloadHomeMainRoutine());
|
||||
}
|
||||
|
||||
/// <summary>预载大厅主面板:等 UIManager 就绪后发起(视频这段时间足够 HomeUIRes 加载完)</summary>
|
||||
private IEnumerator PreloadHomeMainRoutine()
|
||||
{
|
||||
while (UIManager.Instance == null)
|
||||
yield return null;
|
||||
yield return null; // 等 UIManager 初始化完成(地址表装载)
|
||||
UIManager.Instance.PreloadPanel(UIPanel.HomeMainPanel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 进入条进度值
|
||||
/// </summary>
|
||||
@@ -20,6 +38,9 @@ public class LoadingPanel : MonoBehaviour
|
||||
{
|
||||
if (count == 100)
|
||||
{
|
||||
// ⭐ 兜底再预载一次:若启动时 UIManager 尚未就绪导致首次发起无效,这里补上
|
||||
if (UIManager.Instance != null)
|
||||
UIManager.Instance.PreloadPanel(UIPanel.HomeMainPanel);
|
||||
GameManager.Instance.btn_Skip.gameObject.SetActive(false);
|
||||
Destroy(gameObject, fadeTime);
|
||||
if (player.gameObject.activeSelf)
|
||||
|
||||
Reference in New Issue
Block a user