新增默认loading页面删除

This commit is contained in:
shenjianxing 2025-03-19 14:35:54 +08:00
parent 7f106d7246
commit 26e73c995e
4 changed files with 51 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace QFramework
{
var uiRoot = UIRoot.Instance;
Debug.Log("currentUIRoot:" + uiRoot);
StringEventSystem.Global.Send("UIRootCreated");
mInstance = MonoSingletonProperty<UIManager>.Instance;
}

View File

@ -1330,6 +1330,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 376402498555991245}
- component: {fileID: 3604560447573429498}
m_Layer: 0
m_Name: UILoading
m_TagString: Untagged
@ -1337,6 +1338,18 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &3604560447573429498
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3604560447573429497}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cabec804a45ce1941b8c1895f35d2860, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!222 &4329888169046837703
CanvasRenderer:
m_ObjectHideFlags: 0

View File

@ -0,0 +1,26 @@
using QFramework;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LaunchLoading : MonoBehaviour
{
public static LaunchLoading instance;
private void Awake()
{
instance = this;
StringEventSystem.Global.Register("UIRootCreated", OnUIRootCreated);
}
private void OnUIRootCreated()
{
gameObject.SetActive(false);
}
private void OnDestroy()
{
StringEventSystem.Global.UnRegister("UIRootCreated", OnUIRootCreated);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cabec804a45ce1941b8c1895f35d2860
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: