fix:确保main场景单独可以运行
parent
e300dfb9a3
commit
afd7983467
|
@ -49,8 +49,13 @@ namespace UnityTest.ZXL
|
||||||
|
|
||||||
private async ETTask DialogueAsync() //
|
private async ETTask DialogueAsync() //
|
||||||
{
|
{
|
||||||
var uiBg = GameObject.Find("ZXL").GetComponent<UI_BG>();
|
var go = GameObject.Find("ZXL");
|
||||||
uiBg.ShowBG();
|
UI_BG uiBg = null;
|
||||||
|
if (go)
|
||||||
|
{
|
||||||
|
uiBg = go.GetComponent<UI_BG>();
|
||||||
|
uiBg.ShowBG();
|
||||||
|
}
|
||||||
|
|
||||||
var showUI = UIManager.Instance().ShowUI(UIType.Dialogue);
|
var showUI = UIManager.Instance().ShowUI(UIType.Dialogue);
|
||||||
var dialogueUI = showUI as DialogueUI;
|
var dialogueUI = showUI as DialogueUI;
|
||||||
|
@ -62,7 +67,8 @@ namespace UnityTest.ZXL
|
||||||
|
|
||||||
EventManager.Instance.FireNow(this, new ProcessOverEventArgs(processType));
|
EventManager.Instance.FireNow(this, new ProcessOverEventArgs(processType));
|
||||||
UIManager.Instance().HideUI(UIType.Dialogue);
|
UIManager.Instance().HideUI(UIType.Dialogue);
|
||||||
uiBg.HideBG();
|
if (go)
|
||||||
|
uiBg.HideBG();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Button]
|
[Button]
|
||||||
|
|
Loading…
Reference in New Issue