Skip to content

Commit a6862ed

Browse files
committed
[修复]1. 修复重复打开一个界面出现两个界面的问题
GameFrameX/GameFrameX.Unity#27
1 parent cbed3d5 commit a6862ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Runtime/UIManager.Open.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,16 @@ public async Task<IUIForm> OpenUIFormAsync(string uiFormAssetPath, Type uiFormTy
107107

108108
private async Task<IUIForm> InnerOpenUIFormAsync(string uiFormAssetPath, Type uiFormType, bool pauseCoveredUIForm, object userData, bool isFullScreen = false, bool isMultiple = false)
109109
{
110-
int serialId = ++m_Serial;
111110
var uiFormAssetName = uiFormType.Name;
112111
UIFormInstanceObject uiFormInstanceObject = m_InstancePool.Spawn(uiFormAssetName);
113112

114113
if (uiFormInstanceObject != null && isMultiple == false)
115114
{
116115
// 如果对象池存在
117-
return InternalOpenUIForm(serialId, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
116+
return InternalOpenUIForm(-1, uiFormAssetName, uiFormType, uiFormInstanceObject.Target, pauseCoveredUIForm, false, 0f, userData, isFullScreen);
118117
}
119118

119+
int serialId = ++m_Serial;
120120
m_UIFormsBeingLoaded.Add(serialId, uiFormAssetName);
121121
string assetPath = PathHelper.Combine(uiFormAssetPath, uiFormAssetName);
122122

0 commit comments

Comments
 (0)